From 16498cc46b93046819e932bdb3ee1488a9a74620 Mon Sep 17 00:00:00 2001 From: Naumenko Boris Date: Mon, 19 May 2025 20:37:12 +0300 Subject: [PATCH 1/4] Fix typos in types/util.go --- types/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/util.go b/types/util.go index 4b96108..006340c 100644 --- a/types/util.go +++ b/types/util.go @@ -5,7 +5,7 @@ import ( ) // HashElemsWithDomain performs a recursive poseidon hash over the array of ElemBytes, each hash -// reduce 2 fieds into one, with a specified domain field which would be used in +// reduce 2 fields, fiends into one, with a specified domain field which would be used in // every recursiving call func HashElemsWithDomain(domain, fst, snd *big.Int, elems ...*big.Int) (*Hash, error) { @@ -43,7 +43,7 @@ func HashElems(fst, snd *big.Int, elems ...*big.Int) (*Hash, error) { fst, snd, elems...) } -// HandlingElemsAndByte32 hash an arry mixed with field and byte32 elements, turn each byte32 into +// HandlingElemsAndByte32 hash an array, carry mixed with field and byte32 elements, turn each byte32 into // field elements first then calculate the hash with HashElems func HandlingElemsAndByte32(flagArray uint32, elems []Byte32) (*Hash, error) { From f5344f9df8691c458043fb2a4e834417ad807b23 Mon Sep 17 00:00:00 2001 From: Naumenko Boris Date: Mon, 19 May 2025 20:37:14 +0300 Subject: [PATCH 2/4] Fix typos in trie/zk_trie_impl.go --- trie/zk_trie_impl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trie/zk_trie_impl.go b/trie/zk_trie_impl.go index 96d32a4..9e122c2 100644 --- a/trie/zk_trie_impl.go +++ b/trie/zk_trie_impl.go @@ -579,7 +579,7 @@ type NodeAux struct { // Proof defines the required elements for a MT proof of existence or // non-existence. type Proof struct { - // existence indicates wether this is a proof of existence or + // existence indicates weather, whether this is a proof of existence or // non-existence. Existence bool // depth indicates how deep in the tree the proof goes. From c99fda53fb53348c5b3d891ec995c17a98da3aa9 Mon Sep 17 00:00:00 2001 From: Naumenko Boris Date: Mon, 19 May 2025 20:37:15 +0300 Subject: [PATCH 3/4] Fix typos in trie/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 32438f0211ffb8c75027c367a087b15791f496d3 Mon Sep 17 00:00:00 2001 From: Naumenko Boris Date: Mon, 19 May 2025 20:37:17 +0300 Subject: [PATCH 4/4] Fix typos in trie/zk_trie.go --- trie/zk_trie.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trie/zk_trie.go b/trie/zk_trie.go index fc6ea25..3e9d967 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) } @@ -159,7 +159,7 @@ func (t *ZkTrie) Prove(key []byte, fromLevel uint, writeNode func(*Node) error) // with the node that proves the absence of the key. // // If the trie contain value for key, the onHit is called BEFORE writeNode being called, -// both the hitted leaf node and its sibling node is provided as arguments so caller +// both the hit leaf node and its sibling node is provided as arguments so caller // would receive enough information for launch a deletion and calculate the new root // base on the proof data // Also notice the sibling can be nil if the trie has only one leaf