state

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright © 2019 Annchain Authors <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	MaxTokenName   = 20
	MaxTokenSymbol = 5
)
View Source
const TokenNotDirtied int32 = -1

Variables

View Source
var MaxTrieCacheGen = uint16(120)

MaxTrieCacheGen is trie cache generation limit after which to evict trie nodes from memory.

Functions

This section is empty.

Types

type AccountData added in v0.0.2

type AccountData struct {
	Address  common.Address
	Balances BalanceSet
	Nonce    uint64
	Root     common.Hash
	CodeHash []byte
}

func NewAccountData added in v0.0.2

func NewAccountData() AccountData

func (*AccountData) DecodeMsg added in v0.0.2

func (z *AccountData) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*AccountData) EncodeMsg added in v0.0.2

func (z *AccountData) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*AccountData) MarshalMsg added in v0.0.2

func (z *AccountData) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*AccountData) Msgsize added in v0.0.2

func (z *AccountData) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*AccountData) UnmarshalMsg added in v0.0.2

func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BalanceSet added in v0.0.2

type BalanceSet map[int32]*math.BigInt

BalanceSet

func NewBalanceSet added in v0.0.2

func NewBalanceSet() BalanceSet

func (*BalanceSet) Copy added in v0.0.2

func (b *BalanceSet) Copy() BalanceSet

func (*BalanceSet) IsEmpty added in v0.0.2

func (b *BalanceSet) IsEmpty() bool

func (*BalanceSet) MarshalMsg added in v0.0.2

func (b *BalanceSet) MarshalMsg(bts []byte) (o []byte, err error)

MarshalMsg - For every [key, value] pair, marshal it in [size (int32) + key (int32) + bigint.bytes]

func (*BalanceSet) Msgsize added in v0.0.2

func (b *BalanceSet) Msgsize() int

Msgsize - BalanceSet size = size (4 bytes for int32) + every key pair size

func (*BalanceSet) PreAdd added in v0.0.2

func (b *BalanceSet) PreAdd(tokenID int32, increment *math.BigInt) *math.BigInt

func (*BalanceSet) PreSub added in v0.0.2

func (b *BalanceSet) PreSub(tokenID int32, decrement *math.BigInt) *math.BigInt

func (*BalanceSet) UnmarshalMsg added in v0.0.2

func (b *BalanceSet) UnmarshalMsg(bts []byte) (o []byte, err error)

type Database

type Database interface {
	// OpenTrie opens the main account trie.
	OpenTrie(root common.Hash) (Trie, error)

	// OpenStorageTrie opens the storage trie of an account.
	OpenStorageTrie(addrHash, root common.Hash) (Trie, error)

	// CopyTrie returns an independent copy of the given trie.
	CopyTrie(Trie) Trie

	// ContractCode retrieves a particular contract's code.
	ContractCode(addrHash, codeHash common.Hash) ([]byte, error)

	// ContractCodeSize retrieves a particular contracts code's size.
	ContractCodeSize(addrHash, codeHash common.Hash) (int, error)

	// TrieDB retrieves the low level trie database used for data storage.
	TrieDB() *trie.Database
}

Database wraps access to tries and contract code.

func NewDatabase

func NewDatabase(db ogdb.Database) Database

NewDatabase creates a backing store for state. The returned database is safe for concurrent use and retains cached trie nodes in memory. The pool is an optional intermediate trie-node memory pool between the low level storage layer and the high level trie abstraction.

type JournalEntry added in v0.0.2

type JournalEntry interface {
	// revert undoes the changes introduced by this journal entry.
	Revert(db *StateDB)

	// dirtied returns the address modified by this journal entry.
	Dirtied() *common.Address

	// TokenDirtied returns the Token ID modified by this journal entry.
	TokenDirtied() int32
}

journalEntry is a modification entry in the state change journal that can be reverted on demand.

type PreloadDB added in v0.0.2

type PreloadDB struct {
	// contains filtered or unexported fields
}

