Documentation
¶
Index ¶
- func IsAddressConflict(a1, a2 map[common.Address]VisitTxnID) bool
- func IsStateConflict(a1, a2 map[common.Address]map[common.Hash]VisitTxnID) bool
- type PendingStateWrapper
- func (psw *PendingStateWrapper) AddAddressToAccessList(addr common.Address)
- func (psw *PendingStateWrapper) AddBalance(address common.Address, u *uint256.Int, reason tracing.BalanceChangeReason)
- func (psw *PendingStateWrapper) AddLog(log *types.Log)
- func (psw *PendingStateWrapper) AddPreimage(hash common.Hash, bytes []byte)
- func (psw *PendingStateWrapper) AddRefund(u uint64)
- func (psw *PendingStateWrapper) AddSlotToAccessList(addr common.Address, slot common.Hash)
- func (psw *PendingStateWrapper) AddressInAccessList(addr common.Address) bool
- func (psw *PendingStateWrapper) AllLogs() []*types.Log
- func (psw *PendingStateWrapper) CreateAccount(address common.Address)
- func (psw *PendingStateWrapper) Empty(address common.Address) bool
- func (psw *PendingStateWrapper) Exist(address common.Address) bool
- func (psw *PendingStateWrapper) GetBalance(address common.Address) *uint256.Int
- func (psw *PendingStateWrapper) GetCode(address common.Address) []byte
- func (psw *PendingStateWrapper) GetCodeHash(address common.Address) common.Hash
- func (psw *PendingStateWrapper) GetCodeSize(address common.Address) int
- func (psw *PendingStateWrapper) GetCommittedState(address common.Address, hash common.Hash) common.Hash
- func (psw *PendingStateWrapper) GetCtx() *StateContext
- func (psw *PendingStateWrapper) GetNonce(address common.Address) uint64
- func (psw *PendingStateWrapper) GetRefund() uint64
- func (psw *PendingStateWrapper) GetState(address common.Address, hash common.Hash) common.Hash
- func (psw *PendingStateWrapper) GetStateDB() *state.StateDB
- func (psw *PendingStateWrapper) GetStorageRoot(addr common.Address) common.Hash
- func (psw *PendingStateWrapper) GetTransientState(addr common.Address, key common.Hash) common.Hash
- func (psw *PendingStateWrapper) HasSelfDestructed(address common.Address) bool
- func (psw *PendingStateWrapper) MergeInto(stateDB *state.StateDB, sender common.Address)
- func (psw *PendingStateWrapper) Prepare(rules params.Rules, sender, coinbase common.Address, dest *common.Address, ...)
- func (psw *PendingStateWrapper) RevertToSnapshot(i int)
- func (psw *PendingStateWrapper) SelfDestruct(address common.Address)
- func (psw *PendingStateWrapper) Selfdestruct6780(address common.Address)
- func (psw *PendingStateWrapper) SetCode(address common.Address, bytes []byte)
- func (psw *PendingStateWrapper) SetNonce(address common.Address, u uint64)
- func (psw *PendingStateWrapper) SetState(address common.Address, hash common.Hash, hash2 common.Hash)
- func (psw *PendingStateWrapper) SetTransientState(addr common.Address, key, value common.Hash)
- func (psw *PendingStateWrapper) SetTxContext(txHash common.Hash, txIndex int)
- func (psw *PendingStateWrapper) SlotInAccessList(addr common.Address, slot common.Hash) (addressOk bool, slotOk bool)
- func (psw *PendingStateWrapper) Snapshot() int
- func (psw *PendingStateWrapper) SubBalance(address common.Address, u *uint256.Int, reason tracing.BalanceChangeReason)
- func (psw *PendingStateWrapper) SubRefund(u uint64)
- type StateContext
- func (sctx *StateContext) AddAddressToList(address common.Address)
- func (sctx *StateContext) AddSlot2Address(slot slotToAddress)
- func (sctx *StateContext) GetReadAddress() map[common.Address]VisitTxnID
- func (sctx *StateContext) GetReadState() map[common.Address]map[common.Hash]VisitTxnID
- func (sctx *StateContext) GetWriteAddress() map[common.Address]VisitTxnID
- func (sctx *StateContext) GetWriteState() map[common.Address]map[common.Hash]VisitTxnID
- func (sctx *StateContext) IsConflict(tar *StateContext) bool
- func (sctx *StateContext) ReadAddress() map[common.Address]VisitTxnID
- func (sctx *StateContext) ReadBalance(addr common.Address, txnID int64) error
- func (sctx *StateContext) ReadCode(addr common.Address, txnID int64) error
- func (sctx *StateContext) ReadConflict(addr common.Address, txnID int64) bool
- func (sctx *StateContext) ReadState(addr common.Address, key common.Hash, txnID int64) error
- func (sctx *StateContext) SelfDestruct(addr common.Address, txnID int64) error
- func (sctx *StateContext) SetPrepare(rules params.Rules, sender, coinbase common.Address, dest *common.Address, ...)
- func (sctx *StateContext) WriteAccount(addr common.Address, txnID int64) error
- func (sctx *StateContext) WriteBalance(addr common.Address, txnID int64) error
- func (sctx *StateContext) WriteCode(addr common.Address, txnID int64) error
- func (sctx *StateContext) WriteConflict(addr common.Address, txnID int64) bool
- func (sctx *StateContext) WriteState(addr common.Address, key common.Hash, txnID int64) error
- type StateDBWrapper
- func (s *StateDBWrapper) AddAddressToAccessList(addr common.Address)
- func (s *StateDBWrapper) AddBalance(address common.Address, u *uint256.Int, reason tracing.BalanceChangeReason)
- func (s *StateDBWrapper) AddLog(log *types.Log)
- func (s *StateDBWrapper) AddPreimage(hash common.Hash, bytes []byte)
- func (s *StateDBWrapper) AddRefund(u uint64)
- func (s *StateDBWrapper) AddSlotToAccessList(addr common.Address, slot common.Hash)
- func (s *StateDBWrapper) AddressInAccessList(addr common.Address) bool
- func (s *StateDBWrapper) AllPreimages() map[common.Hash][]byte
- func (s *StateDBWrapper) CreateAccount(address common.Address)
- func (s *StateDBWrapper) Empty(address common.Address) bool
- func (s *StateDBWrapper) Exist(address common.Address) bool
- func (s *StateDBWrapper) GetBalance(address common.Address) *uint256.Int
- func (s *StateDBWrapper) GetCode(address common.Address) []byte
- func (s *StateDBWrapper) GetCodeHash(address common.Address) common.Hash
- func (s *StateDBWrapper) GetCodeSize(address common.Address) int
- func (s *StateDBWrapper) GetCommittedState(address common.Address, hash common.Hash) common.Hash
- func (s *StateDBWrapper) GetNonce(address common.Address) uint64
- func (s *StateDBWrapper) GetRefund() uint64
- func (s *StateDBWrapper) GetState(address common.Address, key common.Hash) common.Hash
- func (s *StateDBWrapper) GetStateDB() *state.StateDB
- func (s *StateDBWrapper) GetStorageRoot(addr common.Address) common.Hash
- func (s *StateDBWrapper) GetTransientState(addr common.Address, key common.Hash) common.Hash
- func (s *StateDBWrapper) HasSelfDestructed(address common.Address) bool
- func (s *StateDBWrapper) Prepare(rules params.Rules, sender, coinbase common.Address, dest *common.Address, ...)
- func (s *StateDBWrapper) RevertToSnapshot(i int)
- func (s *StateDBWrapper) SelfDestruct(address common.Address)
- func (s *StateDBWrapper) Selfdestruct6780(address common.Address)
- func (s *StateDBWrapper) SetCode(address common.Address, bytes []byte)
- func (s *StateDBWrapper) SetNonce(address common.Address, u uint64)
- func (s *StateDBWrapper) SetState(address common.Address, key common.Hash, value common.Hash)
- func (s *StateDBWrapper) SetTransientState(addr common.Address, key, value common.Hash)
- func (s *StateDBWrapper) SetTxContext(txHash common.Hash, txIndex int)
- func (s *StateDBWrapper) SlotInAccessList(addr common.Address, slot common.Hash) (addressOk bool, slotOk bool)
- func (s *StateDBWrapper) Snapshot() int
- func (s *StateDBWrapper) SubBalance(address common.Address, u *uint256.Int, reason tracing.BalanceChangeReason)
- func (s *StateDBWrapper) SubRefund(u uint64)
- type VisitTxnID
- type VisitedAddress
- func (v *VisitedAddress) GetAccountVisitedTxn(addr common.Address) VisitTxnID
- func (v *VisitedAddress) GetBalanceVisitedTxn(addr common.Address) VisitTxnID
- func (v *VisitedAddress) VisitAccount(addr common.Address, txnID int64)
- func (v *VisitedAddress) VisitBalance(addr common.Address, txnID int64)
- func (v *VisitedAddress) VisitCode(addr common.Address, txnID int64)
- func (v *VisitedAddress) VisitDestruct(addr common.Address, txnID int64)
- func (v *VisitedAddress) VisitState(addr common.Address, key common.Hash, txnID int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAddressConflict ¶
func IsAddressConflict(a1, a2 map[common.Address]VisitTxnID) bool
func IsStateConflict ¶
Types ¶
type PendingStateWrapper ¶
type PendingStateWrapper struct { TxnID int64 // contains filtered or unexported fields }
func NewPendingStateWrapper ¶
func NewPendingStateWrapper(statedb *StateDBWrapper, sctx *StateContext, TxnID int64) *PendingStateWrapper
func (*PendingStateWrapper) AddAddressToAccessList ¶
func (psw *PendingStateWrapper) AddAddressToAccessList(addr common.Address)
func (*PendingStateWrapper) AddBalance ¶
func (psw *PendingStateWrapper) AddBalance(address common.Address, u *uint256.Int, reason tracing.BalanceChangeReason)
func (*PendingStateWrapper) AddLog ¶
func (psw *PendingStateWrapper) AddLog(log *types.Log)
func (*PendingStateWrapper) AddPreimage ¶
func (psw *PendingStateWrapper) AddPreimage(hash common.Hash, bytes []byte)
func (*PendingStateWrapper) AddRefund ¶
func (psw *PendingStateWrapper) AddRefund(u uint64)
func (*PendingStateWrapper) AddSlotToAccessList ¶
func (psw *PendingStateWrapper) AddSlotToAccessList(addr common.Address, slot common.Hash)
func (*PendingStateWrapper) AddressInAccessList ¶
func (psw *PendingStateWrapper) AddressInAccessList(addr common.Address) bool
func (*PendingStateWrapper) AllLogs ¶
func (psw *PendingStateWrapper) AllLogs() []*types.Log
func (*PendingStateWrapper) CreateAccount ¶
func (psw *PendingStateWrapper) CreateAccount(address common.Address)
func (*PendingStateWrapper) Empty ¶
func (psw *PendingStateWrapper) Empty(address common.Address) bool
func (*PendingStateWrapper) Exist ¶
func (psw *PendingStateWrapper) Exist(address common.Address) bool
func (*PendingStateWrapper) GetBalance ¶
func (psw *PendingStateWrapper) GetBalance(address common.Address) *uint256.Int
func (*PendingStateWrapper) GetCode ¶
func (psw *PendingStateWrapper) GetCode(address common.Address) []byte
func (*PendingStateWrapper) GetCodeHash ¶
func (psw *PendingStateWrapper) GetCodeHash(address common.Address) common.Hash
func (*PendingStateWrapper) GetCodeSize ¶
func (psw *PendingStateWrapper) GetCodeSize(address common.Address) int
func (*PendingStateWrapper) GetCommittedState ¶
func (*PendingStateWrapper) GetCtx ¶
func (psw *PendingStateWrapper) GetCtx() *StateContext
func (*PendingStateWrapper) GetNonce ¶
func (psw *PendingStateWrapper) GetNonce(address common.Address) uint64
func (*PendingStateWrapper) GetRefund ¶
func (psw *PendingStateWrapper) GetRefund() uint64
func (*PendingStateWrapper) GetStateDB ¶
func (psw *PendingStateWrapper) GetStateDB() *state.StateDB
func (*PendingStateWrapper) GetStorageRoot ¶
func (psw *PendingStateWrapper) GetStorageRoot(addr common.Address) common.Hash
func (*PendingStateWrapper) GetTransientState ¶
func (*PendingStateWrapper) HasSelfDestructed ¶
func (psw *PendingStateWrapper) HasSelfDestructed(address common.Address) bool
func (*PendingStateWrapper) MergeInto ¶
func (psw *PendingStateWrapper) MergeInto(stateDB *state.StateDB, sender common.Address)
func (*PendingStateWrapper) RevertToSnapshot ¶
func (psw *PendingStateWrapper) RevertToSnapshot(i int)
func (*PendingStateWrapper) SelfDestruct ¶
func (psw *PendingStateWrapper) SelfDestruct(address common.Address)
func (*PendingStateWrapper) Selfdestruct6780 ¶
func (psw *PendingStateWrapper) Selfdestruct6780(address common.Address)
func (*PendingStateWrapper) SetCode ¶
func (psw *PendingStateWrapper) SetCode(address common.Address, bytes []byte)
func (*PendingStateWrapper) SetNonce ¶
func (psw *PendingStateWrapper) SetNonce(address common.Address, u uint64)
func (*PendingStateWrapper) SetTransientState ¶
func (psw *PendingStateWrapper) SetTransientState(addr common.Address, key, value common.Hash)
func (*PendingStateWrapper) SetTxContext ¶
func (psw *PendingStateWrapper) SetTxContext(txHash common.Hash, txIndex int)
func (*PendingStateWrapper) SlotInAccessList ¶
func (*PendingStateWrapper) Snapshot ¶
func (psw *PendingStateWrapper) Snapshot() int
func (*PendingStateWrapper) SubBalance ¶
func (psw *PendingStateWrapper) SubBalance(address common.Address, u *uint256.Int, reason tracing.BalanceChangeReason)
func (*PendingStateWrapper) SubRefund ¶
func (psw *PendingStateWrapper) SubRefund(u uint64)
type StateContext ¶
type StateContext struct { sync.RWMutex Read *VisitedAddress Write *VisitedAddress // contains filtered or unexported fields }
func NewStateContext ¶
func NewStateContext(needCheck bool) *StateContext
func (*StateContext) AddAddressToList ¶
func (sctx *StateContext) AddAddressToList(address common.Address)
func (*StateContext) AddSlot2Address ¶
func (sctx *StateContext) AddSlot2Address(slot slotToAddress)
func (*StateContext) GetReadAddress ¶
func (sctx *StateContext) GetReadAddress() map[common.Address]VisitTxnID
func (*StateContext) GetReadState ¶
func (sctx *StateContext) GetReadState() map[common.Address]map[common.Hash]VisitTxnID
func (*StateContext) GetWriteAddress ¶
func (sctx *StateContext) GetWriteAddress() map[common.Address]VisitTxnID
func (*StateContext) GetWriteState ¶
func (sctx *StateContext) GetWriteState() map[common.Address]map[common.Hash]VisitTxnID
func (*StateContext) IsConflict ¶
func (sctx *StateContext) IsConflict(tar *StateContext) bool
func (*StateContext) ReadAddress ¶
func (sctx *StateContext) ReadAddress() map[common.Address]VisitTxnID
func (*StateContext) ReadBalance ¶
func (sctx *StateContext) ReadBalance(addr common.Address, txnID int64) error
func (*StateContext) ReadCode ¶
func (sctx *StateContext) ReadCode(addr common.Address, txnID int64) error
func (*StateContext) ReadConflict ¶
func (sctx *StateContext) ReadConflict(addr common.Address, txnID int64) bool
func (*StateContext) SelfDestruct ¶
func (sctx *StateContext) SelfDestruct(addr common.Address, txnID int64) error
func (*StateContext) SetPrepare ¶
func (*StateContext) WriteAccount ¶
func (sctx *StateContext) WriteAccount(addr common.Address, txnID int64) error
func (*StateContext) WriteBalance ¶
func (sctx *StateContext) WriteBalance(addr common.Address, txnID int64) error
func (*StateContext) WriteCode ¶
func (sctx *StateContext) WriteCode(addr common.Address, txnID int64) error
func (*StateContext) WriteConflict ¶
func (sctx *StateContext) WriteConflict(addr common.Address, txnID int64) bool
func (*StateContext) WriteState ¶
type StateDBWrapper ¶
StateDBWrapper provides a pending state for a transaction.
func NewStateDBWrapper ¶
func NewStateDBWrapper(db *state.StateDB) *StateDBWrapper
func (*StateDBWrapper) AddAddressToAccessList ¶
func (s *StateDBWrapper) AddAddressToAccessList(addr common.Address)
func (*StateDBWrapper) AddBalance ¶
func (s *StateDBWrapper) AddBalance(address common.Address, u *uint256.Int, reason tracing.BalanceChangeReason)
func (*StateDBWrapper) AddLog ¶
func (s *StateDBWrapper) AddLog(log *types.Log)
func (*StateDBWrapper) AddPreimage ¶
func (s *StateDBWrapper) AddPreimage(hash common.Hash, bytes []byte)
func (*StateDBWrapper) AddRefund ¶
func (s *StateDBWrapper) AddRefund(u uint64)
func (*StateDBWrapper) AddSlotToAccessList ¶
func (s *StateDBWrapper) AddSlotToAccessList(addr common.Address, slot common.Hash)
func (*StateDBWrapper) AddressInAccessList ¶
func (s *StateDBWrapper) AddressInAccessList(addr common.Address) bool
func (*StateDBWrapper) AllPreimages ¶
func (s *StateDBWrapper) AllPreimages() map[common.Hash][]byte
func (*StateDBWrapper) CreateAccount ¶
func (s *StateDBWrapper) CreateAccount(address common.Address)
func (*StateDBWrapper) GetBalance ¶
func (s *StateDBWrapper) GetBalance(address common.Address) *uint256.Int
func (*StateDBWrapper) GetCodeHash ¶
func (s *StateDBWrapper) GetCodeHash(address common.Address) common.Hash
func (*StateDBWrapper) GetCodeSize ¶
func (s *StateDBWrapper) GetCodeSize(address common.Address) int
func (*StateDBWrapper) GetCommittedState ¶
func (*StateDBWrapper) GetRefund ¶
func (s *StateDBWrapper) GetRefund() uint64
func (*StateDBWrapper) GetStateDB ¶
func (s *StateDBWrapper) GetStateDB() *state.StateDB
func (*StateDBWrapper) GetStorageRoot ¶
func (s *StateDBWrapper) GetStorageRoot(addr common.Address) common.Hash
func (*StateDBWrapper) GetTransientState ¶
func (*StateDBWrapper) HasSelfDestructed ¶
func (s *StateDBWrapper) HasSelfDestructed(address common.Address) bool
func (*StateDBWrapper) RevertToSnapshot ¶
func (s *StateDBWrapper) RevertToSnapshot(i int)
func (*StateDBWrapper) SelfDestruct ¶
func (s *StateDBWrapper) SelfDestruct(address common.Address)
func (*StateDBWrapper) Selfdestruct6780 ¶
func (s *StateDBWrapper) Selfdestruct6780(address common.Address)
func (*StateDBWrapper) SetCode ¶
func (s *StateDBWrapper) SetCode(address common.Address, bytes []byte)
func (*StateDBWrapper) SetNonce ¶
func (s *StateDBWrapper) SetNonce(address common.Address, u uint64)
func (*StateDBWrapper) SetTransientState ¶
func (s *StateDBWrapper) SetTransientState(addr common.Address, key, value common.Hash)
func (*StateDBWrapper) SetTxContext ¶
func (s *StateDBWrapper) SetTxContext(txHash common.Hash, txIndex int)
func (*StateDBWrapper) SlotInAccessList ¶
func (*StateDBWrapper) Snapshot ¶
func (s *StateDBWrapper) Snapshot() int
func (*StateDBWrapper) SubBalance ¶
func (s *StateDBWrapper) SubBalance(address common.Address, u *uint256.Int, reason tracing.BalanceChangeReason)
func (*StateDBWrapper) SubRefund ¶
func (s *StateDBWrapper) SubRefund(u uint64)
type VisitTxnID ¶
type VisitTxnID map[int64]struct{}
type VisitedAddress ¶
type VisitedAddress struct { // address -> TxnID Address map[common.Address]VisitTxnID Account map[common.Address]VisitTxnID Balance map[common.Address]VisitTxnID Code map[common.Address]VisitTxnID State map[common.Address]map[common.Hash]VisitTxnID }
func NewVisitedAddress ¶
func NewVisitedAddress() *VisitedAddress
func (*VisitedAddress) GetAccountVisitedTxn ¶
func (v *VisitedAddress) GetAccountVisitedTxn(addr common.Address) VisitTxnID
func (*VisitedAddress) GetBalanceVisitedTxn ¶
func (v *VisitedAddress) GetBalanceVisitedTxn(addr common.Address) VisitTxnID
func (*VisitedAddress) VisitAccount ¶
func (v *VisitedAddress) VisitAccount(addr common.Address, txnID int64)
func (*VisitedAddress) VisitBalance ¶
func (v *VisitedAddress) VisitBalance(addr common.Address, txnID int64)
func (*VisitedAddress) VisitCode ¶
func (v *VisitedAddress) VisitCode(addr common.Address, txnID int64)
func (*VisitedAddress) VisitDestruct ¶
func (v *VisitedAddress) VisitDestruct(addr common.Address, txnID int64)
func (*VisitedAddress) VisitState ¶
Click to show internal directories.
Click to hide internal directories.