Versions in this module Expand all Collapse all v0 v0.9.5 Feb 22, 2022 v0.9.4 Feb 22, 2022 Changes in this version + const GenesisTestAddr + const GenesisTestKey + var Codec codec.Manager + var EVMInputGas uint64 = (common.AddressLength+wrappers.LongLen+hashing.HashLen+wrappers.LongLen)*TxBytesGas + secp256k1fx.CostPerSignature + var EVMOutputGas uint64 = (common.AddressLength + wrappers.LongLen + hashing.HashLen) * TxBytesGas + var GitCommit string + var ID = ids.ID + var TxBytesGas uint64 = 1 + var Version string = "v0.8.5" + func FormatEthAddress(addr common.Address) string + func GetEthAddress(privKey *crypto.PrivateKeySECP256K1R) common.Address + func IsSortedAndUniqueEVMInputs(inputs []EVMInput) bool + func IsSortedAndUniqueEVMOutputs(outputs []EVMOutput) bool + func IsSortedEVMOutputs(outputs []EVMOutput) bool + func ParseEthAddress(addrStr string) (common.Address, error) + func PublicKeyToEthAddress(pubKey *crypto.PublicKeySECP256K1R) common.Address + func SortEVMInputsAndSigners(inputs []EVMInput, signers [][]*crypto.PrivateKeySECP256K1R) + func SortEVMOutputs(outputs []EVMOutput) + type Admin struct + func NewAdminService(vm *VM, performanceDir string) *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 AtomicTrie interface + Index func(height uint64, atomicOps map[ids.ID]*atomic.Requests) error + Iterator func(hash common.Hash, startHeight uint64) (AtomicTrieIterator, error) + LastCommitted func() (common.Hash, uint64) + Root func(height uint64) (common.Hash, error) + TrieDB func() *trie.Database + func NewAtomicTrie(db *versiondb.Database, bonusBlocks map[uint64]ids.ID, repo AtomicTxRepository, ...) (AtomicTrie, error) + type AtomicTrieIterator interface + AtomicOps func() *atomic.Requests + BlockNumber func() uint64 + BlockchainID func() ids.ID + Error func() error + Next func() bool + func NewAtomicTrieIterator(trieIterator *trie.Iterator, codec codec.Manager) AtomicTrieIterator + type AtomicTxRepository interface + GetByHeight func(height uint64) ([]*Tx, error) + GetByTxID func(txID ids.ID) (*Tx, uint64, error) + GetIndexHeight func() (uint64, error) + IsBonusBlocksRepaired func() (bool, error) + IterateByHeight func([]byte) database.Iterator + MarkBonusBlocksRepaired func(repairedEntries uint64) error + Write func(height uint64, txs []*Tx) error + WriteBonus func(height uint64, txs []*Tx) error + func NewAtomicTxRepository(db *versiondb.Database, codec codec.Manager, lastAcceptedHeight uint64) (AtomicTxRepository, error) + type AvaxAPI struct + func (service *AvaxAPI) Export(_ *http.Request, args *ExportArgs, response *api.JSONTxID) error + func (service *AvaxAPI) ExportAVAX(_ *http.Request, args *ExportAVAXArgs, response *api.JSONTxID) error + func (service *AvaxAPI) ExportKey(r *http.Request, args *ExportKeyArgs, reply *ExportKeyReply) error + func (service *AvaxAPI) GetAtomicTx(r *http.Request, args *api.GetTxArgs, reply *FormattedTx) error + func (service *AvaxAPI) GetAtomicTxStatus(r *http.Request, args *api.JSONTxID, reply *GetAtomicTxStatusReply) error + func (service *AvaxAPI) GetUTXOs(r *http.Request, args *api.GetUTXOsArgs, reply *api.GetUTXOsReply) error + func (service *AvaxAPI) Import(_ *http.Request, args *ImportArgs, response *api.JSONTxID) error + func (service *AvaxAPI) ImportAVAX(_ *http.Request, args *ImportArgs, response *api.JSONTxID) error + func (service *AvaxAPI) ImportKey(r *http.Request, args *ImportKeyArgs, reply *api.JSONAddress) error + func (service *AvaxAPI) IssueTx(r *http.Request, args *api.FormattedTx, response *api.JSONTxID) error + func (service *AvaxAPI) Version(r *http.Request, args *struct{}, reply *VersionReply) error + type Batch struct + func (batch Batch) Replay(w ethdb.KeyValueWriter) error + func (batch Batch) ValueSize() int + type Block struct + 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 interface + SyntacticVerify func(b *Block) error + type BuildGenesisReply struct + Bytes string + Encoding formatting.Encoding + type Client interface + Export func(ctx context.Context, userPass api.UserPass, amount uint64, to string, ...) (ids.ID, error) + ExportAVAX func(ctx context.Context, userPass api.UserPass, amount uint64, to string) (ids.ID, error) + ExportKey func(ctx context.Context, userPass api.UserPass, addr string) (string, string, error) + GetAtomicTx func(ctx context.Context, txID ids.ID) ([]byte, error) + GetAtomicTxStatus func(ctx context.Context, txID ids.ID) (Status, error) + GetAtomicUTXOs func(ctx context.Context, addrs []string, sourceChain string, limit uint32, ...) ([][]byte, api.Index, error) + Import func(ctx context.Context, userPass api.UserPass, to string, sourceChain string) (ids.ID, error) + ImportKey func(ctx context.Context, userPass api.UserPass, privateKey string) (string, error) + IssueTx func(ctx context.Context, txBytes []byte) (ids.ID, error) + ListAddresses func(ctx context.Context, userPass api.UserPass) ([]string, error) + LockProfile func(ctx context.Context) (bool, error) + MemoryProfile func(ctx context.Context) (bool, error) + SetLogLevel func(ctx context.Context, level log.Lvl) (bool, error) + StartCPUProfiler func(ctx context.Context) (bool, error) + StopCPUProfiler func(ctx context.Context) (bool, error) + func NewCChainClient(uri string) Client + func NewClient(uri, chain string) Client + type Config struct + APIMaxDuration Duration + AllowUnfinalizedQueries bool + AllowUnprotectedTxs bool + ContinuousProfilerDir string + ContinuousProfilerFrequency Duration + ContinuousProfilerMaxFiles int + CorethAdminAPIDir string + CorethAdminAPIEnabled bool + EnabledEthAPIs []string + KeystoreDirectory string + KeystoreExternalSigner string + KeystoreInsecureUnlockAllowed bool + LocalTxsEnabled bool + LogLevel string + MaxBlocksPerRequest int64 + MaxOutboundActiveRequests int64 + MetricsEnabled bool + MetricsExpensiveEnabled bool + OfflinePruning bool + OfflinePruningBloomFilterSize uint64 + OfflinePruningDataDirectory string + Preimages bool + Pruning bool + RPCGasCap uint64 + RPCTxFeeCap float64 + RemoteTxGossipOnlyEnabled bool + SnapshotAsync bool + SnapshotVerify bool + SnowmanAPIEnabled bool + TxRegossipFrequency Duration + TxRegossipMaxSize int + WSCPUMaxStored Duration + WSCPURefillRate Duration + func (c *Config) SetDefaults() + func (c Config) EthAPIs() []string + func (c Config) EthBackendSettings() eth.Settings + type Database struct + func (db Database) NewBatch() ethdb.Batch + func (db Database) NewIterator(prefix []byte, start []byte) ethdb.Iterator + func (db Database) NewIteratorWithStart(start []byte) ethdb.Iterator + type Duration struct + func (d *Duration) UnmarshalJSON(data []byte) (err error) + type EVMInput struct + Address common.Address + Amount uint64 + AssetID ids.ID + Nonce uint64 + func (in *EVMInput) Verify() error + type EVMOutput struct + Address common.Address + Amount uint64 + AssetID ids.ID + func (out *EVMOutput) Verify() error + type ExportAVAXArgs struct + Amount json.Uint64 + BaseFee *hexutil.Big + To string + type ExportArgs struct + AssetID string + type ExportKeyArgs struct + Address string + type ExportKeyReply struct + PrivateKey string + PrivateKeyHex string + type Factory struct + func (f *Factory) New(*snow.Context) (interface{}, error) + type FormattedTx struct + BlockHeight *json.Uint64 + type GetAcceptedFrontReply struct + Hash common.Hash + Number *big.Int + type GetAtomicTxStatusReply struct + BlockHeight *json.Uint64 + Status Status + type GossipHandler struct + func NewGossipHandler(vm *VM) *GossipHandler + func (h *GossipHandler) HandleAtomicTx(nodeID ids.ShortID, msg *message.AtomicTx) error + func (h *GossipHandler) HandleEthTxs(nodeID ids.ShortID, msg *message.EthTxs) error + type Gossiper interface + GossipAtomicTxs func(txs []*Tx) error + GossipEthTxs func(txs []*types.Transaction) error + type ImportArgs struct + BaseFee *hexutil.Big + SourceChain string + To string + type ImportKeyArgs struct + PrivateKey string + type Mempool struct + AVAXAssetID ids.ID + Pending chan struct{} + func NewMempool(AVAXAssetID ids.ID, maxSize int) *Mempool + func (m *Mempool) AddTx(tx *Tx) error + func (m *Mempool) CancelCurrentTx(txID ids.ID) + func (m *Mempool) CancelCurrentTxs() + func (m *Mempool) DiscardCurrentTx(txID ids.ID) + func (m *Mempool) DiscardCurrentTxs() + func (m *Mempool) ForceAddTx(tx *Tx) error + func (m *Mempool) GetNewTxs() []*Tx + func (m *Mempool) GetPendingTx(txID ids.ID) (*Tx, bool) + func (m *Mempool) GetTx(txID ids.ID) (*Tx, bool, bool) + func (m *Mempool) IssueCurrentTxs() + func (m *Mempool) Len() int + func (m *Mempool) NextTx() (*Tx, bool) + func (m *Mempool) RemoveTx(txID ids.ID) + type SetLogLevelArgs struct + Level string + type SnowmanAPI struct + func (api *SnowmanAPI) GetAcceptedFront(ctx context.Context) (*GetAcceptedFrontReply, error) + func (api *SnowmanAPI) IssueBlock(ctx context.Context) error + type StaticService struct + func (*StaticService) BuildGenesis(_ context.Context, args *core.Genesis) (*BuildGenesisReply, error) + type Status uint32 + const Accepted + const Dropped + const Processing + const Unknown + func (s *Status) UnmarshalJSON(b []byte) error + func (s Status) MarshalJSON() ([]byte, error) + func (s Status) String() string + func (s Status) Valid() error + type TestTx struct + AcceptRequestsBlockchainIDV ids.ID + AcceptRequestsV *atomic.Requests + BurnedV uint64 + BytesV []byte + EVMStateTransferV error + GasUsedV uint64 + IDV ids.ID + InputUTXOsV ids.Set + SemanticVerifyV error + UnsignedBytesV []byte + VerifyV error + func (t *TestTx) AtomicOps() (ids.ID, *atomic.Requests, error) + func (t *TestTx) Burned(assetID ids.ID) (uint64, error) + func (t *TestTx) Bytes() []byte + func (t *TestTx) EVMStateTransfer(ctx *snow.Context, state *state.StateDB) error + func (t *TestTx) GasUsed(fixedFee bool) (uint64, error) + func (t *TestTx) ID() ids.ID + func (t *TestTx) Initialize(unsignedBytes, signedBytes []byte) + func (t *TestTx) InputUTXOs() ids.Set + func (t *TestTx) SemanticVerify(vm *VM, stx *Tx, parent *Block, baseFee *big.Int, rules params.Rules) error + func (t *TestTx) UnsignedBytes() []byte + func (t *TestTx) Verify(ctx *snow.Context, rules params.Rules) error + type Tx struct + Creds []verify.Verifiable + func ExtractAtomicTx(atomicTxBytes []byte, codec codec.Manager) (*Tx, error) + func ExtractAtomicTxs(atomicTxBytes []byte, batch bool, codec codec.Manager) ([]*Tx, error) + func ExtractAtomicTxsBatch(atomicTxBytes []byte, codec codec.Manager) ([]*Tx, error) + func (tx *Tx) BlockFeeContribution(fixedFee bool, avaxAssetID ids.ID, baseFee *big.Int) (*big.Int, *big.Int, error) + func (tx *Tx) Sign(c codec.Manager, signers [][]*crypto.PrivateKeySECP256K1R) error + type UnsignedAtomicTx interface + AtomicOps func() (ids.ID, *atomic.Requests, error) + EVMStateTransfer func(ctx *snow.Context, state *state.StateDB) error + InputUTXOs func() ids.Set + SemanticVerify func(vm *VM, stx *Tx, parent *Block, baseFee *big.Int, rules params.Rules) error + Verify func(ctx *snow.Context, rules params.Rules) error + type UnsignedExportTx struct + BlockchainID ids.ID + DestinationChain ids.ID + ExportedOutputs []*avax.TransferableOutput + Ins []EVMInput + NetworkID uint32 + func (tx *UnsignedExportTx) AtomicOps() (ids.ID, *atomic.Requests, error) + func (tx *UnsignedExportTx) Burned(assetID ids.ID) (uint64, error) + func (tx *UnsignedExportTx) EVMStateTransfer(ctx *snow.Context, state *state.StateDB) error + func (tx *UnsignedExportTx) GasUsed(fixedFee bool) (uint64, error) + func (tx *UnsignedExportTx) InputUTXOs() ids.Set + func (tx *UnsignedExportTx) SemanticVerify(vm *VM, stx *Tx, _ *Block, baseFee *big.Int, rules params.Rules) error + func (tx *UnsignedExportTx) Verify(ctx *snow.Context, rules params.Rules) error + type UnsignedImportTx struct + BlockchainID ids.ID + ImportedInputs []*avax.TransferableInput + NetworkID uint32 + Outs []EVMOutput + SourceChain ids.ID + func (tx *UnsignedImportTx) AtomicOps() (ids.ID, *atomic.Requests, error) + func (tx *UnsignedImportTx) Burned(assetID ids.ID) (uint64, error) + func (tx *UnsignedImportTx) EVMStateTransfer(ctx *snow.Context, state *state.StateDB) error + func (tx *UnsignedImportTx) GasUsed(fixedFee bool) (uint64, error) + func (tx *UnsignedImportTx) InputUTXOs() ids.Set + func (tx *UnsignedImportTx) SemanticVerify(vm *VM, stx *Tx, parent *Block, baseFee *big.Int, rules params.Rules) error + func (tx *UnsignedImportTx) Verify(ctx *snow.Context, rules params.Rules) error + type UnsignedTx interface + Burned func(assetID ids.ID) (uint64, error) + Bytes func() []byte + GasUsed func(fixedFee bool) (uint64, error) + ID func() ids.ID + Initialize func(unsignedBytes, signedBytes []byte) + UnsignedBytes func() []byte + type VM struct + func (vm *VM) Clock() *mockable.Clock + func (vm *VM) Codec() codec.Manager + func (vm *VM) CodecRegistry() codec.Registry + func (vm *VM) CreateHandlers() (map[string]*commonEng.HTTPHandler, error) + func (vm *VM) CreateStaticHandlers() (map[string]*commonEng.HTTPHandler, error) + func (vm *VM) FormatAddress(chainID ids.ID, addr ids.ShortID) (string, error) + func (vm *VM) FormatLocalAddress(addr ids.ShortID) (string, error) + func (vm *VM) GetActivationTime() time.Time + func (vm *VM) GetAtomicUTXOs(chainID ids.ID, addrs ids.ShortSet, startAddr ids.ShortID, startUTXOID ids.ID, ...) ([]*avax.UTXO, ids.ShortID, ids.ID, error) + func (vm *VM) GetBlockIDAtHeight(blkHeight uint64) (ids.ID, error) + func (vm *VM) GetCurrentNonce(address common.Address) (uint64, error) + func (vm *VM) GetSpendableAVAXWithFee(keys []*crypto.PrivateKeySECP256K1R, amount uint64, cost uint64, ...) ([]EVMInput, [][]*crypto.PrivateKeySECP256K1R, error) + func (vm *VM) GetSpendableFunds(keys []*crypto.PrivateKeySECP256K1R, assetID ids.ID, amount uint64) ([]EVMInput, [][]*crypto.PrivateKeySECP256K1R, error) + func (vm *VM) HealthCheck() (interface{}, error) + func (vm *VM) Initialize(ctx *snow.Context, dbManager manager.Manager, genesisBytes []byte, ...) error + func (vm *VM) Logger() logging.Logger + func (vm *VM) NewBlockBuilder(notifyBuildBlockChan chan<- commonEng.Message) *blockBuilder + func (vm *VM) ParseAddress(addrStr string) (ids.ID, ids.ShortID, error) + func (vm *VM) ParseLocalAddress(addrStr string) (ids.ShortID, error) + func (vm *VM) SetPreference(blkID ids.ID) error + func (vm *VM) SetState(state snow.State) error + func (vm *VM) Shutdown() error + func (vm *VM) VerifyHeightIndex() error + func (vm *VM) Version() (string, error) + type VersionReply struct + Version string