func NewPreloadDB added in v0.0.2

func NewPreloadDB(db Database, statedb *StateDB) *PreloadDB

func (*PreloadDB) AddBalance added in v0.0.2

func (pd *PreloadDB) AddBalance(addr common.Address, increment *math.BigInt)

func (*PreloadDB) AddLog added in v0.0.2

func (pd *PreloadDB) AddLog(l *vmtypes.Log)

func (*PreloadDB) AddPreimage added in v0.0.2

func (pd *PreloadDB) AddPreimage(common.Hash, []byte)

func (*PreloadDB) AddRefund added in v0.0.2

func (pd *PreloadDB) AddRefund(uint64)

func (*PreloadDB) AddTokenBalance added in v0.0.2

func (pd *PreloadDB) AddTokenBalance(addr common.Address, tokenID int32, increment *math.BigInt)

func (*PreloadDB) AppendJournal added in v0.0.2

func (pd *PreloadDB) AppendJournal(entry JournalEntry)

func (*PreloadDB) Commit added in v0.0.2

func (pd *PreloadDB) Commit() (common.Hash, error)

func (*PreloadDB) CreateAccount added in v0.0.2

func (pd *PreloadDB) CreateAccount(addr common.Address)

func (*PreloadDB) Empty added in v0.0.2

func (pd *PreloadDB) Empty(addr common.Address) bool

Empty returns whether the given account is empty. Empty is defined according to EIP161 (balance = nonce = code = 0).

func (*PreloadDB) Exist added in v0.0.2

func (pd *PreloadDB) Exist(addr common.Address) bool

Exist reports whether the given account exists in state. Notably this should also return true for suicided accounts.

func (*PreloadDB) ForEachStorage added in v0.0.2

func (pd *PreloadDB) ForEachStorage(common.Address, func(common.Hash, common.Hash) bool)

func (*PreloadDB) GetBalance added in v0.0.2

func (pd *PreloadDB) GetBalance(addr common.Address) *math.BigInt

Retrieve the balance from the given address or 0 if object not found

func (*PreloadDB) GetCode added in v0.0.2

func (pd *PreloadDB) GetCode(addr common.Address) []byte

func (*PreloadDB) GetCodeHash added in v0.0.2

func (pd *PreloadDB) GetCodeHash(addr common.Address) common.Hash

func (*PreloadDB) GetCodeSize added in v0.0.2

func (pd *PreloadDB) GetCodeSize(addr common.Address) int

func (*PreloadDB) GetCommittedState added in v0.0.2

func (pd *PreloadDB) GetCommittedState(addr common.Address, key common.Hash) common.Hash

func (*PreloadDB) GetNonce added in v0.0.2

func (pd *PreloadDB) GetNonce(addr common.Address) uint64

func (*PreloadDB) GetRefund added in v0.0.2

func (pd *PreloadDB) GetRefund() uint64

func (*PreloadDB) GetState added in v0.0.2

func (pd *PreloadDB) GetState(addr common.Address, key common.Hash) common.Hash

GetState retrieves a value from the given account's storage trie.

func (*PreloadDB) GetTokenBalance added in v0.0.2

func (pd *PreloadDB) GetTokenBalance(addr common.Address, tokenID int32) *math.BigInt

func (*PreloadDB) HasSuicided added in v0.0.2

func (pd *PreloadDB) HasSuicided(addr common.Address) bool

func (*PreloadDB) Reset added in v0.0.2

func (pd *PreloadDB) Reset()

func (*PreloadDB) RevertToSnapshot added in v0.0.2

func (pd *PreloadDB) RevertToSnapshot(int)

RevertToSnapshot reverts all state changes made since the given revision.

func (*PreloadDB) SetCode added in v0.0.2

func (pd *PreloadDB) SetCode(addr common.Address, code []byte)

func (*PreloadDB) SetNonce added in v0.0.2

func (pd *PreloadDB) SetNonce(addr common.Address, nonce uint64)

