-
Notifications
You must be signed in to change notification settings - Fork 75
starknet_api: add fee_proposal to BlockHeaderWithoutHash #13811
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -225,6 +225,7 @@ impl<Mode: TransactionKind> HeaderStorageReader for StorageTxn<'_, Mode> { | |
| timestamp: block_header.timestamp, | ||
| l1_da_mode: block_header.l1_da_mode, | ||
| starknet_version, | ||
| fee_proposal: GasPrice::default(), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fee_proposal silently lost during storage round-tripHigh Severity The new Additional Locations (1)Reviewed by Cursor Bugbot for commit 1419739. Configure here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. solved #13813 |
||
| }, | ||
| state_diff_commitment: block_header.state_diff_commitment, | ||
| transaction_commitment: block_header.transaction_commitment, | ||
|
|
@@ -429,6 +430,7 @@ impl HeaderStorageWriter for StorageTxn<'_, RW> { | |
| timestamp: reverted_header.timestamp, | ||
| l1_da_mode: reverted_header.l1_da_mode, | ||
| starknet_version, | ||
| fee_proposal: GasPrice::default(), | ||
| }, | ||
| state_diff_commitment: reverted_header.state_diff_commitment, | ||
| transaction_commitment: reverted_header.transaction_commitment, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -241,6 +241,8 @@ pub struct BlockHeaderWithoutHash { | |
| pub timestamp: BlockTimestamp, | ||
| pub l1_da_mode: L1DataAvailabilityMode, | ||
| pub starknet_version: StarknetVersion, | ||
| /// SNIP-35: proposer's oracle-derived recommended fee. | ||
| pub fee_proposal: GasPrice, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing serde default breaks deserialization of older dataMedium Severity The new Reviewed by Cursor Bugbot for commit 2b22515. Configure here. |
||
| } | ||
|
|
||
| /// The [transactions](`crate::transaction::Transaction`) and their | ||
|
|
||


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.
fee_proposalnot serialized in protobuf conversionMedium Severity
The
fee_proposalfield is not included in theFrom<(BlockHeader, Vec<BlockSignature>)> for protobuf::SignedBlockHeaderserialization (around line 246–292), and on deserialization it is hardcoded toGasPrice::default(). This means any non-defaultfee_proposalwill be silently lost during P2P block header exchange, causing peers to always see a zero value.Reviewed by Cursor Bugbot for commit 645e3f3. Configure here.