Skip to content

Conversation

mralj
Copy link

@mralj mralj commented Jun 19, 2025

This PR adds a dispatching event when the node receives an IHAVE message from a peer.
This feature is useful in scenarios where, for any reason, the received message (or rather, the data message transmitted) gets lost in the future, and we need to query the peer to fetch this data using a Request/Response style protocol.
Knowing which peers had this message/data in the first place makes these queries more intelligent/targeted.

Specific example:

  1. Peers gossip transactions
  2. Some transaction is added to the local mempool
  3. time passes and the transaction gets evicted for whatever reason
  4. time passes and now we need this specific tx (be it for block building, proving, serving RPC request, etc.). We have to fetch it from a peer.
  5. It would be best to query peers that we know have had this transaction at some point because they've sent us an IHAVE message.

@mralj mralj requested a review from a team as a code owner June 19, 2025 10:36
@mralj mralj changed the title Dispatch event on IHAVE received feat: Dispatch event on IHAVE received Jun 19, 2025
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