Documentation ¶
Index ¶
- func IsGasLimitErr(err error) bool
- type Account
- type Code
- type GasLimitErr
- type Log
- type Logs
- type Manifest
- type Message
- type Messages
- type StateDB
- func (self *StateDB) AddBalance(addr []byte, amount *big.Int)
- func (self *StateDB) AddLog(log Log)
- func (s *StateDB) Cmp(other *StateDB) bool
- func (self *StateDB) Copy() *StateDB
- func (self *StateDB) CreateOutputForDiff()
- func (self *StateDB) Delete(addr []byte) bool
- func (self *StateDB) DeleteStateObject(stateObject *StateObject)
- func (self *StateDB) Dump() []byte
- func (self *StateDB) Empty()
- func (self *StateDB) EmptyLogs()
- func (self *StateDB) GetAccount(addr []byte) *StateObject
- func (self *StateDB) GetBalance(addr []byte) *big.Int
- func (self *StateDB) GetCode(addr []byte) []byte
- func (self *StateDB) GetNonce(addr []byte) uint64
- func (self *StateDB) GetOrNewStateObject(addr []byte) *StateObject
- func (self *StateDB) GetState(a, b []byte) []byte
- func (self *StateDB) GetStateObject(addr []byte) *StateObject
- func (self *StateDB) Logs() Logs
- func (self *StateDB) Manifest() *Manifest
- func (self *StateDB) NewStateObject(addr []byte) *StateObject
- func (self *StateDB) Refund(addr []byte, gas *big.Int)
- func (self *StateDB) Refunds() map[string]*big.Int
- func (s *StateDB) Reset()
- func (s *StateDB) Root() []byte
- func (self *StateDB) Set(state *StateDB)
- func (self *StateDB) SetCode(addr, code []byte)
- func (self *StateDB) SetNonce(addr []byte, nonce uint64)
- func (self *StateDB) SetState(addr, key []byte, value interface{})
- func (self *StateDB) SetStateObject(object *StateObject)
- func (s *StateDB) Sync()
- func (self *StateDB) Update(gasUsed *big.Int)
- func (self *StateDB) UpdateStateObject(stateObject *StateObject)
- type StateLog
- type StateObject
- func (c *StateObject) AddAmount(amount *big.Int)
- func (c *StateObject) AddBalance(amount *big.Int)
- func (c *StateObject) Address() []byte
- func (self *StateObject) Balance() *big.Int
- func (self *StateObject) BuyGas(gas, price *big.Int) error
- func (c *StateObject) CodeHash() ethutil.Bytes
- func (c *StateObject) ConvertGas(gas, price *big.Int) error
- func (self *StateObject) Copy() *StateObject
- func (self *StateObject) CreateOutputForDiff()
- func (self *StateObject) EachStorage(cb trie.EachCallback)
- func (c *StateObject) GetAddr(addr []byte) *ethutil.Value
- func (c *StateObject) GetInstr(pc *big.Int) *ethutil.Value
- func (self *StateObject) GetState(k []byte) *ethutil.Value
- func (self *StateObject) GetStorage(key *big.Int) *ethutil.Value
- func (c *StateObject) Init() Code
- func (self *StateObject) MarkForDeletion()
- func (c *StateObject) N() *big.Int
- func (self *StateObject) RefundGas(gas, price *big.Int)
- func (self *StateObject) Reset()
- func (c *StateObject) ReturnGas(gas, price *big.Int)
- func (c *StateObject) RlpDecode(data []byte)
- func (c *StateObject) RlpEncode() []byte
- func (self *StateObject) Root() []byte
- func (self *StateObject) Set(stateObject *StateObject)
- func (c *StateObject) SetAddr(addr []byte, value interface{})
- func (c *StateObject) SetBalance(amount *big.Int)
- func (self *StateObject) SetCode(code []byte)
- func (self *StateObject) SetGasPool(gasLimit *big.Int)
- func (self *StateObject) SetState(k []byte, value *ethutil.Value)
- func (self *StateObject) SetStorage(key *big.Int, value *ethutil.Value)
- func (self *StateObject) Storage() map[string]*ethutil.Value
- func (c *StateObject) SubAmount(amount *big.Int)
- func (c *StateObject) SubBalance(amount *big.Int)
- func (self *StateObject) Sync()
- type Storage
- type StorageState
- type World
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsGasLimitErr ¶ added in v0.7.10
Types ¶
type GasLimitErr ¶ added in v0.7.10
func GasLimitError ¶ added in v0.7.10
func GasLimitError(is, max *big.Int) *GasLimitErr
func (*GasLimitErr) Error ¶ added in v0.7.10
func (err *GasLimitErr) Error() string
type Log ¶ added in v0.7.10
type Log interface { ethutil.RlpEncodable Address() []byte Topics() [][]byte Data() []byte }
type Manifest ¶ added in v0.7.10
type Manifest struct {
Messages Messages
}
Object manifest
The object manifest is used to keep changes to the state so we can keep track of the changes that occurred during a state transitioning phase.
func NewManifest ¶ added in v0.7.10
func NewManifest() *Manifest
func (*Manifest) AddMessage ¶ added in v0.7.10
type Message ¶ added in v0.7.10
type Message struct {
To, From []byte
Input []byte
Output []byte
Path int
Origin []byte
Timestamp int64
Coinbase []byte
Block []byte
Number *big.Int
Value *big.Int
ChangedAddresses [][]byte
}
func (*Message) AddStorageChange ¶ added in v0.7.10
type StateDB ¶ added in v0.7.10
type StateDB struct { // The trie for this structure Trie *trie.Trie // contains filtered or unexported fields }
StateDBs within the ethereum protocol are used to store anything within the merkle trie. StateDBs take care of caching and storing nested states. It's the general query interface to retrieve: * Contracts * Accounts
func (*StateDB) AddBalance ¶ added in v0.7.10
func (*StateDB) CreateOutputForDiff ¶ added in v0.7.10
func (self *StateDB) CreateOutputForDiff()
Debug stuff
func (*StateDB) DeleteStateObject ¶ added in v0.7.10
func (self *StateDB) DeleteStateObject(stateObject *StateObject)
Delete the given state object and delete it from the state trie
func (*StateDB) GetAccount ¶ added in v0.7.10
func (self *StateDB) GetAccount(addr []byte) *StateObject
Deprecated
func (*StateDB) GetBalance ¶ added in v0.7.10
Retrieve the balance from the given address or 0 if object not found
func (*StateDB) GetOrNewStateObject ¶ added in v0.7.10
func (self *StateDB) GetOrNewStateObject(addr []byte) *StateObject
Retrieve a state object or create a new state object if nil
func (*StateDB) GetStateObject ¶ added in v0.7.10
func (self *StateDB) GetStateObject(addr []byte) *StateObject
Retrieve a state object given my the address. Nil if not found
func (*StateDB) NewStateObject ¶ added in v0.7.10
func (self *StateDB) NewStateObject(addr []byte) *StateObject
Create a state object whether it exist in the trie or not
func (*StateDB) SetStateObject ¶ added in v0.7.10
func (self *StateDB) SetStateObject(object *StateObject)
func (*StateDB) UpdateStateObject ¶ added in v0.7.10
func (self *StateDB) UpdateStateObject(stateObject *StateObject)
Update the given state object and apply it to state trie
type StateLog ¶ added in v0.7.10
type StateLog struct {
// contains filtered or unexported fields
}
func NewLogFromValue ¶ added in v0.7.10
type StateObject ¶ added in v0.7.10
type StateObject struct { Nonce uint64 // Contract related attributes State *StateDB Code Code InitCode Code // contains filtered or unexported fields }
func NewContract ¶ added in v0.7.10
func NewContract(address []byte, balance *big.Int, root []byte) *StateObject
func NewStateObject ¶ added in v0.7.10
func NewStateObject(addr []byte) *StateObject
func NewStateObjectFromBytes ¶ added in v0.7.10
func NewStateObjectFromBytes(address, data []byte) *StateObject
func (*StateObject) AddAmount ¶ added in v0.7.10
func (c *StateObject) AddAmount(amount *big.Int)
func (*StateObject) AddBalance ¶ added in v0.7.10
func (c *StateObject) AddBalance(amount *big.Int)
func (*StateObject) Address ¶ added in v0.7.10
func (c *StateObject) Address() []byte
Returns the address of the contract/account
func (*StateObject) Balance ¶ added in v0.7.10
func (self *StateObject) Balance() *big.Int
func (*StateObject) BuyGas ¶ added in v0.7.10
func (self *StateObject) BuyGas(gas, price *big.Int) error
func (*StateObject) CodeHash ¶ added in v0.7.10
func (c *StateObject) CodeHash() ethutil.Bytes
func (*StateObject) ConvertGas ¶ added in v0.7.10
func (c *StateObject) ConvertGas(gas, price *big.Int) error
func (*StateObject) Copy ¶ added in v0.7.10
func (self *StateObject) Copy() *StateObject
func (*StateObject) CreateOutputForDiff ¶ added in v0.7.10
func (self *StateObject) CreateOutputForDiff()
Debug stuff
func (*StateObject) EachStorage ¶ added in v0.7.10
func (self *StateObject) EachStorage(cb trie.EachCallback)
Iterate over each storage address and yield callback
func (*StateObject) GetAddr ¶ added in v0.7.10
func (c *StateObject) GetAddr(addr []byte) *ethutil.Value
func (*StateObject) GetInstr ¶ added in v0.7.10
func (c *StateObject) GetInstr(pc *big.Int) *ethutil.Value
func (*StateObject) GetState ¶ added in v0.7.10
func (self *StateObject) GetState(k []byte) *ethutil.Value
func (*StateObject) GetStorage ¶ added in v0.7.10
func (self *StateObject) GetStorage(key *big.Int) *ethutil.Value
func (*StateObject) Init ¶ added in v0.7.10
func (c *StateObject) Init() Code
Returns the initialization Code
func (*StateObject) MarkForDeletion ¶ added in v0.7.10
func (self *StateObject) MarkForDeletion()
func (*StateObject) N ¶ added in v0.7.10
func (c *StateObject) N() *big.Int
func (*StateObject) RefundGas ¶ added in v0.7.10
func (self *StateObject) RefundGas(gas, price *big.Int)
func (*StateObject) Reset ¶ added in v0.7.10
func (self *StateObject) Reset()
func (*StateObject) ReturnGas ¶ added in v0.7.10
func (c *StateObject) ReturnGas(gas, price *big.Int)
Return the gas back to the origin. Used by the Virtual machine or Closures
func (*StateObject) RlpDecode ¶ added in v0.7.10
func (c *StateObject) RlpDecode(data []byte)
func (*StateObject) RlpEncode ¶ added in v0.7.10
func (c *StateObject) RlpEncode() []byte
State object encoding methods
func (*StateObject) Root ¶ added in v0.7.10
func (self *StateObject) Root() []byte
func (*StateObject) Set ¶ added in v0.7.10
func (self *StateObject) Set(stateObject *StateObject)
func (*StateObject) SetAddr ¶ added in v0.7.10
func (c *StateObject) SetAddr(addr []byte, value interface{})
func (*StateObject) SetBalance ¶ added in v0.7.10
func (c *StateObject) SetBalance(amount *big.Int)
func (*StateObject) SetCode ¶ added in v0.7.10
func (self *StateObject) SetCode(code []byte)
func (*StateObject) SetGasPool ¶ added in v0.7.10
func (self *StateObject) SetGasPool(gasLimit *big.Int)
func (*StateObject) SetState ¶ added in v0.7.10
func (self *StateObject) SetState(k []byte, value *ethutil.Value)
func (*StateObject) SetStorage ¶ added in v0.7.10
func (self *StateObject) SetStorage(key *big.Int, value *ethutil.Value)
func (*StateObject) Storage ¶ added in v0.7.10
func (self *StateObject) Storage() map[string]*ethutil.Value
func (*StateObject) SubAmount ¶ added in v0.7.10
func (c *StateObject) SubAmount(amount *big.Int)
func (*StateObject) SubBalance ¶ added in v0.7.10
func (c *StateObject) SubBalance(amount *big.Int)
func (*StateObject) Sync ¶ added in v0.7.10
func (self *StateObject) Sync()
type StorageState ¶ added in v0.7.10
Storage change object. Used by the manifest for notifying changes to the sub channels.