Documentation ¶
Index ¶
- Constants
- Variables
- func New(nodeAPI NodeAPI, txPool *core.TxPool, cxPool *core.CxPool, shardID uint32) *nordicenergy
- func NewBloomIndexer(db ethdb.Database, size, confirms uint64) *core.ChainIndexer
- type BloomIndexer
- type DetailedBlockSignerInfo
- type ExecutionResult
- type NodeAPI
- type PreStakingBlockRewards
- type StdTraceConfig
- type StructLogRes
- type TraceConfig
- type TxTraceResult
- type UndelegationPayouts
Constants ¶
const ( // BloomBitsBlocks is the number of blocks a single bloom bit section vector // contains on the server side. BloomBitsBlocks uint64 = 4096 )
Variables ¶
var ( // ErrFinalizedTransaction is returned if the transaction to be submitted is already on-chain ErrFinalizedTransaction = errors.New("transaction already finalized") )
Functions ¶
func New ¶
func New( nodeAPI NodeAPI, txPool *core.TxPool, cxPool *core.CxPool, shardID uint32, ) *nordicenergy
New creates a new nordicenergy object (including the initialisation of the common nordicenergy object)
func NewBloomIndexer ¶
func NewBloomIndexer(db ethdb.Database, size, confirms uint64) *core.ChainIndexer
NewBloomIndexer returns a chain indexer that generates bloom bits data for the canonical chain for fast logs filtering.
Types ¶
type BloomIndexer ¶
type BloomIndexer struct {
// contains filtered or unexported fields
}
BloomIndexer implements a core.ChainIndexer, building up a rotated bloom bits index for the Ethereum header bloom filters, permitting blazing fast filtering.
func (*BloomIndexer) Commit ¶
func (b *BloomIndexer) Commit() error
Commit implements core.ChainIndexerBackend, finalizing the bloom section and writing it out into the database.
type DetailedBlockSignerInfo ¶
type DetailedBlockSignerInfo struct { // Signers are all the signers for the block Signers shard.SlotList // Committee when the block was signed. Committee shard.SlotList BlockHash common.Hash }
DetailedBlockSignerInfo contains all of the block singing information
type ExecutionResult ¶
type ExecutionResult struct { Gas uint64 `json:"gas"` Failed bool `json:"failed"` ReturnValue string `json:"returnValue"` StructLogs []StructLogRes `json:"structLogs"` }
ExecutionResult groups all structured logs emitted by the EVM while replaying a transaction in debug mode as well as transaction execution status, the amount of gas used and the return value Taken from go-ethereum/internal/ethapi/api.go
type NodeAPI ¶
type NodeAPI interface { AddPendingStakingTransaction(*staking.StakingTransaction) error AddPendingTransaction(newTx *types.Transaction) error Blockchain() *core.BlockChain Beaconchain() *core.BlockChain GetTransactionsHistory(address, txType, order string) ([]common.Hash, error) GetStakingTransactionsHistory(address, txType, order string) ([]common.Hash, error) GetTransactionsCount(address, txType string) (uint64, error) GetStakingTransactionsCount(address, txType string) (uint64, error) IsCurrentlyLeader() bool IsOutOfSync(*core.BlockChain) bool GetMaxPeerHeight() uint64 ReportStakingErrorSink() types.TransactinetrrorReports ReportPlainErrorSink() types.TransactinetrrorReports PendingCXReceipts() []*types.CXReceiptsProof GetNodeBootTime() int64 PeerConnectivity() (int, int, int) ListPeer(topic string) []peer.ID ListTopic() []string ListBlockedPeer() []peer.ID GetConsensusInternal() commonRPC.ConsensusInternal // debug API GetConsensusMode() string GetConsensusPhase() string GetConsensusViewChangingID() uint64 GetConsensusCurViewID() uint64 ShutDown() }
NodeAPI is the list of functions from node used to call rpc apis.
type PreStakingBlockRewards ¶
PreStakingBlockRewards are the rewards for a block in the pre-staking era (epoch < staking epoch).
type StdTraceConfig ¶
StdTraceConfig holds extra parameters to standard-json trace functions.
type StructLogRes ¶
type StructLogRes struct { Pc uint64 `json:"pc"` Op string `json:"op"` CallerAddress common.Address `json:"callerAddress"` ContractAddress common.Address `json:"contractAddress"` Gas uint64 `json:"gas"` GasCost uint64 `json:"gasCost"` Depth int `json:"depth"` Error error `json:"error,omitempty"` Stack []string `json:"stack,omitempty"` Memory []string `json:"memory,omitempty"` Storage map[string]string `json:"storage,omitempty"` }
StructLogRes stores a structured log emitted by the EVM while replaying a transaction in debug mode
func FormatLogs ¶
func FormatLogs(logs []vm.StructLog) []StructLogRes
FormatLogs formats EVM returned structured logs for json output
type TraceConfig ¶
TraceConfig holds extra parameters to trace functions.
type TxTraceResult ¶
type TxTraceResult struct { Result interface{} `json:"result,omitempty"` // Trace results produced by the tracer Error string `json:"error,omitempty"` // Trace failure produced by the tracer }
TxTraceResult is the result of a single transaction trace.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package tracers is a collection of JavaScript transaction tracers.
|
Package tracers is a collection of JavaScript transaction tracers. |
internal/tracers
Package tracers contains the actual JavaScript tracer assets.
|
Package tracers contains the actual JavaScript tracer assets. |