Heuristics

blocksci.blocksci_interface.heuristics.address_deanon_txes(arg0: blocksci.blocksci_interface.Blockchain, arg1: int, arg2: int) → List[blocksci.blocksci_interface.Tx]

Return a list of all the transactions in the blockchain for which is_address_deanon returns true

blocksci.blocksci_interface.heuristics.change_by_address_reuse(arg0: blocksci.blocksci_interface.Tx) → Set[blocksci.blocksci_interface.Output]

If input addresses appear as an output address, the client might have reused addresses for change.

blocksci.blocksci_interface.heuristics.change_by_address_type(arg0: blocksci.blocksci_interface.Tx) → Set[blocksci.blocksci_interface.Output]

If all inputs are of one address type (e.g., P2PKH or P2SH), it is likely that the change output has the same type

blocksci.blocksci_interface.heuristics.change_by_client_change_address_behavior(arg0: blocksci.blocksci_interface.Tx) → Set[blocksci.blocksci_interface.Output]

Most clients will generate a fresh address for the change. If an output is the first to send value to an address, it is potentially the change.

blocksci.blocksci_interface.heuristics.change_by_locktime(arg0: blocksci.blocksci_interface.Tx) → Set[blocksci.blocksci_interface.Output]

Bitcoin Core sets the locktime to the current block height to prevent fee sniping. If all outpus have been spent, and there is only one output that has been spent in a transaction that matches this transaction’s locktime behavior, it is the change.

blocksci.blocksci_interface.heuristics.change_by_optimal_change(arg0: blocksci.blocksci_interface.Tx) → Set[blocksci.blocksci_interface.Output]

If there exists an output that is smaller than any of the inputs it is likely the change. If a change output was larger than the smallest input, then the coin selection algorithm wouldn’t need to add the input in the first place.

blocksci.blocksci_interface.heuristics.change_by_peeling_chain(arg0: blocksci.blocksci_interface.Tx) → Set[blocksci.blocksci_interface.Output]

If tx is a peeling chain, returns the smaller output.

blocksci.blocksci_interface.heuristics.change_by_power_of_ten_value(tx: blocksci.blocksci_interface.Tx, digits: int=6) → Set[blocksci.blocksci_interface.Output]

Detects possible change outputs by checking for output values that are multiples of 10^digits.

blocksci.blocksci_interface.heuristics.change_over_txes(arg0: blocksci.blocksci_interface.Blockchain, arg1: int, arg2: int) → List[blocksci.blocksci_interface.Tx]

Return a list of transactions in the blockchain for which is_change_over returns true

blocksci.blocksci_interface.heuristics.coinjoin_txes(arg0: blocksci.blocksci_interface.Blockchain, arg1: int, arg2: int) → List[blocksci.blocksci_interface.Tx]

Returns a list of all transactions in the blockchain that might be JoinMarket coinjoin transactions

blocksci.blocksci_interface.heuristics.is_address_deanon(arg0: blocksci.blocksci_interface.Tx) → bool

Returns true if this transaction’s change address is deanonymized by the address types involved

blocksci.blocksci_interface.heuristics.is_change_over(arg0: blocksci.blocksci_interface.Tx) → bool

Returns true if this transaction contained all inputs of one address type and all outputs of a different type

blocksci.blocksci_interface.heuristics.is_coinjoin(arg0: blocksci.blocksci_interface.Tx) → bool

Uses basic structural features to quickly decide whether this transaction might be a JoinMarket coinjoin transaction

blocksci.blocksci_interface.heuristics.is_definite_coinjoin(*args, **kwargs)

Overloaded function.

  1. is_definite_coinjoin(arg0: blocksci.blocksci_interface.Tx, arg1: int, arg2: float, arg3: int) -> blocksci::heuristics::CoinJoinResult

This function uses subset matching in order to determine whether this transaction is a JoinMarket coinjoin. If maxDepth != 0, it limits the total number of possible subsets the algorithm will check.

  1. is_definite_coinjoin(arg0: blocksci.blocksci_interface.Tx, arg1: int, arg2: float) -> blocksci::heuristics::CoinJoinResult

This function uses subset matching in order to determine whether this transaction is a JoinMarket coinjoin.

blocksci.blocksci_interface.heuristics.is_keyset_change(arg0: blocksci.blocksci_interface.Tx) → bool

Returns true if this transaction contains distinct addresses which share some of the same keys, indicating that the access control structure has changed

blocksci.blocksci_interface.heuristics.keyset_change_txes(arg0: blocksci.blocksci_interface.Blockchain, arg1: int, arg2: int) → List[blocksci.blocksci_interface.Tx]

Return a list of transaction in the blockchain for which is_keyset_change returns true

blocksci.blocksci_interface.heuristics.possible_coinjoin_txes(arg0: blocksci.blocksci_interface.Blockchain, arg1: int, arg2: float, arg3: int) → Tuple[List[blocksci.blocksci_interface.Tx], List[blocksci.blocksci_interface.Tx]]

Returns a list of all transactions in the blockchain that might be coinjoin transactions

blocksci.blocksci_interface.heuristics.unique_change_by_address_reuse(arg0: blocksci.blocksci_interface.Tx) → Optional[blocksci.blocksci_interface.Output]

Returns a unique output from change_by_address_reuse or None

blocksci.blocksci_interface.heuristics.unique_change_by_address_type(arg0: blocksci.blocksci_interface.Tx) → Optional[blocksci.blocksci_interface.Output]

Returns a unique output from change_by_address_type or None

blocksci.blocksci_interface.heuristics.unique_change_by_client_change_address_behavior(arg0: blocksci.blocksci_interface.Tx) → Optional[blocksci.blocksci_interface.Output]

Returns a unique output from change_by_client_change_address_behavior or None

blocksci.blocksci_interface.heuristics.unique_change_by_locktime(arg0: blocksci.blocksci_interface.Tx) → Optional[blocksci.blocksci_interface.Output]

Returns a unique output from change_by_locktime or None

blocksci.blocksci_interface.heuristics.unique_change_by_optimal_change(arg0: blocksci.blocksci_interface.Tx) → Optional[blocksci.blocksci_interface.Output]

Returns a unique output from change_by_optimal_change or None

blocksci.blocksci_interface.heuristics.unique_change_by_peeling_chain(arg0: blocksci.blocksci_interface.Tx) → Optional[blocksci.blocksci_interface.Output]

If tx is a peeling chain, returns the smaller output.

blocksci.blocksci_interface.heuristics.unique_change_by_power_of_ten_value(tx: blocksci.blocksci_interface.Tx, digits: int=6) → Optional[blocksci.blocksci_interface.Output]

Returns a unique output from change_by_power_of_ten_value or none