Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce max transactions per block in simtests #20401

Merged
merged 1 commit into from
Nov 26, 2024
Merged
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
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still believe this might be a tad high for simtests but let's see.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this won't be hit that much in simtests but this can't be lower than consensus_max_transaction_size_bytes. We may need to update the logic in benchmark driver to hit the block size limit consistently.

} 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
Loading