func (*PreloadDB) SetState added in v0.0.2

func (pd *PreloadDB) SetState(addr common.Address, key, value common.Hash)

func (*PreloadDB) SetTokenBalance added in v0.0.2

func (ps *PreloadDB) SetTokenBalance(addr common.Address, tokenID int32, balance *math.BigInt)

func (*PreloadDB) Snapshot added in v0.0.2

func (pd *PreloadDB) Snapshot() int

Snapshot creates a new revision

func (*PreloadDB) String added in v0.0.2

func (pd *PreloadDB) String() string

for debug.

func (*PreloadDB) SubBalance added in v0.0.2

func (pd *PreloadDB) SubBalance(addr common.Address, decrement *math.BigInt)

func (*PreloadDB) SubRefund added in v0.0.2

func (pd *PreloadDB) SubRefund(uint64)

func (*PreloadDB) SubTokenBalance added in v0.0.2

func (pd *PreloadDB) SubTokenBalance(addr common.Address, tokenID int32, decrement *math.BigInt)

func (*PreloadDB) Suicide added in v0.0.2

func (pd *PreloadDB) Suicide(addr common.Address) bool

type StateDB

type StateDB struct {
	// contains filtered or unexported fields
}

StateDB stores account's data. Account's data include address, balance, nonce, code and its contract db if it is an contract address. An account is stored as a StateObject, for more detail please check StateObject struct.

func NewStateDB

func NewStateDB(conf StateDBConfig, db Database, root common.Hash) (*StateDB, error)

func (*StateDB) AddBalance

func (sd *StateDB) AddBalance(addr common.Address, increment *math.BigInt)

AddBalance

func (*StateDB) AddLog

func (sd *StateDB) AddLog(l *vmtypes.Log)

func (*StateDB) AddPreimage

func (sd *StateDB) AddPreimage(h common.Hash, b []byte)

func (*StateDB) AddRefund

func (sd *StateDB) AddRefund(increment uint64)

func (*StateDB) AddTokenBalance added in v0.0.2

func (sd *StateDB) AddTokenBalance(addr common.Address, tokenID int32, increment *math.BigInt)

func (*StateDB) AppendJournal added in v0.0.2

func (sd *StateDB) AppendJournal(entry JournalEntry)

func (*StateDB) ClearJournalAndRefund added in v0.0.3

func (sd *StateDB) ClearJournalAndRefund()

func (*StateDB) Commit

func (sd *StateDB) Commit() (common.Hash, error)

Commit tries to save dirty data to memory trie db.

func (*StateDB) CreateAccount

func (sd *StateDB) CreateAccount(addr common.Address)

CreateAccount will create a new state for input address.

func (*StateDB) Database

func (sd *StateDB) Database() Database

func (*StateDB) DeleteStateObject

func (sd *StateDB) DeleteStateObject(addr common.Address) error

DeleteStateObject remove a state from StateDB. Return error if it fails.

func (*StateDB) DestroyToken added in v0.0.3

func (sd *StateDB) DestroyToken(tokenID int32) error

func (*StateDB) Empty

func (sd *StateDB) Empty(addr common.Address) bool

func (*StateDB) Exist

func (sd *StateDB) Exist(addr common.Address) bool

func (*StateDB) ForEachStorage

func (sd *StateDB) ForEachStorage(addr common.Address, f func(key, value common.Hash) bool)

func (*StateDB) GetAllTokenBalance added in v0.0.2

func (sd *StateDB) GetAllTokenBalance(addr common.Address) BalanceSet

func (*StateDB) GetBalance

func (sd *StateDB) GetBalance(addr common.Address) *math.BigInt

func (*StateDB) GetCode

func (sd *StateDB) GetCode(addr common.Address) []byte

func (*StateDB) GetCodeHash

func (sd *StateDB) GetCodeHash(addr common.Address) common.Hash

func (*StateDB) GetCodeSize

func (sd *StateDB) GetCodeSize(addr common.Address) int

func (*StateDB) GetCommittedState

