-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add branch node creation (with proofs)
- Loading branch information
Showing
18 changed files
with
371 additions
and
103 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -11,4 +11,5 @@ pub mod ssz; | |
mod stem; | ||
mod trie_key; | ||
mod trie_value; | ||
pub(crate) mod utils; | ||
pub mod verkle; |
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use std::array; | ||
|
||
use crate::constants::{PORTAL_NETWORK_NODE_WIDTH, VERKLE_NODE_WIDTH}; | ||
|
||
/// Creates the array that has [VERKLE_NODE_WIDTH] length. | ||
pub fn array_long<T>(f: impl Fn(u8) -> T) -> [T; VERKLE_NODE_WIDTH] { | ||
array::from_fn(|index| f(index as u8)) | ||
} | ||
|
||
pub fn array_long_const<T: Clone>(value: T) -> [T; VERKLE_NODE_WIDTH] { | ||
array_long(|_| value.clone()) | ||
} | ||
|
||
/// Creates the array that has [PORTAL_NETWORK_NODE_WIDTH] length. | ||
pub fn array_short<T>(f: impl Fn(u8) -> T) -> [T; PORTAL_NETWORK_NODE_WIDTH] { | ||
array::from_fn(|index| f(index as u8)) | ||
} |
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
Oops, something went wrong.