Skip to content

Commit 87e0de3

Browse files
apollo_state_sync_types: add storage request/response types (#10390)
1 parent 6e24870 commit 87e0de3

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

crates/apollo_state_sync_types/src/state_sync_types.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use serde::{Deserialize, Serialize};
2-
use starknet_api::block::BlockHeaderWithoutHash;
2+
use starknet_api::block::{BlockHeader, BlockHeaderWithoutHash, BlockNumber};
33
use starknet_api::state::ThinStateDiff;
44
use starknet_api::transaction::TransactionHash;
55

@@ -30,3 +30,19 @@ impl SyncBlock {
3030
.collect()
3131
}
3232
}
33+
34+
// TODO(Dean): Fill in with actual storage table names and operations.
35+
/// Storage-related requests for state sync.
36+
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
37+
pub enum StateSyncStorageRequest {
38+
/// Request to read data in Table1 for the given block height.
39+
Table1Replacer(BlockNumber),
40+
}
41+
42+
// TODO(Dean): Fill in with actual response types matching the request variants.
43+
/// Response for state sync storage requests.
44+
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
45+
pub enum StateSyncStorageResponse {
46+
/// Table1 data for the requested operation.
47+
Table1Replacer(BlockHeader),
48+
}

0 commit comments

Comments
 (0)