Skip to content

Fixed typos #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions trie/zk_trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trie/zk_trie_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion trie/zk_trie_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions types/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down Expand Up @@ -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) {

Expand Down