Documentation
¶
Overview ¶
Package replayer implements an Ethereum transaction replayer.
Index ¶
- Constants
- func CalcStats(dataDir, testnet string, blockHeight uint64, blockHash string, defrost bool, ...) error
- func ProcGenesisBlock(testnet string) error
- func ReplayTx(breakpointDir string, build bool, contract string, release bool, gas uint64) error
- type AccountBalance
- type AddrSlice
- type BeginBlockArgs
- type BeginChainArgs
- type Breakpoint
- type CreateAccount
- type RawAddress
- type RawU256
- type Replayer
- type Tx
Constants ¶
const TLAMinLength = 32
TLAMinLength defines the minimum length for top-level accounts.
Variables ¶
This section is empty.
Functions ¶
func CalcStats ¶
func CalcStats( dataDir, testnet string, blockHeight uint64, blockHash string, defrost bool, dump bool, ) error
CalcStats calculates some statistics for the given testnet and prints them to stdout.
func ProcGenesisBlock ¶
ProcGenesisBlock processes the genesis block for the given testnet.
Types ¶
type AccountBalance ¶
type AccountBalance struct { Account RawAddress Balance RawU256 }
AccountBalance encodes (genesis) account balances used by the 'begin_chain' function.
type BeginBlockArgs ¶
type BeginBlockArgs struct { Hash RawU256 Coinbase RawAddress Timestamp RawU256 Number RawU256 Difficulty RawU256 Gaslimit RawU256 }
BeginBlockArgs encodes the arguments for 'begin_block'.
type BeginChainArgs ¶
type BeginChainArgs struct { ChainID RawU256 GenesisAlloc []AccountBalance }
BeginChainArgs encodes the arguments for 'begin_chain'.
type Breakpoint ¶
type Breakpoint struct { ChainID uint8 `json:"chain-id"` AccountID string `json:"account-id"` NearcoreHead string `json:"nearcore"` AuroraEngineHead string `json:"aurora-engine"` Transaction string `json:"transaction"` // contains filtered or unexported fields }
Breakpoint defines a break point.
type CreateAccount ¶
CreateAccount allow to create accounts.
func (*CreateAccount) Create ¶
func (ca *CreateAccount) Create(accountID string) error
Create account with accountID.
type RawU256 ¶
type RawU256 [32]uint8
RawU256 type for Aurora Engine (big-endian large integer type).
type Replayer ¶
type Replayer struct { Config *near.Config Timeout time.Duration ChainID uint8 Gas uint64 DataDir string Testnet string Defrost bool Skip bool // skip empty blocks Batch bool // batch transactions BatchSize int // batch size when batching transactions StartBlock int // start replaying at this block height StartTx int // start replaying at this transaction (in block given by StartBlock) Autobreak bool // automatically repeat with break point after error BreakBlock int // break replaying at this block height BreakTx int // break replaying at this transaction (in block given by BreakBlock) Release bool // run release version of neard Setup bool // setup and run neard before replaying NeardPath string // path to neard binary NeardHead string // git hash of neard InitialBalance string Contract string Breakpoint Breakpoint }
A Replayer replays transactions.
type Tx ¶
type Tx struct { BlockNum int // block number (-1 if undefined) TxNum int // transaction number Comment string // comment for the transaction MethodName string // the Aurora Engine method name to call Args []byte // the argument to call the method with EthTx *db.Transaction // pointer to original Ethereum transaction (for 'submit') Error error // error during transaction construction }
Tx defines a replayer transaction.