-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Update bhsh bench #2456
base: add_zk_opcodes
Are you sure you want to change the base?
Update bhsh bench #2456
Conversation
fn add_blocks(&mut self, nb_blocks: u32) { | ||
for i in 1..=nb_blocks { | ||
let block = | ||
fuel_core::service::genesis::create_genesis_block(&Config::local_node()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qq: why are we inserting multiple genesis blocks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this is the only helpers that we have here and it doesn't change anything for our benchmarks has we never read the value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if the block were 256KB and we tried to get the height for one of them=)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One block = 256KB or the total of blocks is 256KB ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I don't understand what a bigger block will change because we just get the id field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each block 256KB. With the current implementation it changes nothing, but in the future if we change the implementation, it can be useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okok idk how to build blocks with a specific size but will try (if you read this and know directly tell meeee) :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add one transaction with very huge script data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -8,7 +8,7 @@ pub fn default_gas_costs() -> GasCostsValues { | |||
andi: 2, | |||
bal: 274, | |||
bhei: 2, | |||
bhsh: 2, | |||
bhsh: 32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how has this been calculated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the benchmark I modified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant what steps did you follow to get this value? Asking for knowledge sharing purposes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found it pretty well explained here : https://github.com/FuelLabs/fuel-core/blob/master/benches/README.md
However a little trick that green told me is to comment all the other vm opcode benches to win some time (except noop
that is required as a base). Maybe we should mark it in the readme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.
Linked Issues/PRs
#2237
Description
This PR is on top of
add_zk_opcodes
so that the change of gas cost will be efective with the newGasCostsValueV5
. The benchmark was incorrect because offuel-core/crates/storage/src/vm_storage.rs
Line 291 in afbfef2
0
. If we use theDBBench
it works because the block height used is 1. However, if we want to add blocks in the db we also need theDBBench
to use an higher block height. This PR solves all of this.This PR also simplify and comment the preparation code.
Checklist
Before requesting review
After merging, notify other teams
[Add or remove entries as needed]