Skip to content

Add PredicateTxGenerator#87

Open
tokatoka wants to merge 1 commit intodergoegge:masterfrom
tokatoka:tx_collision
Open

Add PredicateTxGenerator#87
tokatoka wants to merge 1 commit intodergoegge:masterfrom
tokatoka:tx_collision

Conversation

@tokatoka
Copy link
Contributor

@tokatoka tokatoka commented Dec 16, 2025

This PR adds PredicateTxGenerator that

  1. probes the transactions inside the mempools
  2. based on the mempools's utxos, we decide to chain more transactions to it. How we choose the transactions to put onto is decided by a predicate given by the user of this module

for example:

  • PredicateTxGenerator::double_spend() is the same as the previous DoubleSpendGenerator that spends a transaction who has another existing transactions that spend it.
  • PredicateTxGenerator::chain_spend() extends the chain of transactions, it looks for a transaction that nobody spends, and if it is found, it just spends it.

@tokatoka tokatoka force-pushed the tx_collision branch 4 times, most recently from 26c99aa to 2711ac8 Compare December 19, 2025 13:24
@tokatoka tokatoka changed the title Add DoubleSpendGenerator Add PredicateTxGenerator Dec 19, 2025
@tokatoka tokatoka force-pushed the tx_collision branch 2 times, most recently from 9ad7b6d to 185b1dc Compare December 19, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant