Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 8 additions & 4 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,14 @@ func runSynchronizer(cfg config.Config, etherman *etherman.Client, ethTxManager
var trustedSequencerURL string
var err error
if !cfg.IsTrustedSequencer {
log.Debug("getting trusted sequencer URL from smc")
trustedSequencerURL, err = etherman.GetTrustedSequencerURL()
if err != nil {
log.Fatal("error getting trusted sequencer URI. Error: %v", err)
if cfg.Synchronizer.TrustedSequencerURL != "" {
trustedSequencerURL = cfg.Synchronizer.TrustedSequencerURL
} else {
log.Debug("getting trusted sequencer URL from smc")
trustedSequencerURL, err = etherman.GetTrustedSequencerURL()
if err != nil {
log.Fatal("error getting trusted sequencer URI. Error: %v", err)
}
}
log.Debug("trustedSequencerURL ", trustedSequencerURL)
}
Expand Down
1 change: 1 addition & 0 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ EnableL2SuggestedGasPricePolling = true
SyncInterval = "0s"
SyncChunkSize = 100
GenBlockNumber = 67
trustedSequencerURL = ""

[Sequencer]
WaitPeriodPoolIsEmpty = "1s"
Expand Down
1 change: 1 addition & 0 deletions config/environments/local/local.node.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ EnableL2SuggestedGasPricePolling = true
SyncInterval = "1s"
SyncChunkSize = 100
GenBlockNumber = 79
trustedSequencerURL = ""

[Sequencer]
WaitPeriodPoolIsEmpty = "1s"
Expand Down
1 change: 1 addition & 0 deletions config/environments/mainnet/public.node.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ EnableL2SuggestedGasPricePolling = false
SyncInterval = "2s"
SyncChunkSize = 100
GenBlockNumber = 16896721
trustedSequencerURL = ""

[MTClient]
URI = "zkevm-prover:50061"
Expand Down
5 changes: 3 additions & 2 deletions synchronizer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
type Config struct {
// SyncInterval is the delay interval between reading new rollup information
SyncInterval types.Duration `mapstructure:"SyncInterval"`

// SyncChunkSize is the number of blocks to sync on each chunk
SyncChunkSize uint64 `mapstructure:"SyncChunkSize"`

// GenBlockNumber is the block number where the polygonZKEVM smc was deployed
GenBlockNumber uint64 `mapstructure:"GenBlockNumber"`
// TrustedSequencerURL is the rpc url to connect and sync the trusted state
TrustedSequencerURL string `mapstructure:"TrustedSequencerURL"`
}
1 change: 1 addition & 0 deletions test/config/debug.node.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ EnableL2SuggestedGasPricePolling = true
SyncInterval = "5s"
SyncChunkSize = 100
GenBlockNumber = 79
trustedSequencerURL = ""

[Sequencer]
WaitPeriodPoolIsEmpty = "1s"
Expand Down
1 change: 1 addition & 0 deletions test/config/test.node.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ EnableL2SuggestedGasPricePolling = true
SyncInterval = "1s"
SyncChunkSize = 100
GenBlockNumber = 79
trustedSequencerURL = ""

[Sequencer]
WaitPeriodPoolIsEmpty = "1s"
Expand Down