Skip to content

Conversation

@nonsense
Copy link
Contributor

@nonsense nonsense commented Oct 24, 2025

This PR is adding a rollup.netrestricttxpoolgossip flag, so that the node gossips and accepts gossips of transactions only to a restricted set, if one is specified.

If the flag is not specific, no peers are filtered, i.e. gossiping works for all peers.


  • Introduces the RollupNetrestrictTxPoolGossipFlag flag
  • Adds TxGossipNetRestrict to the Backend and propagates it to every Peer.
  • Short-circuits all relevant p2p.Send calls (outgoing messages) as well as handling of incoming messages related to transactions.

@pcw109550
Copy link
Contributor

We may update the forkdiff(https://github.com/ethereum-optimism/op-geth/blob/optimism/fork.yaml) to track the geth diff.

@nonsense nonsense force-pushed the nonsense/netrestrict-txpool-gossip branch from e06f64a to e3042c2 Compare October 27, 2025 12:29
Copy link
Contributor

@pcw109550 pcw109550 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only takes care of outbound connections. To truly restrict tx gossiping, we must also prohibit inbound connections from disallowed peers. In other words, external peers' transactions must not be gossiped in to the node.

We may need to explore other control flows that may create outbound connections for tx gossiping.

@pcw109550
Copy link
Contributor

Worth to mention that the new flag will be the same information restriction level with GETH_ROLLUP_DISABLETXPOOLGOSSIP, which restricts inbound AND outbound (for the gossip)

@nonsense nonsense force-pushed the nonsense/netrestrict-txpool-gossip branch from ce00797 to edf0d1e Compare October 27, 2025 16:45
@nonsense nonsense force-pushed the nonsense/netrestrict-txpool-gossip branch from edf0d1e to 2e01ede Compare October 27, 2025 16:51
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.

2 participants