Skip to content

feat: add flags to disable tx broadcast & receive #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: scroll
Choose a base branch
from

Conversation

yiweichi
Copy link
Member

@yiweichi yiweichi commented Jun 27, 2025

Reth counterpart of l2geth scroll-tech/go-ethereum#1194.
Related rollup-node PR: scroll-tech/rollup-node#181

Added two fields on NetworkConfig.
tx_gossip_broadcast_disabled: to disable transaction broadcasting to other peers.
tx_gossip_receive_disabled: to disable transaction receiving broadcasted from other peers.

Copy link

codspeed-hq bot commented Jun 27, 2025

CodSpeed Performance Report

Merging #266 will not alter performance

Comparing feat-disable-transaction-broadcast-receive (18e0db6) with scroll (766dd27)

Summary

✅ 77 untouched benchmarks

@yiweichi yiweichi requested review from frisitano and greged93 July 4, 2025 09:02
@yiweichi yiweichi changed the title feat: add flag to disable tx broadcast & receive feat: add flags to disable tx broadcast & receive Jul 4, 2025
Copy link
Collaborator

@greged93 greged93 left a comment

Choose a reason for hiding this comment

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

Some small comments. I'm also wondering why the tx_gossip_disabled is not enough? Do we need more granularity in some cases?

@yiweichi
Copy link
Member Author

yiweichi commented Jul 4, 2025

Some small comments. I'm also wondering why the tx_gossip_disabled is not enough? Do we need more granularity in some cases?

Yeah, I think we will need this granularity. One of our side goal is to have a private transaction pool for sequencer. which means sequencer won't broadcast transactions it received, meanwhile we still need transaction receiving enabled.
So the granularity should be necessary.

@greged93
Copy link
Collaborator

greged93 commented Jul 4, 2025

meanwhile we still need transaction receiving enabled

Got it, I thought we would only use the SequencerClient you added in #265 but it makes sense to keep receive enable.

@yiweichi yiweichi requested a review from greged93 July 6, 2025 20:00
Copy link
Collaborator

@greged93 greged93 left a comment

Choose a reason for hiding this comment

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

I think you're just missing a call to default for the network builder. Also need to fix the CI.

@@ -42,7 +42,10 @@ impl ScrollNode {
.pool(ScrollPoolBuilder::default())
.executor(ScrollExecutorBuilder::default())
.payload(BasicPayloadServiceBuilder::new(ScrollPayloadBuilderBuilder::default()))
.network(ScrollNetworkBuilder)
.network(ScrollNetworkBuilder {
disable_txpool_broadcast: self.disable_txpool_broadcast,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't you be calling 'default()' here?

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