Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
weiihann committed Feb 26, 2025
1 parent dc3f89e commit 284fcad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions core/trie2/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,21 @@ type Node interface {
}

type (
// Represents a binary branch node in the trie with two children
BinaryNode struct {
Children [2]Node // 0 = left, 1 = right
flags nodeFlag
}
// Represents a path-compressed node that stores a path segment
// and a single child node
EdgeNode struct {
Child Node
Path *Path
Child Node // The child node at the end of the path
Path *Path // The compressed path segment
flags nodeFlag
}
HashNode struct{ felt.Felt }
// Represents a node that only contains a hash reference to another node
HashNode struct{ felt.Felt }
// Represents a leaf node that stores an actual value in the trie
ValueNode struct{ felt.Felt }
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ require (
github.com/cockroachdb/pebble v1.1.4
github.com/coder/websocket v1.8.12
github.com/consensys/gnark-crypto v0.16.0
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/ethereum/go-ethereum v1.15.0
github.com/fxamacker/cbor/v2 v2.7.0
github.com/go-playground/validator/v10 v10.25.0
Expand Down Expand Up @@ -56,7 +57,6 @@ require (
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
Expand Down

0 comments on commit 284fcad

Please sign in to comment.