-
Notifications
You must be signed in to change notification settings - Fork 107
Fix actual fee for l1 handler: it equals the L2 cost. #1210
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1210 +/- ##
==========================================
+ Coverage 70.39% 70.51% +0.11%
==========================================
Files 58 58
Lines 7131 7159 +28
Branches 7131 7159 +28
==========================================
+ Hits 5020 5048 +28
Misses 1692 1692
Partials 419 419 ☔ View full report in Codecov by Sentry. |
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 2 files at r1, all commit messages.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @noaov1 and @Yoni-Starkware)
crates/blockifier/src/transaction/transactions_test.rs
line 1402 at r1 (raw file):
TransactionExecutionError::TransactionFeeError( TransactionFeeError::InsufficientL1Fee { paid_fee, actual_fee, }) if paid_fee == Fee(0) && actual_fee == Fee(1732700000000000)
isn't this misleading...? the max_fee is 1
Code quote:
1732700000000000
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: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware and @Yoni-Starkware)
crates/blockifier/src/transaction/transactions_test.rs
line 1402 at r1 (raw file):
Previously, dorimedini-starkware wrote…
isn't this misleading...? the max_fee is
1
Where do you see that max_fee = 1
?
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: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @noaov1 and @Yoni-Starkware)
crates/blockifier/src/transaction/transactions_test.rs
line 1330 at r1 (raw file):
let value = StarkFelt::from_u128(0x44); let calldata = calldata![from_address, key, value]; let tx = l1_handler_tx(&calldata, Fee(1));
@noaov1
If max_fee=1 and actual_fee>1 I would expect an error... no?
Code quote:
let tx = l1_handler_tx(&calldata, Fee(1));
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: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @noaov1 and @Yoni-Starkware)
crates/blockifier/src/transaction/transactions_test.rs
line 1402 at r1 (raw file):
Previously, noaov1 (Noa Oved) wrote…
Where do you see that
max_fee = 1
?
tagged you
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: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @noaov1 and @Yoni-Starkware)
crates/blockifier/src/transaction/transactions_test.rs
line 1403 at r1 (raw file):
TransactionFeeError::InsufficientL1Fee { paid_fee, actual_fee, }) if paid_fee == Fee(0) && actual_fee == Fee(1732700000000000) );
I don't follow the logic.
If paid_fee
is 1
, the tx is successful; but if it's zero, we get this error, which seems to indicate only a minimum of paid_fee=1732700000000000
would allow the tx to pass.
Is this just future-preparation for when the error is more meaningful?
Code quote:
TransactionExecutionError::TransactionFeeError(
TransactionFeeError::InsufficientL1Fee { paid_fee, actual_fee, })
if paid_fee == Fee(0) && actual_fee == Fee(1732700000000000)
);
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: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware and @Yoni-Starkware)
crates/blockifier/src/transaction/transactions_test.rs
line 1330 at r1 (raw file):
Previously, dorimedini-starkware wrote…
@noaov1
If max_fee=1 and actual_fee>1 I would expect an error... no?
Fee(1)
is the fee paid on l1. Currently, we only verify it is positive. L1 handlers do not have a max_fee
field. We set it to 0 (in the account_tx_context
for our own use.
In the future: we will verify paid_fee_on_l1 >= required_fee_on_l2
.
crates/blockifier/src/transaction/transactions_test.rs
line 1403 at r1 (raw file):
Previously, dorimedini-starkware wrote…
I don't follow the logic.
Ifpaid_fee
is1
, the tx is successful; but if it's zero, we get this error, which seems to indicate only a minimum ofpaid_fee=1732700000000000
would allow the tx to pass.
Is this just future-preparation for when the error is more meaningful?
Yes
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 2 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Yoni-Starkware)
* make world upgradeable * update records_contract address
This change is