Skip to content

starknet_api: add fee_proposal to BlockHeaderWithoutHash#13811

Closed
sirandreww-starkware wants to merge 1 commit into
04-19-apollo_protobuf_add_fee_proposal_to_proposalinit_and_l2gasinfofrom
04-19-starknet_api_add_fee_proposal_to_blockheaderwithouthash
Closed

starknet_api: add fee_proposal to BlockHeaderWithoutHash#13811
sirandreww-starkware wants to merge 1 commit into
04-19-apollo_protobuf_add_fee_proposal_to_proposalinit_and_l2gasinfofrom
04-19-starknet_api_add_fee_proposal_to_blockheaderwithouthash

Conversation

@sirandreww-starkware
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor Author

sirandreww-starkware commented Apr 19, 2026

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_blockheaderwithouthash branch from 1419739 to f346ddf Compare April 26, 2026 13:26
@sirandreww-starkware sirandreww-starkware force-pushed the 04-26-starknet_api_add_blockhashversion_v0_14_3_variant branch from 459b11b to 18edaf1 Compare April 26, 2026 13:26
Copy link
Copy Markdown
Contributor Author

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sirandreww-starkware made 1 comment.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on ShahakShama).

timestamp: block_header.timestamp,
l1_da_mode: block_header.l1_da_mode,
starknet_version,
fee_proposal: GasPrice::default(),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solved #13813

@sirandreww-starkware sirandreww-starkware force-pushed the 04-26-starknet_api_add_blockhashversion_v0_14_3_variant branch from 18edaf1 to fba7ec9 Compare April 26, 2026 16:24
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_blockheaderwithouthash branch from f346ddf to 946497d Compare April 26, 2026 16:24
@sirandreww-starkware sirandreww-starkware force-pushed the 04-26-starknet_api_add_blockhashversion_v0_14_3_variant branch from fba7ec9 to 3ed5828 Compare April 26, 2026 17:17
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_blockheaderwithouthash branch from 946497d to 2b22515 Compare April 26, 2026 17:17
pub l1_da_mode: L1DataAvailabilityMode,
pub starknet_version: StarknetVersion,
/// SNIP-35: proposer's oracle-derived recommended fee.
pub fee_proposal: GasPrice,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing serde default breaks deserialization of older data

Medium Severity

The new fee_proposal field on BlockHeaderWithoutHash lacks a #[serde(default)] attribute. This struct is embedded in SyncBlock, which is serialized/deserialized in StateSyncRequest and StateSyncResponse for inter-process communication. During rolling deployments, an older component producing a serialized SyncBlock without fee_proposal will cause deserialization failures on newer components, since serde requires the field to be present unless a default is specified.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2b22515. Configure here.

@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_blockheaderwithouthash branch from 2b22515 to 645e3f3 Compare April 27, 2026 08:06
@sirandreww-starkware sirandreww-starkware force-pushed the 04-26-starknet_api_add_blockhashversion_v0_14_3_variant branch from 3ed5828 to 1fa271d Compare April 27, 2026 08:06
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 645e3f3. Configure here.

timestamp,
l1_da_mode,
starknet_version,
fee_proposal: GasPrice::default(),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fee_proposal not serialized in protobuf conversion

Medium Severity

The fee_proposal field is not included in the From<(BlockHeader, Vec<BlockSignature>)> for protobuf::SignedBlockHeader serialization (around line 246–292), and on deserialization it is hardcoded to GasPrice::default(). This means any non-default fee_proposal will be silently lost during P2P block header exchange, causing peers to always see a zero value.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 645e3f3. Configure here.

@sirandreww-starkware sirandreww-starkware changed the base branch from 04-26-starknet_api_add_blockhashversion_v0_14_3_variant to graphite-base/13811 April 27, 2026 10:26
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_blockheaderwithouthash branch from 645e3f3 to ae16ec9 Compare April 27, 2026 10:31
@sirandreww-starkware sirandreww-starkware changed the base branch from graphite-base/13811 to 04-26-starknet_api_add_blockhashversion_v0_14_3_variant April 27, 2026 10:32
@sirandreww-starkware sirandreww-starkware force-pushed the 04-26-starknet_api_add_blockhashversion_v0_14_3_variant branch from bd0d2c5 to e8a6182 Compare April 27, 2026 10:37
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_blockheaderwithouthash branch 3 times, most recently from e980905 to 963c3a6 Compare April 27, 2026 12:39
@sirandreww-starkware sirandreww-starkware changed the base branch from 04-26-starknet_api_add_blockhashversion_v0_14_3_variant to graphite-base/13811 April 27, 2026 12:54
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_blockheaderwithouthash branch from 963c3a6 to 3b4a2a3 Compare April 27, 2026 12:54
@sirandreww-starkware sirandreww-starkware changed the base branch from graphite-base/13811 to 04-19-apollo_protobuf_add_fee_proposal_to_proposalinit_and_l2gasinfo April 27, 2026 12:54
@github-actions
Copy link
Copy Markdown

Artifacts upload workflows:

@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_protobuf_add_fee_proposal_to_proposalinit_and_l2gasinfo branch from c349cad to ba14202 Compare April 28, 2026 07:38
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-starknet_api_add_fee_proposal_to_blockheaderwithouthash branch from 3b4a2a3 to c83c0d6 Compare April 28, 2026 07:38
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants