Skip to content

Commit

Permalink
Merge tag 'v0.7.0' into CDK-358-integrate-zkevm-node-v-0-7-0-changes-…
Browse files Browse the repository at this point in the history
…into-cdk-validium-node
  • Loading branch information
Stefan-Ethernal committed Jun 26, 2024
2 parents d8e6026 + bdeddb3 commit 9ead0bc
Show file tree
Hide file tree
Showing 64 changed files with 4,161 additions and 4,268 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ generate-code-from-proto: ## Generates code from proto files
cd proto/src/proto/hashdb/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../merkletree/hashdb --go-grpc_out=../../../../../merkletree/hashdb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative hashdb.proto
cd proto/src/proto/executor/v1 && protoc --proto_path=. --go_out=../../../../../state/runtime/executor --go-grpc_out=../../../../../state/runtime/executor --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative executor.proto
cd proto/src/proto/aggregator/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../aggregator/prover --go-grpc_out=../../../../../aggregator/prover --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative aggregator.proto
cd proto/src/proto/datastream/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../state/datastream --go-grpc_out=../../../../../state/datastream --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative datastream.proto

## Help display.
## Pulls comments from beside commands and prints a nicely formatted
Expand Down
2 changes: 2 additions & 0 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@ func runJSONRPCServer(c config.Config, etherman *etherman.Client, chainID uint64
}

func createSequencer(cfg config.Config, pool *pool.Pool, st *state.State, etherman *etherman.Client, eventLog *event.EventLog) *sequencer.Sequencer {
cfg.Sequencer.L2Coinbase = cfg.SequenceSender.L2Coinbase

seq, err := sequencer.New(cfg.Sequencer, cfg.State.Batch, cfg.Pool, pool, st, etherman, eventLog)
if err != nil {
log.Fatal(err)
Expand Down
29 changes: 29 additions & 0 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ func Test_Defaults(t *testing.T) {
path: "Synchronizer.L2Synchronization.DataSourcePriority",
expectedValue: []dataavailability.DataSourcePriority{"local", "trusted", "external"},
},
{
path: "Synchronizer.L1BlockCheck.Enabled",
expectedValue: true,
},
{
path: "Synchronizer.L1BlockCheck.PreCheckEnabled",
expectedValue: true,
},
{
path: "Synchronizer.L2Synchronization.Enabled",
expectedValue: true,
},

{
path: "Sequencer.DeletePoolTxsL1BlockConfirmations",
expectedValue: uint64(100),
Expand Down Expand Up @@ -137,6 +150,10 @@ func Test_Defaults(t *testing.T) {
path: "Sequencer.Finalizer.BatchMaxDeltaTimestamp",
expectedValue: types.NewDuration(1800 * time.Second),
},
{
path: "Sequencer.Finalizer.FlushIdCheckInterval",
expectedValue: types.NewDuration(50 * time.Millisecond),
},
{
path: "Sequencer.Finalizer.Metrics.Interval",
expectedValue: types.NewDuration(60 * time.Minute),
Expand All @@ -157,6 +174,10 @@ func Test_Defaults(t *testing.T) {
path: "Sequencer.StreamServer.Version",
expectedValue: uint8(0),
},
{
path: "Sequencer.StreamServer.WriteTimeout",
expectedValue: types.NewDuration(5 * time.Second),
},
{
path: "Sequencer.StreamServer.Enabled",
expectedValue: false,
Expand Down Expand Up @@ -185,6 +206,10 @@ func Test_Defaults(t *testing.T) {
path: "SequenceSender.MaxBatchesForL1",
expectedValue: uint64(300),
},
{
path: "SequenceSender.SequenceL1BlockConfirmations",
expectedValue: uint64(32),
},
{
path: "Etherman.URL",
expectedValue: "http://localhost:8545",
Expand Down Expand Up @@ -306,6 +331,10 @@ func Test_Defaults(t *testing.T) {
path: "Pool.GlobalQueue",
expectedValue: uint64(1024),
},
{
path: "Pool.TxFeeCap",
expectedValue: float64(1),
},
{
path: "Pool.EffectiveGasPrice.Enabled",
expectedValue: false,
Expand Down
9 changes: 7 additions & 2 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ MinAllowedGasPriceInterval = "5m"
PollMinAllowedGasPriceInterval = "15s"
AccountQueue = 64
GlobalQueue = 1024
TxFeeCap = 1.0
[Pool.EffectiveGasPrice]
Enabled = false
L1GasPriceFactor = 0.25
Expand Down Expand Up @@ -107,11 +108,11 @@ L1SynchronizationMode = "sequential"
L1SyncCheckL2BlockHash = true
L1SyncCheckL2BlockNumberhModulus = 600
[Synchronizer.L1BlockCheck]
Enable = true
Enabled = true
L1SafeBlockPoint = "finalized"
L1SafeBlockOffset = 0
ForceCheckBeforeStart = true
PreCheckEnable = true
PreCheckEnabled = true
L1PreSafeBlockPoint = "safe"
L1PreSafeBlockOffset = 0
[Synchronizer.L1ParallelSynchronization]
Expand All @@ -128,6 +129,7 @@ L1SyncCheckL2BlockNumberhModulus = 600
AceptableInacctivityTime = "5s"
ApplyAfterNumRollupReceived = 10
[Synchronizer.L2Synchronization]
Enabled = true
AcceptEmptyClosedBatches = false
ReprocessFullBatchOnClose = false
CheckLastL2BlockHashOnCloseBatch = true
Expand All @@ -151,6 +153,7 @@ StateConsistencyCheckInterval = "5s"
L2BlockMaxDeltaTimestamp = "3s"
ResourceExhaustedMarginPct = 10
StateRootSyncInterval = "3600s"
FlushIdCheckInterval = "50ms"
HaltOnBatchNumber = 0
SequentialBatchSanityCheck = false
SequentialProcessL2Block = false
Expand All @@ -161,13 +164,15 @@ StateConsistencyCheckInterval = "5s"
Port = 0
Filename = ""
Version = 0
WriteTimeout = "5s"
Enabled = false
[SequenceSender]
WaitPeriodSendSequence = "5s"
LastBatchVirtualizationTimeMaxWaitPeriod = "5s"
L1BlockTimestampMargin = "30s"
MaxTxSizeForL1 = 131072
SequenceL1BlockConfirmations = 32
L2Coinbase = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
PrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"}
GasOffset = 80000
Expand Down
3 changes: 3 additions & 0 deletions config/environments/local/local.node.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ StateConsistencyCheckInterval = "5s"
L2BlockMaxDeltaTimestamp = "3s"
ResourceExhaustedMarginPct = 10
StateRootSyncInterval = "360s"
FlushIdCheckInterval = "50ms"
HaltOnBatchNumber = 0
SequentialBatchSanityCheck = false
SequentialProcessL2Block = false
Expand All @@ -111,13 +112,15 @@ StateConsistencyCheckInterval = "5s"
[Sequencer.StreamServer]
Port = 0
Filename = ""
WriteTimeout = "5s"
Enabled = false

[SequenceSender]
WaitPeriodSendSequence = "5s"
LastBatchVirtualizationTimeMaxWaitPeriod = "5s"
L1BlockTimestampMargin = "30s"
MaxTxSizeForL1 = 131072
SequenceL1BlockConfirmations = 32
L2Coinbase = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
PrivateKey = {Path = "/pk/sequencer.keystore", Password = "testonly"}

Expand Down
16 changes: 10 additions & 6 deletions docs/config-file/node-config-doc.html

Large diffs are not rendered by default.

Loading

0 comments on commit 9ead0bc

Please sign in to comment.