Skip to content

Commit bc634a0

Browse files
apollo_gateway: add missing fields to block header (#11373)
1 parent 007afff commit bc634a0

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

crates/apollo_gateway/src/rpc_objects.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ use starknet_api::block::{
1010
GasPricePerToken,
1111
NonzeroGasPrice,
1212
};
13-
use starknet_api::core::{ClassHash, ContractAddress, GlobalRoot};
13+
use starknet_api::core::{
14+
ClassHash,
15+
ContractAddress,
16+
EventCommitment,
17+
GlobalRoot,
18+
ReceiptCommitment,
19+
StateDiffCommitment,
20+
TransactionCommitment,
21+
};
1422
use starknet_api::data_availability::L1DataAvailabilityMode;
1523
use starknet_api::state::StorageKey;
1624

@@ -79,6 +87,13 @@ pub struct BlockHeader {
7987
pub l2_gas_price: GasPricePerToken,
8088
pub l1_da_mode: L1DataAvailabilityMode,
8189
pub starknet_version: String,
90+
pub state_diff_commitment: StateDiffCommitment,
91+
pub event_commitment: EventCommitment,
92+
pub receipt_commitment: ReceiptCommitment,
93+
pub transaction_commitment: TransactionCommitment,
94+
pub transaction_count: usize,
95+
pub event_count: usize,
96+
pub state_diff_length: usize,
8297
}
8398

8499
impl TryInto<BlockInfo> for BlockHeader {

crates/blockifier_reexecution/resources/raw_rpc_json_objects/block_header.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"block_hash": "0x29851b3a78e95b3c9469ea53c0ca902f4df92be129f1929fdb4dde0eb0cda4c",
33
"block_number": 700000,
4+
"event_commitment": "0x4a70040dd6cabd1dc4d4fc281b684874da313f7cee585e0ea3a3a80e41f9886",
5+
"event_count": 111,
46
"l1_da_mode": "BLOB",
57
"l1_data_gas_price": {
68
"price_in_fri": "0x1459",
@@ -16,10 +18,15 @@
1618
},
1719
"new_root": "0x2c82376b7e0d7cddec192d51198bb74b96ee5aaf94268cbc15ae7551adf502",
1820
"parent_hash": "0x7f1f233dee2c50193842d0f6af87695d7d8b26292d0e70e349df4d71b2f9398",
21+
"receipt_commitment": "0x73abbd6d1c05efebc18c6e4f617f30f84292cf2708a65fbe8d46758408a100b",
1922
"sequencer_address": "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8",
2023
"starknet_version": "0.13.2.1",
24+
"state_diff_commitment": "0x4f476534289cfa3180491d4fa09e1c17178f0cfb18fbbdd56c53d920b04cf73",
25+
"state_diff_length": 106,
2126
"status": "ACCEPTED_ON_L1",
2227
"timestamp": 1725724084,
28+
"transaction_commitment": "0xf3d30cd56a98456371414ba479ff4bf066dd96104583ff27c218805aa1170",
29+
"transaction_count": 10,
2330
"transactions": [
2431
"0x47165a9a9c97e8829a4778f2a4b6fae4366aefc35b51d484bf04c458168351b",
2532
"0x57c0b8578fc39ae6ddadfec8973861f0481f9b056c2c6cbf682c8388ccf70e0",
@@ -32,4 +39,4 @@
3239
"0x797cbf65f46fa84e738e99d56a938a344414166e30091a9bf0dbaba01f71b32",
3340
"0xa7c7db686c7f756ceb7ca85a759caef879d425d156da83d6a836f86851983"
3441
]
35-
}
42+
}

0 commit comments

Comments
 (0)