Documentation
¶
Index ¶
- Variables
- func NewClockWrapper(clock *mockable.Clock) iface.MockableTimer
- func NewDatabaseWrapper(db database.Database) iface.Database
- type Admin
- func (p *Admin) GetVMConfig(_ *http.Request, _ *struct{}, reply *client.ConfigReply) error
- func (p *Admin) LockProfile(_ *http.Request, _ *struct{}, _ *api.EmptyReply) error
- func (p *Admin) MemoryProfile(_ *http.Request, _ *struct{}, _ *api.EmptyReply) error
- func (p *Admin) SetLogLevel(_ *http.Request, args *client.SetLogLevelArgs, reply *api.EmptyReply) error
- func (p *Admin) StartCPUProfiler(_ *http.Request, _ *struct{}, _ *api.EmptyReply) error
- func (p *Admin) StopCPUProfiler(r *http.Request, _ *struct{}, _ *api.EmptyReply) error
- type BatchWrapper
- type Block
- func (b *Block) Accept() error
- func (b *Block) Bytes() []byte
- func (b *Block) Height() uint64
- func (b *Block) ID() string
- func (b *Block) Parent() ids.ID
- func (b *Block) Reject() error
- func (b *Block) ShouldVerifyWithContext(context.Context) (bool, error)
- func (b *Block) Status() choices.Status
- func (b *Block) String() string
- func (b *Block) Time() uint64
- func (b *Block) Timestamp() time.Time
- func (b *Block) Verify(context.Context) error
- func (b *Block) VerifyWithContext(ctx context.Context, proposerVMBlockCtx *block.Context) error
- type BlockValidator
- type ChainAPI
- type ClockWrapper
- type Config
- type DatabaseConfig
- type DatabaseWrapper
- func (d *DatabaseWrapper) Ancient(kind string, number uint64) ([]byte, error)
- func (d *DatabaseWrapper) AncientDatadir() (string, error)
- func (d *DatabaseWrapper) AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error)
- func (d *DatabaseWrapper) AncientSize(kind string) (uint64, error)
- func (d *DatabaseWrapper) Ancients() (uint64, error)
- func (d *DatabaseWrapper) Close() error
- func (d *DatabaseWrapper) Compact(start []byte, limit []byte) error
- func (d *DatabaseWrapper) Delete(key []byte) error
- func (d *DatabaseWrapper) DeleteRange(start, end []byte) error
- func (d *DatabaseWrapper) Get(key []byte) ([]byte, error)
- func (d *DatabaseWrapper) Has(key []byte) (bool, error)
- func (d *DatabaseWrapper) HealthCheck() (interface{}, error)
- func (d *DatabaseWrapper) MigrateTable(string, func([]byte) ([]byte, error)) error
- func (d *DatabaseWrapper) ModifyAncients(fn func(ethdb.AncientWriteOp) error) (int64, error)
- func (d *DatabaseWrapper) NewBatch() ethdb.Batch
- func (d *DatabaseWrapper) NewBatchWithSize(size int) ethdb.Batch
- func (d *DatabaseWrapper) NewIterator(prefix []byte, start []byte) ethdb.Iterator
- func (d *DatabaseWrapper) NewSnapshot() (interface{}, error)
- func (d *DatabaseWrapper) Put(key []byte, value []byte) error
- func (d *DatabaseWrapper) ReadAncients(fn func(ethdb.AncientReaderOp) error) (err error)
- func (d *DatabaseWrapper) Stat() (string, error)
- func (d *DatabaseWrapper) Sync() error
- func (d *DatabaseWrapper) SyncAncient() error
- func (d *DatabaseWrapper) SyncKeyValue() error
- func (d *DatabaseWrapper) Tail() (uint64, error)
- func (d *DatabaseWrapper) TruncateHead(n uint64) (uint64, error)
- func (d *DatabaseWrapper) TruncateTail(n uint64) (uint64, error)
- type Duration
- type EthPushGossiper
- type Factory
- type GetAcceptedFrontReply
- type GossipEthTx
- type GossipEthTxMarshaller
- type GossipEthTxPool
- type StateSyncClient
- type StateSyncServer
- type Status
- type Syncer
- type VM
- func (vm *VM) AppGossip(ctx context.Context, nodeID ids.NodeID, msg []byte) error
- func (vm *VM) AppRequest(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, ...) error
- func (vm *VM) AppRequestFailed(ctx context.Context, nodeID ids.NodeID, requestID uint32, ...) error
- func (vm *VM) AppResponse(ctx context.Context, nodeID ids.NodeID, requestID uint32, response []byte) error
- func (vm *VM) BuildBlock(ctx context.Context) (chainblock.Block, error)
- func (vm *VM) BuildBlockWithContext(ctx context.Context, proposerVMBlockCtx *chainblock.Context) (chainblock.Block, error)
- func (vm *VM) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error
- func (*VM) CreateHTTP2Handler(context.Context) (http.Handler, error)
- func (vm *VM) CreateHandlers(context.Context) (map[string]http.Handler, error)
- func (vm *VM) Disconnected(ctx context.Context, nodeID ids.NodeID) error
- func (vm *VM) GetAcceptedBlock(ctx context.Context, blkID ids.ID) (chainblock.Block, error)
- func (vm *VM) GetBlock(ctx context.Context, id ids.ID) (chainblock.Block, error)
- func (vm *VM) GetBlockIDAtHeight(_ context.Context, height uint64) (ids.ID, error)
- func (vm *VM) GetCurrentNonce(address common.Address) (uint64, error)
- func (vm *VM) HealthCheck(context.Context) (interface{}, error)
- func (vm *VM) Initialize(_ context.Context, chainCtx *nodeconsensus.Context, db database.Database, ...) error
- func (vm *VM) NewBlockBuilder(notifyBuildBlockChan chan<- commonEng.Message) *blockBuilder
- func (vm *VM) NewHTTPHandler(ctx context.Context) (http.Handler, error)
- func (vm *VM) ParseBlock(ctx context.Context, b []byte) (chainblock.Block, error)
- func (vm *VM) ParseEthBlock(b []byte) (*types.Block, error)
- func (vm *VM) SetPreference(ctx context.Context, blkID ids.ID) error
- func (vm *VM) SetState(_ context.Context, state nodeconsensus.State) error
- func (vm *VM) Shutdown(context.Context) error
- func (vm *VM) Version(context.Context) (string, error)
- func (vm *VM) WaitForEvent(ctx context.Context) (commonEng.Message, error)
- type ValidatorsAPI
Constants ¶
This section is empty.
Variables ¶
var ( // ID this VM should be referenced by IDStr = "subnetevm" ID = iface.ID{'s', 'u', 'b', 'n', 'e', 't', 'e', 'v', 'm'} )
var ( // GitCommit is set by the build script GitCommit string // Version is the version of Lux EVM Version string = "v0.8.0" )
Functions ¶
func NewClockWrapper ¶ added in v0.8.1
func NewClockWrapper(clock *mockable.Clock) iface.MockableTimer
NewClockWrapper creates a new clock wrapper
Types ¶
type Admin ¶
type Admin struct {
// contains filtered or unexported fields
}
Admin is the API service for admin API calls
func NewAdminService ¶
func (*Admin) GetVMConfig ¶
func (*Admin) LockProfile ¶
LockProfile runs a mutex profile writing to the specified file
func (*Admin) MemoryProfile ¶
MemoryProfile runs a memory profile writing to the specified file
func (*Admin) SetLogLevel ¶
func (p *Admin) SetLogLevel(_ *http.Request, args *client.SetLogLevelArgs, reply *api.EmptyReply) error
func (*Admin) StartCPUProfiler ¶
StartCPUProfiler starts a cpu profile writing to the specified file
func (*Admin) StopCPUProfiler ¶
StopCPUProfiler stops the cpu profile
type BatchWrapper ¶ added in v0.8.1
BatchWrapper wraps a node batch to provide compatibility with ethdb.Batch interface
func (*BatchWrapper) DeleteRange ¶ added in v0.8.1
func (b *BatchWrapper) DeleteRange(start, end []byte) error
DeleteRange implements ethdb.Batch interface
func (*BatchWrapper) Replay ¶ added in v0.8.1
func (b *BatchWrapper) Replay(w ethdb.KeyValueWriter) error
Replay implements ethdb.Batch interface
func (*BatchWrapper) ValueSize ¶ added in v0.8.1
func (b *BatchWrapper) ValueSize() int
ValueSize implements ethdb.Batch interface
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
Block implements the chain.Block interface
func (*Block) ShouldVerifyWithContext ¶
ShouldVerifyWithContext implements the iface.WithVerifyContext interface
type BlockValidator ¶
func NewBlockValidator ¶
func NewBlockValidator() BlockValidator
type ChainAPI ¶
type ChainAPI struct {
// contains filtered or unexported fields
}
ChainAPI introduces linear specific functionality to the evm
func (*ChainAPI) GetAcceptedFront ¶
func (api *ChainAPI) GetAcceptedFront(ctx context.Context) (*GetAcceptedFrontReply, error)
GetAcceptedFront returns the last accepted block's hash and height
type ClockWrapper ¶ added in v0.8.1
ClockWrapper wraps a mockable.Clock to implement iface.MockableTimer
func (*ClockWrapper) Advance ¶ added in v0.8.1
func (c *ClockWrapper) Advance(d time.Duration)
Advance implements iface.MockableTimer
type Config ¶
type Config struct {
// Airdrop
AirdropFile string `json:"airdrop"`
// Lux EVM APIs
ChainAPIEnabled bool `json:"chain-api-enabled"`
WarpAPIEnabled bool `json:"warp-api-enabled"`
AdminAPIEnabled bool `json:"admin-api-enabled"`
AdminAPIDir string `json:"admin-api-dir"`
ValidatorsAPIEnabled bool `json:"validators-api-enabled"`
// EnabledEthAPIs is a list of Ethereum services that should be enabled
// If none is specified, then we use the default list [defaultEnabledAPIs]
EnabledEthAPIs []string `json:"eth-apis"`
// Continuous Profiler
ContinuousProfilerDir string `json:"continuous-profiler-dir"` // If set to non-empty string creates a continuous profiler
ContinuousProfilerFrequency Duration `json:"continuous-profiler-frequency"` // Frequency to run continuous profiler if enabled
ContinuousProfilerMaxFiles int `json:"continuous-profiler-max-files"` // Maximum number of files to maintain
// Gas/Price Caps
RPCGasCap uint64 `json:"rpc-gas-cap"`
RPCTxFeeCap float64 `json:"rpc-tx-fee-cap"`
// Cache settings
TrieCleanCache int `json:"trie-clean-cache"` // Size of the trie clean cache (MB)
TrieCleanJournal string `json:"trie-clean-journal"` // Directory to use to save the trie clean cache (must be populated to enable journaling the trie clean cache)
TrieCleanRejournal Duration `json:"trie-clean-rejournal"` // Frequency to re-journal the trie clean cache to disk (minimum 1 minute, must be populated to enable journaling the trie clean cache)
TrieDirtyCache int `json:"trie-dirty-cache"` // Size of the trie dirty cache (MB)
TrieDirtyCommitTarget int `json:"trie-dirty-commit-target"` // Memory limit to target in the dirty cache before performing a commit (MB)
SnapshotCache int `json:"snapshot-cache"` // Size of the snapshot disk layer clean cache (MB)
// Eth Settings
Preimages bool `json:"preimages-enabled"`
SnapshotWait bool `json:"snapshot-wait"`
SnapshotVerify bool `json:"snapshot-verification-enabled"`
// Pruning Settings
Pruning bool `json:"pruning-enabled"` // If enabled, trie roots are only persisted every 4096 blocks
AcceptorQueueLimit int `json:"accepted-queue-limit"` // Maximum blocks to queue before blocking during acceptance
CommitInterval uint64 `json:"commit-interval"` // Specifies the commit interval at which to persist EVM and atomic tries.
AllowMissingTries bool `json:"allow-missing-tries"` // If enabled, warnings preventing an incomplete trie index are suppressed
PopulateMissingTries *uint64 `json:"populate-missing-tries,omitempty"` // Sets the starting point for re-populating missing tries. Disables re-generation if nil.
PopulateMissingTriesParallelism int `json:"populate-missing-tries-parallelism"` // Number of concurrent readers to use when re-populating missing tries on startup.
PruneWarpDB bool `json:"prune-warp-db-enabled"` // Determines if the warpDB should be cleared on startup
// Metric Settings
MetricsExpensiveEnabled bool `json:"metrics-expensive-enabled"` // Debug-level metrics that might impact runtime performance
// API Settings
LocalTxsEnabled bool `json:"local-txs-enabled"`
TxPoolJournal string `json:"tx-pool-journal"`
TxPoolRejournal Duration `json:"tx-pool-rejournal"`
TxPoolPriceLimit uint64 `json:"tx-pool-price-limit"`
TxPoolPriceBump uint64 `json:"tx-pool-price-bump"`
TxPoolAccountSlots uint64 `json:"tx-pool-account-slots"`
TxPoolGlobalSlots uint64 `json:"tx-pool-global-slots"`
TxPoolAccountQueue uint64 `json:"tx-pool-account-queue"`
TxPoolGlobalQueue uint64 `json:"tx-pool-global-queue"`
TxPoolLifetime Duration `json:"tx-pool-lifetime"`
APIMaxDuration Duration `json:"api-max-duration"`
WSCPURefillRate Duration `json:"ws-cpu-refill-rate"`
WSCPUMaxStored Duration `json:"ws-cpu-max-stored"`
MaxBlocksPerRequest int64 `json:"api-max-blocks-per-request"`
AllowUnfinalizedQueries bool `json:"allow-unfinalized-queries"`
AllowUnprotectedTxs bool `json:"allow-unprotected-txs"`
AllowUnprotectedTxHashes []common.Hash `json:"allow-unprotected-tx-hashes"`
// Keystore Settings
KeystoreDirectory string `json:"keystore-directory"` // both absolute and relative supported
KeystoreExternalSigner string `json:"keystore-external-signer"`
KeystoreInsecureUnlockAllowed bool `json:"keystore-insecure-unlock-allowed"`
// Gossip Settings
RemoteGossipOnlyEnabled bool `json:"remote-gossip-only-enabled"`
RegossipFrequency Duration `json:"regossip-frequency"`
RegossipMaxTxs int `json:"regossip-max-txs"`
RegossipTxsPerAddress int `json:"regossip-txs-per-address"`
PriorityRegossipFrequency Duration `json:"priority-regossip-frequency"`
PriorityRegossipMaxTxs int `json:"priority-regossip-max-txs"`
PriorityRegossipTxsPerAddress int `json:"priority-regossip-txs-per-address"`
PriorityRegossipAddresses []common.Address `json:"priority-regossip-addresses"`
// Log
LogLevel string `json:"log-level"`
LogJSONFormat bool `json:"log-json-format"`
// Address for Tx Fees (must be empty if not supported by blockchain)
FeeRecipient string `json:"feeRecipient"`
// Offline Pruning Settings
OfflinePruning bool `json:"offline-pruning-enabled"`
OfflinePruningBloomFilterSize uint64 `json:"offline-pruning-bloom-filter-size"`
OfflinePruningDataDirectory string `json:"offline-pruning-data-directory"`
// VM2VM network
MaxOutboundActiveRequests int64 `json:"max-outbound-active-requests"`
MaxOutboundActiveCrossChainRequests int64 `json:"max-outbound-active-cross-chain-requests"`
// Sync settings
StateSyncEnabled bool `json:"state-sync-enabled"`
StateSyncSkipResume bool `json:"state-sync-skip-resume"` // Forces state sync to use the highest available summary block
StateSyncServerTrieCache int `json:"state-sync-server-trie-cache"`
StateSyncIDs string `json:"state-sync-ids"`
StateSyncCommitInterval uint64 `json:"state-sync-commit-interval"`
StateSyncMinBlocks uint64 `json:"state-sync-min-blocks"`
StateSyncRequestSize uint16 `json:"state-sync-request-size"`
// Database Settings
InspectDatabase bool `json:"inspect-database"` // Inspects the database on startup if enabled.
// SkipUpgradeCheck disables checking that upgrades must take place before the last
// accepted interfaces. Skipping this check is useful when a node operator does not update
// their node before the network upgrade and their node accepts blocks that have
// identical state with the pre-upgrade ruleset.
SkipUpgradeCheck bool `json:"skip-upgrade-check"`
// TriePrefetcherParallelism sets the number of goroutines to use for trie prefetching
TriePrefetcherParallelism int `json:"trie-prefetcher-parallelism"`
// HistoricalProofQueryWindow is the number of blocks before the last accepted block to be accepted for state queries.
HistoricalProofQueryWindow uint64 `json:"historical-proof-query-window"`
// TransactionHistory is the number of blocks to keep the transaction history for
TransactionHistory uint64 `json:"transaction-history"`
// SkipTxIndexing disables transaction indexing
SkipTxIndexing bool `json:"skip-tx-indexing"`
// AcceptedCacheSize is the depth to keep in the accepted headers cache and the
// accepted logs cache at the accepted tip.
//
// This is particularly useful for improving the performance of eth_getLogs
// on RPC nodes.
AcceptedCacheSize int `json:"accepted-cache-size"`
// TxLookupLimit is the maximum number of blocks from head whose tx indices
// are reserved:
// * 0: means no limit
// * N: means N block limit [HEAD-N+1, HEAD] and delete extra indexes
TxLookupLimit uint64 `json:"tx-lookup-limit"`
// WarpOffChainMessages encodes off-chain messages (unrelated to any on-chain event ie. block or AddressedCall)
// that the node should be willing to sign.
// Note: only supports AddressedCall payloads as defined here:
// https://github.com/luxfi/node/tree/7623ffd4be915a5185c9ed5e11fa9be15a6e1f00/vms/platformvm/warp/payload#addressedcall
WarpOffChainMessages []hexutil.Bytes `json:"warp-off-chain-messages"`
}
Config ...
func (Config) EthAPIs ¶
EthAPIs returns an array of strings representing the Eth APIs that should be enabled
func (Config) EthBackendSettings ¶
func (*Config) SetDefaults ¶
func (c *Config) SetDefaults()
type DatabaseConfig ¶
type DatabaseConfig struct {
// If true, all writes are to memory and are discarded at shutdown.
ReadOnly bool `json:"readOnly"`
// Path to database
Path string `json:"path"`
// Name of the database type to use
Name string `json:"name"`
// Config bytes (JSON) for the database
// See relevant (pebbledb, leveldb) config options
Config []byte `json:"-"`
}
type DatabaseWrapper ¶ added in v0.8.1
DatabaseWrapper wraps a node database to provide compatibility with EVM database interfaces
func (*DatabaseWrapper) Ancient ¶ added in v0.8.1
func (d *DatabaseWrapper) Ancient(kind string, number uint64) ([]byte, error)
Ancient methods - not supported by node database, required by ethdb.Database
func (*DatabaseWrapper) AncientDatadir ¶ added in v0.8.1
func (d *DatabaseWrapper) AncientDatadir() (string, error)
func (*DatabaseWrapper) AncientRange ¶ added in v0.8.1
func (d *DatabaseWrapper) AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error)
func (*DatabaseWrapper) AncientSize ¶ added in v0.8.1
func (d *DatabaseWrapper) AncientSize(kind string) (uint64, error)
func (*DatabaseWrapper) Ancients ¶ added in v0.8.1
func (d *DatabaseWrapper) Ancients() (uint64, error)
func (*DatabaseWrapper) Close ¶ added in v0.8.1
func (d *DatabaseWrapper) Close() error
Close closes the database
func (*DatabaseWrapper) Compact ¶ added in v0.8.1
func (d *DatabaseWrapper) Compact(start []byte, limit []byte) error
Compact implements ethdb interface
func (*DatabaseWrapper) Delete ¶ added in v0.8.1
func (d *DatabaseWrapper) Delete(key []byte) error
Delete implements ethdb interface
func (*DatabaseWrapper) DeleteRange ¶ added in v0.8.1
func (d *DatabaseWrapper) DeleteRange(start, end []byte) error
DeleteRange deletes all of the keys (and values) in the range [start,end) (inclusive on start, exclusive on end).
func (*DatabaseWrapper) Get ¶ added in v0.8.1
func (d *DatabaseWrapper) Get(key []byte) ([]byte, error)
Get implements ethdb interface
func (*DatabaseWrapper) Has ¶ added in v0.8.1
func (d *DatabaseWrapper) Has(key []byte) (bool, error)
Has implements ethdb interface
func (*DatabaseWrapper) HealthCheck ¶ added in v0.8.1
func (d *DatabaseWrapper) HealthCheck() (interface{}, error)
HealthCheck implements the HealthChecker interface
func (*DatabaseWrapper) MigrateTable ¶ added in v0.8.1
func (*DatabaseWrapper) ModifyAncients ¶ added in v0.8.1
func (d *DatabaseWrapper) ModifyAncients(fn func(ethdb.AncientWriteOp) error) (int64, error)
func (*DatabaseWrapper) NewBatch ¶ added in v0.8.1
func (d *DatabaseWrapper) NewBatch() ethdb.Batch
NewBatch implements ethdb interface
func (*DatabaseWrapper) NewBatchWithSize ¶ added in v0.8.1
func (d *DatabaseWrapper) NewBatchWithSize(size int) ethdb.Batch
NewBatchWithSize creates a write-only database batch with pre-allocated buffer.
func (*DatabaseWrapper) NewIterator ¶ added in v0.8.1
func (d *DatabaseWrapper) NewIterator(prefix []byte, start []byte) ethdb.Iterator
NewIterator implements ethdb interface
func (*DatabaseWrapper) NewSnapshot ¶ added in v0.8.1
func (d *DatabaseWrapper) NewSnapshot() (interface{}, error)
func (*DatabaseWrapper) Put ¶ added in v0.8.1
func (d *DatabaseWrapper) Put(key []byte, value []byte) error
Put implements ethdb interface
func (*DatabaseWrapper) ReadAncients ¶ added in v0.8.1
func (d *DatabaseWrapper) ReadAncients(fn func(ethdb.AncientReaderOp) error) (err error)
ReadAncients reads multiple ancient values in one go
func (*DatabaseWrapper) Stat ¶ added in v0.8.1
func (d *DatabaseWrapper) Stat() (string, error)
func (*DatabaseWrapper) Sync ¶ added in v0.8.1
func (d *DatabaseWrapper) Sync() error
func (*DatabaseWrapper) SyncAncient ¶ added in v0.8.1
func (d *DatabaseWrapper) SyncAncient() error
SyncAncient flushes the accumulated writes to disk synchronously.
func (*DatabaseWrapper) SyncKeyValue ¶ added in v0.8.1
func (d *DatabaseWrapper) SyncKeyValue() error
SyncKeyValue flushes the key-value store to disk synchronously.
func (*DatabaseWrapper) Tail ¶ added in v0.8.1
func (d *DatabaseWrapper) Tail() (uint64, error)
func (*DatabaseWrapper) TruncateHead ¶ added in v0.8.1
func (d *DatabaseWrapper) TruncateHead(n uint64) (uint64, error)
func (*DatabaseWrapper) TruncateTail ¶ added in v0.8.1
func (d *DatabaseWrapper) TruncateTail(n uint64) (uint64, error)
type Duration ¶
func (Duration) MarshalJSON ¶
String implements the stringer interface.
func (*Duration) UnmarshalJSON ¶
type EthPushGossiper ¶ added in v0.8.1
type EthPushGossiper struct {
// contains filtered or unexported fields
}
EthPushGossiper handles gossiping of Ethereum transactions
func (*EthPushGossiper) Add ¶ added in v0.8.1
func (e *EthPushGossiper) Add(tx *types.Transaction)
Add implements the eth.PushGossiper interface
type GetAcceptedFrontReply ¶
type GetAcceptedFrontReply struct {
Hash common.Hash `json:"hash"`
Number *big.Int `json:"number"`
}
GetAcceptedFrontReply defines the reply that will be sent from the GetAcceptedFront API call
type GossipEthTx ¶ added in v0.8.1
type GossipEthTx struct {
Tx *types.Transaction
}
func (*GossipEthTx) GossipID ¶ added in v0.8.1
func (tx *GossipEthTx) GossipID() ids.ID
type GossipEthTxMarshaller ¶ added in v0.8.1
type GossipEthTxMarshaller struct{}
func (GossipEthTxMarshaller) MarshalGossip ¶ added in v0.8.1
func (g GossipEthTxMarshaller) MarshalGossip(tx *GossipEthTx) ([]byte, error)
func (GossipEthTxMarshaller) UnmarshalGossip ¶ added in v0.8.1
func (g GossipEthTxMarshaller) UnmarshalGossip(bytes []byte) (*GossipEthTx, error)
type GossipEthTxPool ¶ added in v0.8.1
type GossipEthTxPool struct {
// contains filtered or unexported fields
}
GossipEthTxPool is an implementation of gossip.Set[*GossipEthTx]
func NewGossipEthTxPool ¶ added in v0.8.1
func NewGossipEthTxPool(txPool *txpool.TxPool, sdkMetrics luxmetrics.Metrics) (*GossipEthTxPool, error)
func (*GossipEthTxPool) Add ¶ added in v0.8.1
func (g *GossipEthTxPool) Add(tx *GossipEthTx) error
func (*GossipEthTxPool) GetFilter ¶ added in v0.8.1
func (g *GossipEthTxPool) GetFilter() ([]byte, []byte)
func (*GossipEthTxPool) Iterate ¶ added in v0.8.1
func (g *GossipEthTxPool) Iterate(f func(*GossipEthTx) bool)
func (*GossipEthTxPool) Subscribe ¶ added in v0.8.1
func (g *GossipEthTxPool) Subscribe(ctx context.Context)
Subscribe subscribes to transaction pool events
type StateSyncClient ¶
type StateSyncClient interface {
// methods that implement the client side of [block.StateSyncableVM]
StateSyncEnabled(context.Context) (bool, error)
GetOngoingSyncStateSummary(context.Context) (block.StateSummary, error)
ParseStateSummary(ctx context.Context, summaryBytes []byte) (block.StateSummary, error)
// additional methods required by the evm package
ClearOngoingSummary() error
Shutdown() error
Error() error
}
func NewStateSyncClient ¶
func NewStateSyncClient(config *stateSyncClientConfig) StateSyncClient
type StateSyncServer ¶
type StateSyncServer interface {
GetLastStateSummary(context.Context) (block.StateSummary, error)
GetStateSummary(context.Context, uint64) (block.StateSummary, error)
}
func NewStateSyncServer ¶
func NewStateSyncServer(config *stateSyncServerConfig) StateSyncServer
type Status ¶
type Status uint32
Status ...
List of possible status values Unknown Zero value, means the status is not known Dropped means the transaction was in the mempool, but was dropped because it failed verification Processing means the transaction is in the mempool Accepted means the transaction was accepted
type Syncer ¶
Syncer represents a step in state sync, along with Start/Done methods to control and monitor progress. Error returns an error if any was encountered.
type VM ¶
type VM struct {
// *chain.State helps to implement the VM interface by wrapping blocks
// with an efficient caching layer.
*chain.State
Network *p2p.Network
// State sync server and client
StateSyncServer
StateSyncClient
// contains filtered or unexported fields
}
VM implements the block.ChainVM interface
func (*VM) AppRequest ¶ added in v0.8.1
func (vm *VM) AppRequest(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, request []byte) error
AppRequest handles incoming app requests
func (*VM) AppRequestFailed ¶ added in v0.8.1
func (vm *VM) AppRequestFailed(ctx context.Context, nodeID ids.NodeID, requestID uint32, appErr *commonEng.AppError) error
AppRequestFailed handles failed app requests
func (*VM) AppResponse ¶ added in v0.8.1
func (vm *VM) AppResponse(ctx context.Context, nodeID ids.NodeID, requestID uint32, response []byte) error
AppResponse handles incoming app responses
func (*VM) BuildBlock ¶ added in v0.8.2
BuildBlock builds a block to be wrapped by ChainState
func (*VM) BuildBlockWithContext ¶ added in v0.8.2
func (vm *VM) BuildBlockWithContext(ctx context.Context, proposerVMBlockCtx *chainblock.Context) (chainblock.Block, error)
func (*VM) Connected ¶ added in v0.8.1
func (vm *VM) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error
Connected handles new peer connections
func (*VM) CreateHTTP2Handler ¶
func (*VM) CreateHandlers ¶
CreateHandlers makes new http handlers that can handle API calls
func (*VM) GetAcceptedBlock ¶
GetAcceptedBlock attempts to retrieve block [blkID] from the VM. This method only returns accepted blocks.
func (*VM) GetBlockIDAtHeight ¶
GetBlockIDAtHeight returns the canonical block at [height]. Note: the engine assumes that if a block is not found at [height], then [database.ErrNotFound] will be returned. This indicates that the VM has state synced and does not have all historical blocks available.
func (*VM) GetCurrentNonce ¶
GetCurrentNonce returns the nonce associated with the address at the preferred block
func (*VM) HealthCheck ¶
Health returns nil if this chain is healthy. Also returns details, which should be one of: string, []byte, map[string]string
func (*VM) Initialize ¶
func (vm *VM) Initialize( _ context.Context, chainCtx *nodeconsensus.Context, db database.Database, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, fxs []*commonEng.Fx, appSender commonEng.AppSender, ) error
Initialize implements the block.ChainVM interface
func (*VM) NewBlockBuilder ¶
func (*VM) NewHTTPHandler ¶ added in v0.7.10
func (*VM) ParseBlock ¶ added in v0.8.2
ParseBlock parses [b] into a block.
func (*VM) SetPreference ¶
SetPreference sets what the current tail of the chain is
type ValidatorsAPI ¶
type ValidatorsAPI struct {
// contains filtered or unexported fields
}
func (*ValidatorsAPI) GetCurrentValidators ¶
func (api *ValidatorsAPI) GetCurrentValidators(_ *http.Request, req *client.GetCurrentValidatorsRequest, reply *client.GetCurrentValidatorsResponse) error
Source Files
¶
- admin.go
- api.go
- app_sender_adapter.go
- block.go
- block_builder.go
- block_verification.go
- clock_wrapper.go
- codec_wrapper.go
- config.go
- database_wrapper.go
- eth_push_gossiper.go
- factory.go
- gossip.go
- health.go
- init.go
- logger_compat.go
- network_handler.go
- p2p_handler_wrapper.go
- service.go
- status.go
- syncervm_client.go
- syncervm_server.go
- version.go
- vm.go
- vm_database.go
Directories
¶
| Path | Synopsis |
|---|---|
|
blockgascost implements the block gas cost logic
|
blockgascost implements the block gas cost logic |
|
(c) 2025, Lux Industries, Inc.
|
(c) 2025, Lux Industries, Inc. |
|
manager is a no-op stub that allows the EVM library to compile without node-level dependencies.
|
manager is a no-op stub that allows the EVM library to compile without node-level dependencies. |