Skip to content

Commit

Permalink
fixing test + bds in mock
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Nov 8, 2024
1 parent 8f7c678 commit 72f014a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion block/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion config/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 72f014a

Please sign in to comment.