Skip to content

Commit ae16ec9

Browse files
starknet_api: add fee_proposal to BlockHeaderWithoutHash
1 parent bd0d2c5 commit ae16ec9

6 files changed

Lines changed: 10 additions & 0 deletions

File tree

crates/apollo_p2p_sync/src/client/test.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ fn create_random_sync_block(
345345
sequencer,
346346
l1_da_mode,
347347
starknet_version,
348+
fee_proposal,
348349
} = BlockHeaderWithoutHash::get_test_instance(&mut rng);
349350
let block_header_without_hash = BlockHeaderWithoutHash {
350351
block_number,
@@ -359,6 +360,7 @@ fn create_random_sync_block(
359360
sequencer,
360361
l1_da_mode,
361362
starknet_version,
363+
fee_proposal,
362364
};
363365
let block_header_commitments = BlockHeaderCommitments::get_test_instance(&mut rng);
364366
SyncBlock {

crates/apollo_protobuf/src/converters/header.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use starknet_api::block::{
99
BlockHeaderWithoutHash,
1010
BlockNumber,
1111
BlockSignature,
12+
GasPrice,
1213
GasPricePerToken,
1314
StarknetVersion,
1415
};
@@ -205,6 +206,7 @@ impl TryFrom<protobuf::SignedBlockHeader> for SignedBlockHeader {
205206
timestamp,
206207
l1_da_mode,
207208
starknet_version,
209+
fee_proposal: GasPrice::default(),
208210
},
209211
state_diff_commitment,
210212
state_diff_length,

crates/apollo_starknet_client/src/reader/objects/block.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ impl Block {
342342
l1_data_gas_price: self.l1_data_gas_price(),
343343
l1_da_mode: self.l1_da_mode(),
344344
starknet_version: self.starknet_version(),
345+
fee_proposal: GasPrice::default(),
345346
},
346347
state_diff_commitment: self.state_diff_commitment(),
347348
transaction_commitment,

crates/apollo_storage/src/header.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ impl<Mode: TransactionKind> HeaderStorageReader for StorageTxn<'_, Mode> {
225225
timestamp: block_header.timestamp,
226226
l1_da_mode: block_header.l1_da_mode,
227227
starknet_version,
228+
fee_proposal: GasPrice::default(),
228229
},
229230
state_diff_commitment: block_header.state_diff_commitment,
230231
transaction_commitment: block_header.transaction_commitment,
@@ -429,6 +430,7 @@ impl HeaderStorageWriter for StorageTxn<'_, RW> {
429430
timestamp: reverted_header.timestamp,
430431
l1_da_mode: reverted_header.l1_da_mode,
431432
starknet_version,
433+
fee_proposal: GasPrice::default(),
432434
},
433435
state_diff_commitment: reverted_header.state_diff_commitment,
434436
transaction_commitment: reverted_header.transaction_commitment,

crates/apollo_test_utils/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ auto_impl_get_test_instance! {
450450
pub timestamp: BlockTimestamp,
451451
pub l1_da_mode: L1DataAvailabilityMode,
452452
pub starknet_version: StarknetVersion,
453+
pub fee_proposal: GasPrice,
453454
}
454455
pub struct BlockHeaderCommitments {
455456
pub transaction_commitment: TransactionCommitment,

crates/starknet_api/src/block.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ pub struct BlockHeaderWithoutHash {
241241
pub timestamp: BlockTimestamp,
242242
pub l1_da_mode: L1DataAvailabilityMode,
243243
pub starknet_version: StarknetVersion,
244+
/// SNIP-35: proposer's oracle-derived recommended fee.
245+
pub fee_proposal: GasPrice,
244246
}
245247

246248
/// The [transactions](`crate::transaction::Transaction`) and their

0 commit comments

Comments
 (0)