func (sd *StateDB) GetCommittedState(addr common.Address, key common.Hash) common.Hash

func (*StateDB) GetNonce

func (sd *StateDB) GetNonce(addr common.Address) uint64

func (*StateDB) GetOrCreateStateObject

func (sd *StateDB) GetOrCreateStateObject(addr common.Address) *StateObject

GetOrCreateStateObject will find a state from memory by account address. If state not exists, it will load a state from db.

func (*StateDB) GetRefund

func (sd *StateDB) GetRefund() uint64

func (*StateDB) GetState

func (sd *StateDB) GetState(addr common.Address, key common.Hash) common.Hash

func (*StateDB) GetStateObject

func (sd *StateDB) GetStateObject(addr common.Address) *StateObject

GetStateObject get a state from StateDB. If state not exist, load it from db.

func (*StateDB) GetTokenBalance added in v0.0.2

func (sd *StateDB) GetTokenBalance(addr common.Address, tokenID int32) *math.BigInt

func (*StateDB) GetTokenObject added in v0.0.3

func (sd *StateDB) GetTokenObject(tokenID int32) *TokenObject

GetTokenObject get token object from StateDB.tokens . If not exists then try to load from trie db.

func (*StateDB) HasSuicided

func (sd *StateDB) HasSuicided(addr common.Address) bool

func (*StateDB) IssueToken added in v0.0.3

func (sd *StateDB) IssueToken(issuer common.Address, name, symbol string, reIssuable bool, fstIssue *math.BigInt) (int32, error)

IssueToken creates a new token according to offered token information.

func (*StateDB) LatestTokenID added in v0.0.3

func (sd *StateDB) LatestTokenID() int32

func (*StateDB) ReIssueToken added in v0.0.3

func (sd *StateDB) ReIssueToken(tokenID int32, amount *math.BigInt) error

func (*StateDB) RevertToSnapshot

func (sd *StateDB) RevertToSnapshot(snapshotid int)

func (*StateDB) Root

func (sd *StateDB) Root() common.Hash

func (*StateDB) SetBalance

func (sd *StateDB) SetBalance(addr common.Address, balance *math.BigInt)

SetBalance set origin OG token balance. TODO should be modified to satisfy all tokens.

func (*StateDB) SetCode

func (sd *StateDB) SetCode(addr common.Address, code []byte)

func (*StateDB) SetNonce

func (sd *StateDB) SetNonce(addr common.Address, nonce uint64)

func (*StateDB) SetState

func (sd *StateDB) SetState(addr common.Address, key, value common.Hash)

func (*StateDB) SetStateObject

func (sd *StateDB) SetStateObject(addr common.Address, stobj *StateObject)

func (*StateDB) SetTokenBalance added in v0.0.2

func (sd *StateDB) SetTokenBalance(addr common.Address, tokenID int32, balance *math.BigInt)

func (*StateDB) Snapshot

func (sd *StateDB) Snapshot() int

func (*StateDB) Stop

func (sd *StateDB) Stop()

func (*StateDB) String

func (sd *StateDB) String() string

func (*StateDB) SubBalance

func (sd *StateDB) SubBalance(addr common.Address, decrement *math.BigInt)

SubBalance

func (*StateDB) SubRefund

func (sd *StateDB) SubRefund(decrement uint64)

func (*StateDB) SubTokenBalance added in v0.0.2

func (sd *StateDB) SubTokenBalance(addr common.Address, tokenID int32, decrement *math.BigInt)

func (*StateDB) Suicide

func (sd *StateDB) Suicide(addr common.Address) bool

type StateDBConfig

type StateDBConfig struct {
	PurgeTimer     time.Duration
	BeatExpireTime time.Duration
}

func DefaultStateDBConfig

func DefaultStateDBConfig() StateDBConfig

type StateDBInterface added in v0.0.2

