Skip to content

tx relay v2: tell peer missed requested txs - #378

Closed
j-berman wants to merge 7 commits into
seraphis-migration:fcmp++-stagefrom
j-berman:tell-peer-missed-txs
Closed

tx relay v2: tell peer missed requested txs#378
j-berman wants to merge 7 commits into
seraphis-migration:fcmp++-stagefrom
j-berman:tell-peer-missed-txs

Conversation

@j-berman

@j-berman j-berman commented May 13, 2026

Copy link
Copy Markdown
Collaborator

I have a theory that nodes may be banning peers in #373 because of the following sequence of events:

  1. Node A receives a new tx and adds it to its pool.
  2. Node A notifies Node B of this new tx hash in the pool.
  3. Node B doesn't have the tx and requests it from Node A.
  4. Node A kicks the tx from its pool because its pool is at capacity, and another tx with higher fee took its place in the pool.
  5. Node A receives Node B's request for this new tx hash, but doesn't have it in its pool anymore so doesn't respond with the tx hash.
  6. Node A does this for a large number of tx hashes until Node B bans it.

This PR makes sure that Node A responds to Node B in step 5 saying that it does not have the tx in its pool. Thus Node B knows not to ban Node A, and Node B can proceed to request the tx from another node that may have notified it of the tx in the tx request queue checker loop.

Note: it's also possible for a Node A to sync faster than Node B, and to add a block including that new tx to its chain before Node B does, and then Node B thinks Node A missed the tx request. This PR would solve for that too (as indicated in the comment).

We can wait to move forward with this until we see evidence of this theory actually leading to banned peers.

navidR and others added 6 commits May 6, 2026 16:49
    Implement new relay logic with threshold-based peer dropping, single-peer
    tx hash requests, per-connection in-flight limits with queuing, and
    multiindex-based request tracking. Consolidate add/remove request paths,
    pass tx hashes directly into send_txs/relay_txs, and add unit tests for
    the request manager.

    Co-authored-by: j-berman <justinberman@protonmail.com>
    Co-authored-by: Boog900 <boog900@tutanota.com>
Co-authored-by: jeffro256 <jeffro256@tutanota.com>
Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
Co-authored-by: Lee *!* Clagett <code@leeclagett.com>
Co-authored-by: SyntheticBird45 <someoneelse.is_on.github.rio7x@simplelogin.com>
Co-authored-by: jeetrex17 <jeetrex@tutamail.com>
Co-authored-by: UkoeHB <ukoehb@users.noreply.github.com>
* wallet: saner hf version validity check for FCMP++

* Revert optional args RPC

* Update src/wallet/wallet2.cpp

Co-authored-by: Jeffro <jeffro256@tutanota.com>

---------

Co-authored-by: Jeffro <jeffro256@tutanota.com>
@j-berman

j-berman commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Closing in favor of #450 (which includes the same functionality in a more efficient way)

@j-berman j-berman closed this Aug 3, 2026
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.

3 participants