Documentation
¶
Overview ¶
Package qrl implements the QRL protocol.
Index ¶
- Constants
- type AdminAPI
- type BadBlockArgs
- type DebugAPI
- func (api *DebugAPI) AccountRange(blockNrOrHash rpc.BlockNumberOrHash, start hexutil.Bytes, maxResults int, ...) (state.IteratorDump, error)
- func (api *DebugAPI) DumpBlock(blockNr rpc.BlockNumber) (state.Dump, error)
- func (api *DebugAPI) GetAccessibleState(from, to rpc.BlockNumber) (uint64, error)
- func (api *DebugAPI) GetBadBlocks(ctx context.Context) ([]*BadBlockArgs, error)
- func (api *DebugAPI) GetModifiedAccountsByHash(startHash common.Hash, endHash *common.Hash) ([]common.Address, error)
- func (api *DebugAPI) GetModifiedAccountsByNumber(startNum uint64, endNum *uint64) ([]common.Address, error)
- func (api *DebugAPI) GetTrieFlushInterval() (string, error)
- func (api *DebugAPI) Preimage(ctx context.Context, hash common.Hash) (hexutil.Bytes, error)
- func (api *DebugAPI) SetTrieFlushInterval(interval string) error
- func (api *DebugAPI) StorageRangeAt(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash, txIndex int, ...) (StorageRangeResult, error)
- type MinerAPI
- type QRL
- func (s *QRL) APIs() []rpc.API
- func (s *QRL) AccountManager() *accounts.Manager
- func (s *QRL) ArchiveMode() bool
- func (s *QRL) BlockChain() *core.BlockChain
- func (s *QRL) BloomIndexer() *core.ChainIndexer
- func (s *QRL) ChainDb() qrldb.Database
- func (s *QRL) Downloader() *downloader.Downloader
- func (s *QRL) Engine() consensus.Engine
- func (s *QRL) EventMux() *event.TypeMux
- func (s *QRL) IsListening() bool
- func (s *QRL) Miner() *miner.Miner
- func (s *QRL) Protocols() []p2p.Protocol
- func (s *QRL) ResetWithGenesisBlock(gb *types.Block)
- func (s *QRL) SetSynced()
- func (s *QRL) Start() error
- func (s *QRL) Stop() error
- func (s *QRL) SyncMode() downloader.SyncMode
- func (s *QRL) Synced() bool
- func (s *QRL) TxPool() *txpool.TxPool
- type QRLAPIBackend
- func (b *QRLAPIBackend) AccountManager() *accounts.Manager
- func (b *QRLAPIBackend) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (b *QRLAPIBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
- func (b *QRLAPIBackend) BlockByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Block, error)
- func (b *QRLAPIBackend) BloomStatus() (uint64, uint64)
- func (b *QRLAPIBackend) ChainConfig() *params.ChainConfig
- func (b *QRLAPIBackend) ChainDb() qrldb.Database
- func (b *QRLAPIBackend) CurrentBlock() *types.Header
- func (b *QRLAPIBackend) CurrentHeader() *types.Header
- func (b *QRLAPIBackend) Engine() consensus.Engine
- func (b *QRLAPIBackend) EventMux() *event.TypeMux
- func (b *QRLAPIBackend) ExtRPCEnabled() bool
- func (b *QRLAPIBackend) FeeHistory(ctx context.Context, blockCount uint64, lastBlock rpc.BlockNumber, ...) (firstBlock *big.Int, reward [][]*big.Int, baseFee []*big.Int, ...)
- func (b *QRLAPIBackend) GetBody(ctx context.Context, hash common.Hash, number rpc.BlockNumber) (*types.Body, error)
- func (b *QRLAPIBackend) GetLogs(ctx context.Context, hash common.Hash, number uint64) ([][]*types.Log, error)
- func (b *QRLAPIBackend) GetPoolNonce(ctx context.Context, addr common.Address) (uint64, error)
- func (b *QRLAPIBackend) GetPoolTransaction(hash common.Hash) *types.Transaction
- func (b *QRLAPIBackend) GetPoolTransactions() (types.Transactions, error)
- func (b *QRLAPIBackend) GetQRVM(ctx context.Context, msg *core.Message, state *state.StateDB, ...) *vm.QRVM
- func (b *QRLAPIBackend) GetReceipts(ctx context.Context, hash common.Hash) (types.Receipts, error)
- func (b *QRLAPIBackend) GetTransaction(ctx context.Context, txHash common.Hash) (*types.Transaction, common.Hash, uint64, uint64, error)
- func (b *QRLAPIBackend) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- func (b *QRLAPIBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
- func (b *QRLAPIBackend) HeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Header, error)
- func (b *QRLAPIBackend) Pending() (*types.Block, types.Receipts, *state.StateDB)
- func (b *QRLAPIBackend) RPCGasCap() uint64
- func (b *QRLAPIBackend) RPCQRVMTimeout() time.Duration
- func (b *QRLAPIBackend) RPCTxFeeCap() float64
- func (b *QRLAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error
- func (b *QRLAPIBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession)
- func (b *QRLAPIBackend) SetHead(number uint64)
- func (b *QRLAPIBackend) StateAndHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*state.StateDB, *types.Header, error)
- func (b *QRLAPIBackend) StateAndHeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*state.StateDB, *types.Header, error)
- func (b *QRLAPIBackend) StateAtBlock(ctx context.Context, block *types.Block, reexec uint64, base *state.StateDB, ...) (*state.StateDB, tracers.StateReleaseFunc, error)
- func (b *QRLAPIBackend) StateAtTransaction(ctx context.Context, block *types.Block, txIndex int, reexec uint64) (*core.Message, vm.BlockContext, *state.StateDB, tracers.StateReleaseFunc, ...)
- func (b *QRLAPIBackend) Stats() (runnable int, blocked int)
- func (b *QRLAPIBackend) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription
- func (b *QRLAPIBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription
- func (b *QRLAPIBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription
- func (b *QRLAPIBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription
- func (b *QRLAPIBackend) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription
- func (b *QRLAPIBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription
- func (b *QRLAPIBackend) SuggestGasTipCap(ctx context.Context) (*big.Int, error)
- func (b *QRLAPIBackend) SyncProgress() qrl.SyncProgress
- func (b *QRLAPIBackend) TxPool() *txpool.TxPool
- func (b *QRLAPIBackend) TxPoolContent() (map[common.Address][]*types.Transaction, ...)
- func (b *QRLAPIBackend) TxPoolContentFrom(addr common.Address) ([]*types.Transaction, []*types.Transaction)
- type StorageRangeResult
Constants ¶
const AccountRangeMaxResults = 256
AccountRangeMaxResults is the maximum number of results to be returned per call
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminAPI ¶
type AdminAPI struct {
// contains filtered or unexported fields
}
AdminAPI is the collection of QRL full node related APIs for node administration.
func NewAdminAPI ¶
NewAdminAPI creates a new instance of AdminAPI.
func (*AdminAPI) ExportChain ¶
ExportChain exports the current blockchain into a local file, or a range of blocks if first and last are non-nil.
type BadBlockArgs ¶
type BadBlockArgs struct {
Hash common.Hash `json:"hash"`
Block map[string]any `json:"block"`
RLP string `json:"rlp"`
}
BadBlockArgs represents the entries in the list returned when bad blocks are queried.
type DebugAPI ¶
type DebugAPI struct {
// contains filtered or unexported fields
}
DebugAPI is the collection of QRL full node APIs for debugging the protocol.
func NewDebugAPI ¶
NewDebugAPI creates a new DebugAPI instance.
func (*DebugAPI) AccountRange ¶
func (api *DebugAPI) AccountRange(blockNrOrHash rpc.BlockNumberOrHash, start hexutil.Bytes, maxResults int, nocode, nostorage, incompletes bool) (state.IteratorDump, error)
AccountRange enumerates all accounts in the given block and start point in paging request
func (*DebugAPI) GetAccessibleState ¶
func (api *DebugAPI) GetAccessibleState(from, to rpc.BlockNumber) (uint64, error)
GetAccessibleState returns the first number where the node has accessible state on disk. Note this being the post-state of that block and the pre-state of the next block. The (from, to) parameters are the sequence of blocks to search, which can go either forwards or backwards
func (*DebugAPI) GetBadBlocks ¶
func (api *DebugAPI) GetBadBlocks(ctx context.Context) ([]*BadBlockArgs, error)
GetBadBlocks returns a list of the last 'bad blocks' that the client has seen on the network and returns them as a JSON list of block hashes.
func (*DebugAPI) GetModifiedAccountsByHash ¶
func (api *DebugAPI) GetModifiedAccountsByHash(startHash common.Hash, endHash *common.Hash) ([]common.Address, error)
GetModifiedAccountsByHash returns all accounts that have changed between the two blocks specified. A change is defined as a difference in nonce, balance, code hash, or storage hash.
With one parameter, returns the list of accounts modified in the specified block.
func (*DebugAPI) GetModifiedAccountsByNumber ¶
func (api *DebugAPI) GetModifiedAccountsByNumber(startNum uint64, endNum *uint64) ([]common.Address, error)
GetModifiedAccountsByNumber returns all accounts that have changed between the two blocks specified. A change is defined as a difference in nonce, balance, code hash, or storage hash.
With one parameter, returns the list of accounts modified in the specified block.
func (*DebugAPI) GetTrieFlushInterval ¶
GetTrieFlushInterval gets the current value of in-memory trie flush interval
func (*DebugAPI) Preimage ¶
Preimage is a debug API function that returns the preimage for a sha3 hash, if known.
func (*DebugAPI) SetTrieFlushInterval ¶
SetTrieFlushInterval configures how often in-memory tries are persisted to disk. The value is in terms of block processing time, not wall clock. If the value is shorter than the block generation time, or even 0 or negative, the node will flush trie after processing each block (effectively archive mode).
func (*DebugAPI) StorageRangeAt ¶
func (api *DebugAPI) StorageRangeAt(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash, txIndex int, contractAddress common.Address, keyStart hexutil.Bytes, maxResult int) (StorageRangeResult, error)
StorageRangeAt returns the storage at the given block height and transaction index.
type MinerAPI ¶
type MinerAPI struct {
// contains filtered or unexported fields
}
MinerAPI provides an API to control the miner.
func (*MinerAPI) SetExtra ¶
SetExtra sets the extra data string that is included when this miner mines a block.
func (*MinerAPI) SetGasLimit ¶
SetGasLimit sets the gaslimit to target towards during mining.
type QRL ¶
type QRL struct {
APIBackend *QRLAPIBackend
// contains filtered or unexported fields
}
QRL implements the QRL full node service.
func New ¶
New creates a new QRL object (including the initialisation of the common QRL object), whose lifecycle will be managed by the provided node.
func (*QRL) APIs ¶
APIs return the collection of RPC services the qrl package offers. NOTE, some of these services probably need to be moved to somewhere else.
func (*QRL) AccountManager ¶
func (*QRL) ArchiveMode ¶
func (*QRL) BlockChain ¶
func (s *QRL) BlockChain() *core.BlockChain
func (*QRL) BloomIndexer ¶
func (s *QRL) BloomIndexer() *core.ChainIndexer
func (*QRL) Downloader ¶
func (s *QRL) Downloader() *downloader.Downloader
func (*QRL) IsListening ¶
func (*QRL) ResetWithGenesisBlock ¶
func (*QRL) Start ¶
Start implements node.Lifecycle, starting all internal goroutines needed by the QRL protocol implementation.
func (*QRL) Stop ¶
Stop implements node.Lifecycle, terminating all internal goroutines used by the QRL protocol.
func (*QRL) SyncMode ¶
func (s *QRL) SyncMode() downloader.SyncMode
SyncMode retrieves the current sync mode, either explicitly set, or derived from the chain status.
type QRLAPIBackend ¶
type QRLAPIBackend struct {
// contains filtered or unexported fields
}
QRLAPIBackend implements qrlapi.Backend for full nodes
func (*QRLAPIBackend) AccountManager ¶
func (b *QRLAPIBackend) AccountManager() *accounts.Manager
func (*QRLAPIBackend) BlockByHash ¶
func (*QRLAPIBackend) BlockByNumber ¶
func (b *QRLAPIBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
func (*QRLAPIBackend) BlockByNumberOrHash ¶
func (b *QRLAPIBackend) BlockByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Block, error)
func (*QRLAPIBackend) BloomStatus ¶
func (b *QRLAPIBackend) BloomStatus() (uint64, uint64)
func (*QRLAPIBackend) ChainConfig ¶
func (b *QRLAPIBackend) ChainConfig() *params.ChainConfig
ChainConfig returns the active chain configuration.
func (*QRLAPIBackend) ChainDb ¶
func (b *QRLAPIBackend) ChainDb() qrldb.Database
func (*QRLAPIBackend) CurrentBlock ¶
func (b *QRLAPIBackend) CurrentBlock() *types.Header
func (*QRLAPIBackend) CurrentHeader ¶
func (b *QRLAPIBackend) CurrentHeader() *types.Header
func (*QRLAPIBackend) Engine ¶
func (b *QRLAPIBackend) Engine() consensus.Engine
func (*QRLAPIBackend) EventMux ¶
func (b *QRLAPIBackend) EventMux() *event.TypeMux
func (*QRLAPIBackend) ExtRPCEnabled ¶
func (b *QRLAPIBackend) ExtRPCEnabled() bool
func (*QRLAPIBackend) FeeHistory ¶
func (*QRLAPIBackend) GetBody ¶
func (b *QRLAPIBackend) GetBody(ctx context.Context, hash common.Hash, number rpc.BlockNumber) (*types.Body, error)
GetBody returns body of a block. It does not resolve special block numbers.
func (*QRLAPIBackend) GetPoolNonce ¶
func (*QRLAPIBackend) GetPoolTransaction ¶
func (b *QRLAPIBackend) GetPoolTransaction(hash common.Hash) *types.Transaction
func (*QRLAPIBackend) GetPoolTransactions ¶
func (b *QRLAPIBackend) GetPoolTransactions() (types.Transactions, error)
func (*QRLAPIBackend) GetReceipts ¶
func (*QRLAPIBackend) GetTransaction ¶
func (*QRLAPIBackend) HeaderByHash ¶
func (*QRLAPIBackend) HeaderByNumber ¶
func (b *QRLAPIBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
func (*QRLAPIBackend) HeaderByNumberOrHash ¶
func (b *QRLAPIBackend) HeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Header, error)
func (*QRLAPIBackend) RPCGasCap ¶
func (b *QRLAPIBackend) RPCGasCap() uint64
func (*QRLAPIBackend) RPCQRVMTimeout ¶
func (b *QRLAPIBackend) RPCQRVMTimeout() time.Duration
func (*QRLAPIBackend) RPCTxFeeCap ¶
func (b *QRLAPIBackend) RPCTxFeeCap() float64
func (*QRLAPIBackend) SendTx ¶
func (b *QRLAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error
func (*QRLAPIBackend) ServiceFilter ¶
func (b *QRLAPIBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession)
func (*QRLAPIBackend) SetHead ¶
func (b *QRLAPIBackend) SetHead(number uint64)
func (*QRLAPIBackend) StateAndHeaderByNumber ¶
func (b *QRLAPIBackend) StateAndHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*state.StateDB, *types.Header, error)
func (*QRLAPIBackend) StateAndHeaderByNumberOrHash ¶
func (b *QRLAPIBackend) StateAndHeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*state.StateDB, *types.Header, error)
func (*QRLAPIBackend) StateAtBlock ¶
func (*QRLAPIBackend) StateAtTransaction ¶
func (*QRLAPIBackend) Stats ¶
func (b *QRLAPIBackend) Stats() (runnable int, blocked int)
func (*QRLAPIBackend) SubscribeChainEvent ¶
func (b *QRLAPIBackend) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription
func (*QRLAPIBackend) SubscribeChainHeadEvent ¶
func (b *QRLAPIBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription
func (*QRLAPIBackend) SubscribeChainSideEvent ¶
func (b *QRLAPIBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription
func (*QRLAPIBackend) SubscribeLogsEvent ¶
func (b *QRLAPIBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription
func (*QRLAPIBackend) SubscribeNewTxsEvent ¶
func (b *QRLAPIBackend) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription
func (*QRLAPIBackend) SubscribeRemovedLogsEvent ¶
func (b *QRLAPIBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription
func (*QRLAPIBackend) SuggestGasTipCap ¶
func (*QRLAPIBackend) SyncProgress ¶
func (b *QRLAPIBackend) SyncProgress() qrl.SyncProgress
func (*QRLAPIBackend) TxPool ¶
func (b *QRLAPIBackend) TxPool() *txpool.TxPool
func (*QRLAPIBackend) TxPoolContent ¶
func (b *QRLAPIBackend) TxPoolContent() (map[common.Address][]*types.Transaction, map[common.Address][]*types.Transaction)
func (*QRLAPIBackend) TxPoolContentFrom ¶
func (b *QRLAPIBackend) TxPoolContentFrom(addr common.Address) ([]*types.Transaction, []*types.Transaction)
type StorageRangeResult ¶
type StorageRangeResult struct {
Storage storageMap `json:"storage"`
NextKey *common.Hash `json:"nextKey"` // nil if Storage includes the last key in the trie.
}
StorageRangeResult is the result of a debug_storageRangeAt API call.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package catalyst implements the temporary qrl beacon node/qrl execution node RPC integration.
|
Package catalyst implements the temporary qrl beacon node/qrl execution node RPC integration. |
|
Package downloader contains the manual full chain synchronisation.
|
Package downloader contains the manual full chain synchronisation. |
|
Package filters implements a qrl filtering system for block, transactions and log events.
|
Package filters implements a qrl filtering system for block, transactions and log events. |
|
protocols
|
|
|
Package qrlconfig contains the configuration of the QRL protocol.
|
Package qrlconfig contains the configuration of the QRL protocol. |
|
Package tracers is a manager for transaction tracing engines.
|
Package tracers is a manager for transaction tracing engines. |
|
js/internal/tracers
Package tracers contains the actual JavaScript tracer assets.
|
Package tracers contains the actual JavaScript tracer assets. |