Documentation ¶
Index ¶
- func ComputeCompactValue(path []byte, payload *ledger.Payload, nodeHeight int) []byte
- func GetDefaultHashForHeight(height int) []byte
- func GetDefaultHashes() [257][]byte
- func HashInterNode(hash1 []byte, hash2 []byte) []byte
- func HashLeaf(path []byte, value []byte) []byte
- func VerifyTrieBatchProof(bp *ledger.TrieBatchProof, expectedState ledger.State) bool
- func VerifyTrieProof(p *ledger.TrieProof, expectedState ledger.State) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeCompactValue ¶
ComputeCompactValue computes the value for the node considering the sub tree to only include this value and default values.
func GetDefaultHashForHeight ¶
GetDefaultHashForHeight returns the default hashes of the SMT at a specified height.
For each tree level N, there is a default hash equal to the chained hashing of the default value N times.
func GetDefaultHashes ¶
func GetDefaultHashes() [257][]byte
GetDefaultHashes returns the default hashes of the SMT.
For each tree level N, there is a default hash equal to the chained hashing of the default value N times.
func HashInterNode ¶
HashInterNode generates hash value for intermediate nodes (SHA3-256).
func HashLeaf ¶
HashLeaf generates hash value for leaf nodes (SHA3-256). note that we don't include the keys here as they are already included in the path
func VerifyTrieBatchProof ¶
func VerifyTrieBatchProof(bp *ledger.TrieBatchProof, expectedState ledger.State) bool
VerifyTrieBatchProof verifies all the proof inside the batchproof
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package encoding provides byte serialization and deserialization of trie and ledger structs.
|
Package encoding provides byte serialization and deserialization of trie and ledger structs. |
Package pathfinder computes the trie storage path for any given key/value pair
|
Package pathfinder computes the trie storage path for any given key/value pair |