-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(starknet_os,starknet_patricia,starknet_committer): deserializabl…
…e commitment info
- Loading branch information
1 parent
1819f6e
commit 26bbea3
Showing
12 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,27 @@ | ||
use std::collections::HashMap; | ||
|
||
use starknet_committer::block_committer::input::StarknetStorageValue; | ||
use starknet_committer::patricia_merkle_tree::leaf::leaf_impl::ContractState; | ||
use starknet_committer::patricia_merkle_tree::types::CompiledClassHash; | ||
use starknet_patricia::hash::hash_trait::HashOutput; | ||
use starknet_patricia::patricia_merkle_tree::node_data::inner_node::NodeData; | ||
use starknet_patricia::patricia_merkle_tree::node_data::leaf::Leaf; | ||
use starknet_patricia::patricia_merkle_tree::types::SubTreeHeight; | ||
|
||
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] | ||
pub struct CommitmentInfo<L: Leaf> { | ||
_previous_root: HashOutput, | ||
_updated_root: HashOutput, | ||
_tree_height: SubTreeHeight, | ||
_commitment_facts: HashMap<HashOutput, NodeData<L>>, | ||
} | ||
|
||
/// All input needed to initialize the execution helper. | ||
// TODO(Dori): Add all fields needed to compute commitments, initialize a CachedState and other data | ||
// required by the execution helper. | ||
pub struct StarknetOsInput {} | ||
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] | ||
pub struct StarknetOsInput { | ||
_contract_commitments: CommitmentInfo<ContractState>, | ||
_storage_commitments: CommitmentInfo<StarknetStorageValue>, | ||
_class_commitments: CommitmentInfo<CompiledClassHash>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters