vtree

package
v0.0.0-...-92d349b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionLeafKey    = 0
	BalanceLeafKey    = 1
	NonceLeafKey      = 2
	CodeKeccakLeafKey = 3
	CodeSizeLeafKey   = 4
)
View Source
const (
	PUSH1  = byte(0x60)
	PUSH3  = byte(0x62)
	PUSH4  = byte(0x63)
	PUSH7  = byte(0x66)
	PUSH21 = byte(0x74)
	PUSH30 = byte(0x7d)
	PUSH32 = byte(0x7f)
)

Variables

View Source
var (
	HeaderStorageOffset = uint256.NewInt(64)
	CodeOffset          = uint256.NewInt(128)
	MainStorageOffset   = new(uint256.Int).Lsh(uint256.NewInt(256), 31)
	VerkleNodeWidth     = uint256.NewInt(256)
)

Functions

func ChunkifyCode

func ChunkifyCode(code []byte) []byte

ChunkifyCode generates the chunked version of an array representing EVM bytecode

func GetTreeKey

func GetTreeKey(address []byte, treeIndex *uint256.Int, subIndex byte) []byte

GetTreeKey performs both the work of the spec's get_tree_key function, and that of pedersen_hash: it builds the polynomial in pedersen_hash without having to create a mostly zero-filled buffer and "type cast" it to a 128-long 16-byte array. Since at most the first 5 coefficients of the polynomial will be non-zero, these 5 coefficients are created directly.

func GetTreeKeyAccountLeaf

func GetTreeKeyAccountLeaf(address []byte, leaf byte) []byte

func GetTreeKeyBalance

func GetTreeKeyBalance(address []byte) []byte

func GetTreeKeyCodeChunk

func GetTreeKeyCodeChunk(address []byte, chunk *uint256.Int) []byte

func GetTreeKeyCodeKeccak

func GetTreeKeyCodeKeccak(address []byte) []byte

func GetTreeKeyCodeSize

func GetTreeKeyCodeSize(address []byte) []byte

func GetTreeKeyNonce

func GetTreeKeyNonce(address []byte) []byte

func GetTreeKeyStorageSlot

func GetTreeKeyStorageSlot(address []byte, storageKey *uint256.Int) []byte

func GetTreeKeyVersion

func GetTreeKeyVersion(address []byte) []byte

func PointToHash

func PointToHash(evaluated *verkle.Point, suffix byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL