From b29fed56c3d197ce97f379c3856ef2bddc148c82 Mon Sep 17 00:00:00 2001 From: Maxim Evtush <154841002+maximevtush@users.noreply.github.com> Date: Tue, 11 Feb 2025 09:31:05 +0100 Subject: [PATCH 1/4] Update zk_trie_node.go --- trie/zk_trie_node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trie/zk_trie_node.go b/trie/zk_trie_node.go index 51921de..6419e68 100644 --- a/trie/zk_trie_node.go +++ b/trie/zk_trie_node.go @@ -99,7 +99,7 @@ type Node struct { ChildR *zkt.Hash // NodeKey is the node's key stored in a leaf node. NodeKey *zkt.Hash - // ValuePreimage can store at most 256 byte32 as fields (represnted by BIG-ENDIAN integer) + // ValuePreimage can store at most 256 byte32 as fields (represented by BIG-ENDIAN integer) // and the first 24 can be compressed (each bytes32 consider as 2 fields), in hashing the compressed // elemments would be calculated first ValuePreimage []zkt.Byte32 From e219ba84d753d70f3044bd4273337619fe07b0f0 Mon Sep 17 00:00:00 2001 From: Maxim Evtush <154841002+maximevtush@users.noreply.github.com> Date: Tue, 11 Feb 2025 09:31:34 +0100 Subject: [PATCH 2/4] Update types.rs --- rs_zktrie/src/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rs_zktrie/src/types.rs b/rs_zktrie/src/types.rs index dbdb068..10d18fe 100644 --- a/rs_zktrie/src/types.rs +++ b/rs_zktrie/src/types.rs @@ -112,7 +112,7 @@ pub struct Node { pub child_right: Option, // key is the node's key stored in a leaf node. pub node_key: H, - // value_preimage can store at most 256 byte32 as fields (represnted by BIG-ENDIAN integer) + // value_preimage can store at most 256 byte32 as fields (represented by BIG-ENDIAN integer) // and the first 24 can be compressed (each bytes32 consider as 2 fields), in hashing the compressed // elemments would be calculated first pub value_preimage: Vec<[u8; 32]>, From 445d73674a8398614a561c333951ea4e3455bdf9 Mon Sep 17 00:00:00 2001 From: Maxim Evtush <154841002+maximevtush@users.noreply.github.com> Date: Tue, 11 Feb 2025 09:32:07 +0100 Subject: [PATCH 3/4] Update zk_trie.go --- trie/zk_trie.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trie/zk_trie.go b/trie/zk_trie.go index fc6ea25..a4a68c8 100644 --- a/trie/zk_trie.go +++ b/trie/zk_trie.go @@ -145,7 +145,7 @@ func (t *ZkTrie) Copy() *ZkTrie { } } -// Prove is a simlified calling of ProveWithDeletion +// Prove is a simplified calling of ProveWithDeletion func (t *ZkTrie) Prove(key []byte, fromLevel uint, writeNode func(*Node) error) error { return t.ProveWithDeletion(key, fromLevel, writeNode, nil) } From edf067293e32bf51040b494d41fc6e70d91b4f6d Mon Sep 17 00:00:00 2001 From: Maxim Evtush <154841002+maximevtush@users.noreply.github.com> Date: Tue, 11 Feb 2025 09:32:44 +0100 Subject: [PATCH 4/4] Update rs_lib.rs --- src/rs_lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rs_lib.rs b/src/rs_lib.rs index 73ba0bb..563498e 100644 --- a/src/rs_lib.rs +++ b/src/rs_lib.rs @@ -77,7 +77,7 @@ impl ZkTrieNode { self.trie_node .clone() .node_hash() - .expect("has caluclated") + .expect("has calculated") .as_ref() .try_into() .expect("same length")