type StateDBInterface interface {
	CreateAccount(common.Address)

	SubBalance(common.Address, *math.BigInt)
	SubTokenBalance(common.Address, int32, *math.BigInt)
	AddBalance(common.Address, *math.BigInt)
	AddTokenBalance(common.Address, int32, *math.BigInt)
	SetTokenBalance(common.Address, int32, *math.BigInt)
	// Retrieve the balance from the given address or 0 if object not found
	GetBalance(common.Address) *math.BigInt
	GetTokenBalance(common.Address, int32) *math.BigInt

	GetNonce(common.Address) uint64
	SetNonce(common.Address, uint64)

	GetCodeHash(common.Address) common.Hash
	GetCode(common.Address) []byte
	SetCode(common.Address, []byte)
	GetCodeSize(common.Address) int

	// AddRefund adds gas to the refund counter
	AddRefund(uint64)
	// SubRefund removes gas from the refund counter.
	// This method will panic if the refund counter goes below zero
	SubRefund(uint64)
	// GetRefund returns the current value of the refund counter.
	GetRefund() uint64

	GetCommittedState(common.Address, common.Hash) common.Hash
	// GetState retrieves a value from the given account's storage trie.
	GetState(common.Address, common.Hash) common.Hash
	SetState(common.Address, common.Hash, common.Hash)

	AppendJournal(JournalEntry)

	// Suicide marks the given account as suicided.
	// This clears the account balance.
	//
	// The account's state object is still available until the state is committed,
	// getStateObject will return a non-nil account after Suicide.
	Suicide(common.Address) bool
	HasSuicided(common.Address) bool

	// Exist reports whether the given account exists in state.
	// Notably this should also return true for suicided accounts.
	Exist(common.Address) bool
	// Empty returns whether the given account is empty. Empty
	// is defined according to EIP161 (balance = nonce = code = 0).
	Empty(common.Address) bool

	// RevertToSnapshot reverts all state changes made since the given revision.
	RevertToSnapshot(int)
	// Snapshot creates a new revision
	Snapshot() int

	//AddLog(*Log)
	AddPreimage(common.Hash, []byte)

	ForEachStorage(common.Address, func(common.Hash, common.Hash) bool)
	// for debug.
	String() string
}

StateDB is an OVM database for full state querying.

type StateObject

type StateObject struct {
	// contains filtered or unexported fields
}

func NewStateObject

func NewStateObject(addr common.Address, db StateDBInterface) *StateObject

func (*StateObject) AddBalance

func (s *StateObject) AddBalance(tokenID int32, increment *math.BigInt)

func (*StateObject) CommitStorage

func (s *StateObject) CommitStorage(db Database, preCommit bool) error

func (*StateObject) Copy added in v0.0.2

func (s *StateObject) Copy(src *StateObject)

func (*StateObject) Decode

func (s *StateObject) Decode(b []byte, db *StateDB) error

func (*StateObject) DecodeMsg

func (z *StateObject) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*StateObject) Encode

func (s *StateObject) Encode() ([]byte, error)

func (StateObject) EncodeMsg

func (z StateObject) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*StateObject) GetAllBalance added in v0.0.2

func (s *StateObject) GetAllBalance() BalanceSet

func (*StateObject) GetBalance

func (s *StateObject) GetBalance(tokenID int32) *math.BigInt

func (*StateObject) GetCode

func (s *StateObject) GetCode(db Database) []byte

func (*StateObject) GetCodeHash

func (s *StateObject) GetCodeHash() common.Hash

func (*StateObject) GetCodeSize

func (s *StateObject) GetCodeSize(db Database) (int, error)

func (*StateObject) GetCommittedState

func (s *StateObject) GetCommittedState(db Database, key common.Hash) common.Hash

func (*StateObject) GetNonce

func (s *StateObject) GetNonce() uint64

func (*StateObject) GetState

func (s *StateObject) GetState(db Database, key common.Hash) common.Hash

func (*StateObject) Map added in v0.0.2

func (s *StateObject) Map() map[string]interface{}

func (StateObject) MarshalMsg

