-
Notifications
You must be signed in to change notification settings - Fork 21
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
build(fee): current tx_info holds validResourceBounds #505
build(fee): current tx_info holds validResourceBounds #505
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @nimrod-starkware and the rest of your teammates on Graphite |
fd9e97e
to
24e0819
Compare
6c04dce
to
643aa9e
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 5 files reviewed, 4 unresolved discussions (waiting on @dorimedini-starkware and @TzahiTaub)
crates/blockifier/src/execution/syscalls/hint_processor.rs
line 480 at r1 (raw file):
l2_gas_as_felt, Felt::ZERO, Felt::ZERO,
WDYT?
l2_gas should always be zero.
Code quote:
l2_gas_as_felt,
Felt::ZERO,
Felt::ZERO,
crates/blockifier/src/transaction/transactions.rs
line 299 at r1 (raw file):
TransactionInfo::Current(CurrentTransactionInfo { common_fields, resource_bounds: tx.resource_bounds.0.clone().try_into().expect("todo"),
treated in an upper branch on the stack
Code quote:
try_into().expect("todo")
crates/blockifier/src/transaction/transactions.rs
line 404 at r1 (raw file):
TransactionInfo::Current(CurrentTransactionInfo { common_fields, resource_bounds: tx.resource_bounds.0.clone().try_into().expect("todo"),
ditto
Code quote:
0.clone().try_into().expect("todo"),
crates/blockifier/src/transaction/transactions.rs
line 522 at r1 (raw file):
TransactionInfo::Current(CurrentTransactionInfo { common_fields, resource_bounds: tx.resource_bounds.0.clone().try_into().expect("todo"),
ditto
Code quote:
.0.clone().try_into().expect("todo"),
643aa9e
to
dfa48cb
Compare
24e0819
to
b1beef0
Compare
dfa48cb
to
284b275
Compare
b1beef0
to
8139ddb
Compare
5c1091f
to
656eb85
Compare
8139ddb
to
59b3b0b
Compare
69c29c6
to
c8be06a
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 2 of 5 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @nimrod-starkware, @noaov1, and @TzahiTaub)
crates/blockifier/src/execution/syscalls/hint_processor.rs
line 480 at r1 (raw file):
Previously, nimrod-starkware wrote…
WDYT?
l2_gas should always be zero.
I like it.
@noaov1 ?
crates/blockifier/src/execution/syscalls/hint_processor.rs
line 209 at r2 (raw file):
pub const L2_GAS: &str = "0x00000000000000000000000000000000000000000000000000004c325f474153"; // "L1_DATA_GAS" pub const L1_DATA_GAS: &str = "0x0000000000000000000000000000000000000000004c315f444154415f474153";
how did you compute this?
i see there is no test for these values... is it simple to add?
Code quote:
// "L1_DATA_GAS"
pub const L1_DATA_GAS: &str = "0x0000000000000000000000000000000000000000004c315f444154415f474153";
crates/blockifier/src/transaction/objects.rs
line 142 at r2 (raw file):
match self.resource_bounds { ValidResourceBounds::L1Gas(bounds) => Ok(bounds), ValidResourceBounds::AllResources { .. } => todo!(),
why todo? you can implement now
Suggestion:
ValidResourceBounds::AllResources { l1_gas, .. } => l1_gas,
crates/blockifier/src/transaction/transactions.rs
line 299 at r1 (raw file):
Previously, nimrod-starkware wrote…
treated in an upper branch on the stack
I think it's redundant... you can implement this in this PR,
however if this messes up your stack, LMK and I'll unblock
crates/blockifier/src/transaction/transactions.rs
line 404 at r1 (raw file):
Previously, nimrod-starkware wrote…
ditto
ditto
crates/blockifier/src/transaction/transactions.rs
line 522 at r1 (raw file):
Previously, nimrod-starkware wrote…
ditto
ditto
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, 6 unresolved discussions (waiting on @nimrod-starkware, @noaov1, and @TzahiTaub)
crates/blockifier/src/transaction/objects.rs
line 142 at r2 (raw file):
Previously, dorimedini-starkware wrote…
why todo? you can implement now
also, I see it isn't implemented at the top of the stack either
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, 7 unresolved discussions (waiting on @nimrod-starkware, @noaov1, and @TzahiTaub)
crates/blockifier/src/transaction/objects.rs
line 144 at r2 (raw file):
ValidResourceBounds::AllResources { .. } => todo!(), } }
this function always succeeds (or panics, but after implementing you will always succeed).
No need to return a Result
Suggestion:
pub fn l1_resource_bounds(&self) -> ResourceBounds {
match self.resource_bounds {
ValidResourceBounds::L1Gas(bounds) => bounds,
ValidResourceBounds::AllResources { .. } => todo!(),
}
}
59b3b0b
to
f902df7
Compare
c8be06a
to
fa091b8
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: all files reviewed, 3 unresolved discussions (waiting on @dorimedini-starkware, @nimrod-starkware, @noaov1, and @TzahiTaub)
crates/mempool_test_utils/src/starknet_api_test_utils.rs
line 52 at r12 (raw file):
Previously, nimrod-starkware wrote…
I reverted
VALID_L2_GAS_MAX_AMOUNT
&VALID_L2_GAS_MAX_PRICE_PER_UNIT
.
VALID_L1_DATA_GAS_MAX_AMOUNT
&VALID_L1_DATA_GAS_MAX_PRICE_PER_UNIT
is a copy paste.
IDK if it makes sense... @MohammadNassar1 ?
These are the values used for testing, specifically the L2 values that I recently added.
We used these values to establish resource bounds for testing. I believe no change is necessary here.
abe3c27
to
394bd85
Compare
ab8f232
to
00cdc07
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 5 of 5 files at r14, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @MohammadNassar1, @nimrod-starkware, @noaov1, and @TzahiTaub)
00cdc07
to
582f4b3
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 3 of 3 files at r15, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @MohammadNassar1, @nimrod-starkware, @noaov1, and @TzahiTaub)
crates/blockifier/src/execution/syscalls/hint_processor.rs
line 209 at r15 (raw file):
pub const L2_GAS: &str = "0x00000000000000000000000000000000000000000000000000004c325f474153"; // "L1_DATA"; pub const L1_DATA: &str = "0x000000000000000000000000000000000000000000000000004c315f44415441";
why drop the _GAS
?
Code quote:
// "L1_DATA";
pub const L1_DATA: &str = "0x000000000000000000000000000000000000000000000000004c315f44415441";
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 @AvivYossef-starkware, @MohammadNassar1, @noaov1, and @TzahiTaub)
crates/blockifier/src/execution/syscalls/hint_processor.rs
line 209 at r15 (raw file):
Previously, dorimedini-starkware wrote…
why drop the
_GAS
?
Discussed it with @AvivYossef-starkware .
L1_DATA_GAS
introduces some overflow (he can explain better what that is)
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 @AvivYossef-starkware, @MohammadNassar1, @nimrod-starkware, @noaov1, and @TzahiTaub)
crates/blockifier/src/execution/syscalls/hint_processor.rs
line 209 at r15 (raw file):
Previously, nimrod-starkware wrote…
Discussed it with @AvivYossef-starkware .
L1_DATA_GAS
introduces some overflow (he can explain better what that is)
@AvivYossef-starkware can you explain?
394bd85
to
49b37f8
Compare
582f4b3
to
cf259fe
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 2 of 2 files at r16, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @AvivYossef-starkware, @MohammadNassar1, @nimrod-starkware, @noaov1, and @TzahiTaub)
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 @dorimedini-starkware, @MohammadNassar1, @nimrod-starkware, @noaov1, and @TzahiTaub)
crates/blockifier/src/execution/syscalls/hint_processor.rs
line 209 at r15 (raw file):
Previously, dorimedini-starkware wrote…
@AvivYossef-starkware can you explain?
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, 2 unresolved discussions (waiting on @MohammadNassar1, @nimrod-starkware, @noaov1, and @TzahiTaub)
crates/blockifier/src/execution/syscalls/hint_processor.rs
line 209 at r15 (raw file):
Previously, AvivYossef-starkware wrote…
wow
hidden very well
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: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)
49b37f8
to
bdc4204
Compare
cf259fe
to
50712c6
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 1 of 1 files at r17, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)
Merge activity
|
50712c6
to
6364dcd
Compare
This change is