Skip to content

Commit

Permalink
Reduce max transactions per block in simtests (#20401)
Browse files Browse the repository at this point in the history
## Description 

This makes it more likely to exercise full blocks in simtests.

## Test plan 

CI

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
mwtian authored Nov 26, 2024
1 parent 01275fb commit ff98089
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions crates/sui-protocol-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1631,14 +1631,20 @@ impl ProtocolConfig {
}

pub fn max_transactions_in_block_bytes(&self) -> u64 {
// Provide a default value if protocol config version is too low.
self.consensus_max_transactions_in_block_bytes
.unwrap_or(512 * 1024)
if cfg!(msim) {
256 * 1024
} else {
self.consensus_max_transactions_in_block_bytes
.unwrap_or(512 * 1024)
}
}

pub fn max_num_transactions_in_block(&self) -> u64 {
// 500 is the value used before this field is introduced.
self.consensus_max_num_transactions_in_block.unwrap_or(500)
if cfg!(msim) {
8
} else {
self.consensus_max_num_transactions_in_block.unwrap_or(512)
}
}

pub fn rethrow_serialization_type_layout_errors(&self) -> bool {
Expand Down

0 comments on commit ff98089

Please sign in to comment.