func (z StateObject) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (StateObject) Msgsize

func (z StateObject) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*StateObject) SetBalance

func (s *StateObject) SetBalance(tokenID int32, balance *math.BigInt)

func (*StateObject) SetCode

func (s *StateObject) SetCode(codehash common.Hash, code []byte)

func (*StateObject) SetNonce

func (s *StateObject) SetNonce(nonce uint64)

func (*StateObject) SetState

func (s *StateObject) SetState(db Database, key, value common.Hash)

func (*StateObject) String added in v0.0.2

func (s *StateObject) String() string

func (*StateObject) SubBalance

func (s *StateObject) SubBalance(tokenID int32, decrement *math.BigInt)

func (*StateObject) Uncache

func (s *StateObject) Uncache()

Uncache clears dirtyStorage and committedStorage. This is aimed to check if state is committed into db.

Note that this function is for test debug only, should not be called by other functions.

func (*StateObject) UnmarshalMsg

func (z *StateObject) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TokenObject added in v0.0.3

type TokenObject struct {
	TokenID    int32
	Name       string
	Symbol     string
	Issuer     common.Address
	ReIssuable bool

	Issues    []*math.BigInt
	Destroyed bool
	// contains filtered or unexported fields
}

func NewTokenObject added in v0.0.3

func NewTokenObject(tokenID int32, issuer common.Address, name, symbol string, reIssuable bool, fstIssue *math.BigInt, db StateDBInterface) *TokenObject

func (*TokenObject) AllIssues added in v0.0.3

func (t *TokenObject) AllIssues() []*math.BigInt

func (*TokenObject) CanReIssue added in v0.0.3

func (t *TokenObject) CanReIssue() bool

func (*TokenObject) CopyRaw added in v0.0.3

func (t *TokenObject) CopyRaw(tObj *TokenObject)

func (*TokenObject) Decode added in v0.0.3

func (t *TokenObject) Decode(b []byte) error

func (*TokenObject) DecodeMsg added in v0.0.3

func (z *TokenObject) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*TokenObject) Destroy added in v0.0.3

func (t *TokenObject) Destroy()

func (*TokenObject) Encode added in v0.0.3

func (t *TokenObject) Encode() ([]byte, error)

func (*TokenObject) EncodeMsg added in v0.0.3

func (z *TokenObject) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*TokenObject) GetID added in v0.0.3

func (t *TokenObject) GetID() int32

func (*TokenObject) GetName added in v0.0.3

func (t *TokenObject) GetName() string

func (*TokenObject) GetSymbol added in v0.0.3

func (t *TokenObject) GetSymbol() string

func (*TokenObject) MarshalMsg added in v0.0.3

func (z *TokenObject) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*TokenObject) Msgsize added in v0.0.3

func (z *TokenObject) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*TokenObject) OneIssue added in v0.0.3

func (t *TokenObject) OneIssue(term int) *math.BigInt

func (*TokenObject) ReIssue added in v0.0.3

func (t *TokenObject) ReIssue(amount *math.BigInt) error

func (*TokenObject) UnmarshalMsg added in v0.0.3

func (z *TokenObject) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Trie

type Trie interface {
	TryGet(key []byte) ([]byte, error)
	TryUpdate(key, value []byte) error
	TryDelete(key []byte) error
	// preCommit is a flag for pre confirming sequencer. Because pre confirm uses the
	// same trie db in real sequencer confirm and the db will be modified during db commit.
	// To avoid this, add a flag to let pre confirm process not modify trie db anymore.
	Commit(onleaf trie.LeafCallback, preCommit bool) (common.Hash, error)
	Hash() common.Hash
	NodeIterator(startKey []byte) trie.NodeIterator
	GetKey([]byte) []byte // TODO(fjl): remove this when SecureTrie is removed
	Prove(key []byte, fromLevel uint, proofDb ogdb.Putter) error
}

Trie is a Ethereum Merkle Trie.

Jump to

Keyboard shortcuts

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