Orphan eviction is not actually random #15121

issue sr-gi opened this issue on January 7, 2019
  1. sr-gi commented at 11:18 AM on January 7, 2019: none

    When orphan transactions are evicted form the MapOrphanTransactions pool they are chosen based on their transaction id. https://github.com/bitcoin/bitcoin/blob/378fdfabbae8f4a6e058151d3750ff27f310b4fc/src/net_processing.cpp#L785-L791

    However transaction ids can be easily forged (e.g: resigning the transaction until it falls under a certain threshold), what will make the distribution of the ids in the pool not uniform and therefore the orphan selection will be biased. Such a bias makes forged orphans harder to be "randomly" picked. Picking the orphan to be evicted at random based on its position in the MapOrphanTransactions pool seems a better solution.

    This issue is related to #14897, and solving it will also help prevent inferring techniques such as TxProbe, which takes advantage of the current orphan eviction mechanism.

  2. sipa commented at 11:29 AM on January 7, 2019: member

    See #14626.

  3. sr-gi commented at 11:38 AM on January 7, 2019: none

    Missed that one. I'll close this one as Duplicate of #14626.

    Thanks @sipa.

  4. sr-gi closed this on Jan 7, 2019

  5. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me