-
Notifications
You must be signed in to change notification settings - Fork 28
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
chore(blockifier): impl deserialize for versioned_constants #2838
chore(blockifier): impl deserialize for versioned_constants #2838
Conversation
57f261a
to
bd08cac
Compare
9b7c19f
to
5214bf3
Compare
bd08cac
to
389ca2b
Compare
5214bf3
to
813f4d2
Compare
389ca2b
to
4912cfd
Compare
813f4d2
to
4f26fc6
Compare
4912cfd
to
87a65a1
Compare
8e3dacd
to
0c59b84
Compare
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.
Reviewable status: 0 of 7 files reviewed, 1 unresolved discussion (waiting on @noaov1 and @Yonatan-Starkware)
crates/blockifier/src/versioned_constants.rs
line 458 at r2 (raw file):
.get_syscall_gas_cost(&SyscallSelector::Secp256r1New), keccak: versioned_constants.get_syscall_gas_cost(&SyscallSelector::Keccak), keccak_round_cost: 180000,
Is the keccak fix in the next PR? I think it should be before this PR or in this PR.
Code quote:
keccak: versioned_constants.get_syscall_gas_cost(&SyscallSelector::Keccak),
keccak_round_cost: 180000,
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.
Reviewed 1 of 1 files at r2.
Reviewable status: 1 of 7 files reviewed, 1 unresolved discussion (waiting on @noaov1 and @Yonatan-Starkware)
Previously, meship-starkware (Meshi Peled) wrote…
In the next PR. It is not really matter as long as the os_constants are still in the json. |
dfa3538
to
3f2d271
Compare
3f2d271
to
380967f
Compare
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.
Reviewed 6 of 7 files at r4, 6 of 6 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @noaov1)
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.
Reviewed 6 of 6 files at r3, 1 of 7 files at r4, 6 of 6 files at r5, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @Yonatan-Starkware)
crates/blockifier/resources/versioned_constants_0_13_0.json
line 106 at r5 (raw file):
"entry_point_initial_budget": 1, "step_gas_cost": 600 },
Next time- better to do it in a separate PR :)
Code quote:
"fee_transfer_gas_cost": {
"entry_point_initial_budget": 1,
"step_gas_cost": 600
},
crates/blockifier/src/versioned_constants.rs
line 416 at r5 (raw file):
let syscall_gas_costs = &(versioned_constants.os_constants.gas_costs.syscalls); if syscall_gas_costs == &SyscallGasCosts::default() {
What does ensure that we have a default value when the field is missing?
What will happen here?
Code quote:
if syscall_gas_costs == &SyscallGasCosts::default() {
crates/blockifier/src/versioned_constants.rs
line 459 at r5 (raw file):
.get_syscall_gas_cost(&SyscallSelector::Secp256r1New), keccak: versioned_constants.get_syscall_gas_cost(&SyscallSelector::Keccak), keccak_round_cost: 180000,
What does 180000 represent?
Suggestion:
//TODO(Yonatan): Remove the default value.
keccak_round_cost: 180000,
Previously, noaov1 (Noa Oved) wrote…
It was. Meshi merged it into this one. |
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.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @Yonatan-Starkware)
crates/blockifier/src/versioned_constants.rs
line 416 at r5 (raw file):
Previously, noaov1 (Noa Oved) wrote…
What does ensure that we have a default value when the field is missing?
What will happen here?
I just saw the added code. Great!
Previously, noaov1 (Noa Oved) wrote…
It is the only object in the syscall_gas_costs that does not have a parallel in the os_resources. So I just give it the appropriate value. |
No description provided.