Documentation
¶
Index ¶
- Constants
- Variables
- type Admin
- func (p *Admin) LockProfile(r *http.Request, args *struct{}, reply *api.SuccessResponse) error
- func (p *Admin) MemoryProfile(r *http.Request, args *struct{}, reply *api.SuccessResponse) error
- func (p *Admin) SetLogLevel(r *http.Request, args *SetLogLevelArgs, reply *api.SuccessResponse) error
- func (p *Admin) StartCPUProfiler(r *http.Request, args *struct{}, reply *api.SuccessResponse) error
- func (p *Admin) StopCPUProfiler(r *http.Request, args *struct{}, reply *api.SuccessResponse) error
- type Batch
- type Block
- func (b *Block) Accept() error
- func (b *Block) Bytes() []byte
- func (b *Block) Height() uint64
- func (b *Block) ID() ids.ID
- func (b *Block) Parent() ids.ID
- func (b *Block) Reject() error
- func (b *Block) SetStatus(status choices.Status)
- func (b *Block) Status() choices.Status
- func (b *Block) String() string
- func (b *Block) Timestamp() time.Time
- func (b *Block) Verify() error
- type BlockValidator
- type BuildGenesisArgs
- type BuildGenesisReply
- type Client
- type Config
- type Database
- type DecodeGenesisArgs
- type DecodeGenesisReply
- type Duration
- type Factory
- type GetAcceptedFrontReply
- type GossipHandler
- type Network
- type SetLogLevelArgs
- type SnowmanAPI
- type StaticService
- type Status
- type VM
- func (vm *VM) AppGossip(nodeID ids.ShortID, msg []byte) error
- func (vm *VM) AppRequest(nodeID ids.ShortID, requestID uint32, deadline time.Time, request []byte) error
- func (vm *VM) AppRequestFailed(nodeID ids.ShortID, requestID uint32) error
- func (vm *VM) AppResponse(nodeID ids.ShortID, requestID uint32, response []byte) error
- func (vm *VM) Bootstrapped() error
- func (vm *VM) Bootstrapping() error
- func (vm *VM) Connected(nodeID ids.ShortID) error
- func (vm *VM) CreateHandlers() (map[string]*commonEng.HTTPHandler, error)
- func (vm *VM) CreateStaticHandlers() (map[string]*commonEng.HTTPHandler, error)
- func (vm *VM) Disconnected(nodeID ids.ShortID) error
- func (vm *VM) GetActivationTime() time.Time
- func (vm *VM) GetCurrentNonce(address common.Address) (uint64, error)
- func (vm *VM) HealthCheck() (interface{}, error)
- func (vm *VM) Initialize(ctx *snow.Context, dbManager manager.Manager, genesisBytes []byte, ...) error
- func (vm *VM) NewBlockBuilder(notifyBuildBlockChan chan<- commonEng.Message) *blockBuilder
- func (vm *VM) NewNetwork(appSender commonEng.AppSender) Network
- func (vm *VM) SetPreference(blkID ids.ID) error
- func (vm *VM) Shutdown() error
- func (vm *VM) Version() (string, error)
- type Web3API
Constants ¶
const ( GenesisTestAddr = "0x751a0b96e1042bee789452ecb20253fba40dbe85" GenesisTestKey = "0xabd71b35d559563fea757f0f5edbde286fb8c043105b15abb7cd57189306d7d1" )
test constants
Variables ¶
var ( // GitCommit is set by the build script GitCommit string // Version is the version of Subnet EVM Version string )
var ( // ID this VM should be referenced by ID = ids.ID{'e', 'v', 'm'} )
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct {
// contains filtered or unexported fields
}
Admin is the API service for admin API calls
func NewAdminService ¶
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(r *http.Request, args *SetLogLevelArgs, reply *api.SuccessResponse) error
func (*Admin) StartCPUProfiler ¶
StartCPUProfiler starts a cpu profile writing to the specified file
func (*Admin) StopCPUProfiler ¶
StopCPUProfiler stops the cpu profile
type Batch ¶
Batch implements ethdb.Batch
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
Block implements the snowman.Block interface
func (*Block) SetStatus ¶
SetStatus implements the InternalBlock interface allowing ChainState to set the status on an existing block
type BlockValidator ¶
type BuildGenesisArgs ¶
type BuildGenesisArgs struct { GenesisData *core.Genesis `json:"genesisData"` Encoding formatting.Encoding `json:"encoding"` }
BuildGenesisArgs are arguments for BuildGenesis
type BuildGenesisReply ¶
type BuildGenesisReply struct { GenesisBytes string `json:"genesisBytes"` Encoding formatting.Encoding `json:"encoding"` }
BuildGenesisReply is the reply from BuildGenesis
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client ...
func NewCChainClient ¶
NewCChainClient returns a Client for interacting with the C Chain
func (*Client) LockProfile ¶
func (*Client) MemoryProfile ¶
func (*Client) SetLogLevel ¶
SetLogLevel dynamically sets the log level for the C Chain
func (*Client) StartCPUProfiler ¶
func (*Client) StopCPUProfiler ¶
type Config ¶
type Config struct { // Subnet EVM APIs SnowmanAPIEnabled bool `json:"snowman-api-enabled"` AdminAPIEnabled bool `json:"admin-api-enabled"` AdminAPIDir string `json:"admin-api-dir"` NetAPIEnabled bool `json:"net-api-enabled"` // 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"` // Eth APIs EthAPIEnabled bool `json:"eth-api-enabled"` PersonalAPIEnabled bool `json:"personal-api-enabled"` TxPoolAPIEnabled bool `json:"tx-pool-api-enabled"` DebugAPIEnabled bool `json:"debug-api-enabled"` Web3APIEnabled bool `json:"web3-api-enabled"` // Eth Settings Preimages bool `json:"preimages-enabled"` Pruning bool `json:"pruning-enabled"` SnapshotAsync bool `json:"snapshot-async"` SnapshotVerify bool `json:"snapshot-verification-enabled"` // Metric Settings MetricsEnabled bool `json:"metrics-enabled"` MetricsExpensiveEnabled bool `json:"metrics-expensive-enabled"` // API Settings LocalTxsEnabled bool `json:"local-txs-enabled"` 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"` // 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 RemoteTxGossipOnlyEnabled bool `json:"remote-tx-gossip-only-enabled"` TxRegossipFrequency Duration `json:"tx-regossip-frequency"` TxRegossipMaxSize int `json:"tx-regossip-max-size"` // Log level LogLevel string `json:"log-level"` }
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 Database ¶
Database implements ethdb.Database
func (Database) NewIterator ¶
NewIterator implements ethdb.Database
Note: This method assumes that the prefix is NOT part of the start, so there's no need for the caller to prepend the prefix to the start.
type DecodeGenesisArgs ¶
type DecodeGenesisArgs struct { GenesisBytes string `json:"genesisBytes"` Encoding formatting.Encoding `json:"encoding"` }
DecodeGenesisArgs are arguments for DecodeGenesis
type DecodeGenesisReply ¶
type DecodeGenesisReply struct { Genesis *core.Genesis `json:"genesisData"` Encoding formatting.Encoding `json:"encoding"` }
DecodeGenesisReply is the reply from DecodeGenesis
type Duration ¶
func (*Duration) UnmarshalJSON ¶
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 GossipHandler ¶
type GossipHandler struct { message.NoopHandler // contains filtered or unexported fields }
type Network ¶
type Network interface { // Message handling AppRequestFailed(nodeID ids.ShortID, requestID uint32) error AppRequest(nodeID ids.ShortID, requestID uint32, deadline time.Time, msgBytes []byte) error AppResponse(nodeID ids.ShortID, requestID uint32, msgBytes []byte) error AppGossip(nodeID ids.ShortID, msgBytes []byte) error // Gossip entrypoints GossipEthTxs(txs []*types.Transaction) error }
type SetLogLevelArgs ¶
type SetLogLevelArgs struct {
Level string `json:"level"`
}
type SnowmanAPI ¶
type SnowmanAPI struct {
// contains filtered or unexported fields
}
SnowmanAPI introduces snowman specific functionality to the evm
func (*SnowmanAPI) GetAcceptedFront ¶
func (api *SnowmanAPI) GetAcceptedFront(ctx context.Context) (*GetAcceptedFrontReply, error)
GetAcceptedFront returns the last accepted block's hash and height
func (*SnowmanAPI) IssueBlock ¶
func (api *SnowmanAPI) IssueBlock(ctx context.Context) error
IssueBlock to the chain
type StaticService ¶
type StaticService struct{}
StaticService defines the static API services exposed by the evm
func CreateStaticService ¶
func CreateStaticService() *StaticService
func (*StaticService) BuildGenesis ¶
func (ss *StaticService) BuildGenesis(_ *http.Request, args *BuildGenesisArgs, reply *BuildGenesisReply) error
BuildGenesis constructs a genesis file.
func (*StaticService) DecodeGenesis ¶
func (ss *StaticService) DecodeGenesis(_ *http.Request, args *DecodeGenesisArgs, reply *DecodeGenesisReply) error
BuildGenesis constructs a genesis file.
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 VM ¶
type VM struct { // *chain.State helps to implement the VM interface by wrapping blocks // with an efficient caching layer. *chain.State // contains filtered or unexported fields }
VM implements the snowman.ChainVM interface
func (*VM) AppRequest ¶
func (*VM) AppRequestFailed ¶
func (*VM) AppResponse ¶
func (*VM) Bootstrapped ¶
Bootstrapped notifies this VM that the consensus engine has finished bootstrapping
func (*VM) Bootstrapping ¶
Bootstrapping notifies this VM that the consensus engine is performing bootstrapping
func (*VM) CreateHandlers ¶
func (vm *VM) CreateHandlers() (map[string]*commonEng.HTTPHandler, error)
CreateHandlers makes new http handlers that can handle API calls
func (*VM) CreateStaticHandlers ¶
func (vm *VM) CreateStaticHandlers() (map[string]*commonEng.HTTPHandler, error)
CreateStaticHandlers makes new http handlers that can handle API calls
func (*VM) GetActivationTime ¶
implements SnowmanPlusPlusVM interface
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( ctx *snow.Context, dbManager manager.Manager, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, toEngine chan<- commonEng.Message, fxs []*commonEng.Fx, appSender commonEng.AppSender, ) error
Initialize implements the snowman.ChainVM interface
func (*VM) NewBlockBuilder ¶
func (*VM) NewNetwork ¶
NewNetwork creates a new Network based on the [vm.chainConfig].
func (*VM) SetPreference ¶
SetPreference sets what the current tail of the chain is
type Web3API ¶
type Web3API struct{}
Web3API offers helper API methods
func (*Web3API) ClientVersion ¶
ClientVersion returns the version of the vm running