diff --git a/block/executor.go b/block/executor.go index 6f6cfc71f..a83e0e8d4 100644 --- a/block/executor.go +++ b/block/executor.go @@ -261,7 +261,7 @@ func (e *Executor) ExecuteBlock(block *types.Block) (*tmstate.ABCIResponses, err Votes: nil, }, ByzantineValidators: nil, - // ConsensusMessages: block.Data.ConsensusMessages, + ConsensusMessages: block.Data.ConsensusMessages, }) if err != nil { return nil, err diff --git a/config/config.go b/config/config.go index 50da40f0a..02b68d083 100644 --- a/config/config.go +++ b/config/config.go @@ -159,9 +159,9 @@ func (c BlockManagerConfig) Validate() error { return fmt.Errorf("batch_submit_bytes must be positive") } - /*if c.BatchSkew < c.BatchSubmitTime { - return fmt.Errorf("max_batch_skew cannot be less than batch_submit_time %s", c.BatchSubmitTime) - }*/ + if c.BatchSkew < c.BatchSubmitTime { + return fmt.Errorf("max_skew_time cannot be less than batch_submit_time. max_skew_time: %s batch_submit_time: %s", c.BatchSkew, c.BatchSubmitTime) + } return nil } diff --git a/config/config_test.go b/config/config_test.go index f2eea6fd2..347e2ae6f 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -98,7 +98,7 @@ func TestNodeConfig_Validate(t *testing.T) { }, wantErr: assert.Error, }, { - name: "max_batch_skew 0", + name: "max_skew_time 0", malleate: func(nc *config.NodeConfig) { nc.BlockManagerConfig.BatchSkew = 0 }, @@ -187,7 +187,7 @@ func fullNodeConfig() config.NodeConfig { MaxIdleTime: 20 * time.Second, MaxProofTime: 20 * time.Second, BatchSubmitTime: 20 * time.Second, - BatchSkew: 10, + BatchSkew: 24 * 7 * time.Hour, BatchSubmitBytes: 10000, }, DAConfig: "da-config", diff --git a/config/defaults.go b/config/defaults.go index dd8a90dd5..8ab7c532d 100644 --- a/config/defaults.go +++ b/config/defaults.go @@ -26,7 +26,7 @@ func DefaultConfig(home string) *NodeConfig { MaxIdleTime: 3600 * time.Second, MaxProofTime: 100 * time.Second, BatchSubmitTime: 3600 * time.Second, - BatchSkew: 200 * time.Millisecond, + BatchSkew: 24 * 7 * time.Hour, BatchSubmitBytes: 500000, }, SettlementLayer: "mock", diff --git a/config/toml.go b/config/toml.go index a5d88bfe5..cdb9dd0c4 100644 --- a/config/toml.go +++ b/config/toml.go @@ -70,7 +70,7 @@ block_time = "{{ .BlockManagerConfig.BlockTime }}" # block production interval in case of no transactions ("0s" produces empty blocks) max_idle_time = "{{ .BlockManagerConfig.MaxIdleTime }}" max_proof_time = "{{ .BlockManagerConfig.MaxProofTime }}" -max_skew_time = {{ .BlockManagerConfig.BatchSkew }} +max_skew_time = "{{ .BlockManagerConfig.BatchSkew }}" # triggers to submit batch to DA and settlement (both required) diff --git a/node/node_test.go b/node/node_test.go index 57aecf762..84ab7f6fb 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -78,7 +78,7 @@ func TestMempoolDirectly(t *testing.T) { BlockTime: 1 * time.Second, BatchSubmitTime: 60 * time.Second, BatchSubmitBytes: 100000, - BatchSkew: 10, + BatchSkew: 24 * 7 * time.Hour, }, DAConfig: "", SettlementLayer: "mock",