Skip to content
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

feat(p2p): disable peer discovery for the sequencer #923

Merged
merged 6 commits into from
Feb 10, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge
srene committed Jan 28, 2025
commit 5f0c1c8a46b9517dad5eacf25565e30c7051852a
12 changes: 12 additions & 0 deletions p2p/client.go
Original file line number Diff line number Diff line change
@@ -158,6 +158,18 @@ func (c *Client) StartWithHost(ctx context.Context, h host.Host, isSequencer boo
return err
}
}

if !c.conf.BlockSyncEnabled {
c.logger.Info("Block sync protocol disabled")
return nil
}

c.logger.Debug("Setting up block sync protocol")
err = c.startBlockSync(ctx)
if err != nil {
return err
}

return nil
}

3 changes: 2 additions & 1 deletion testutil/block.go
Original file line number Diff line number Diff line change
@@ -128,7 +128,8 @@ func GetManagerWithProposerKey(conf config.BlockManagerConfig, proposerKey crypt
p2pClient.SetTxValidator(p2pValidator.TxValidator(mp, mpIDs))
p2pClient.SetBlockValidator(p2pValidator.BlockValidator())

if err = p2pClient.Start(context.Background(), false); err != nil {
manager.P2PClient = p2pClient
if err = p2pClient.Start(context.Background()); err != nil {
return nil, err
}

You are viewing a condensed version of this merge commit. You can view the full changes here.