![]() |
Ethereum
PoC-8
The C++ Implementation of Ethereum
|
#include <ClientBase.h>
Public Member Functions | |
| ClientBase () | |
| virtual | ~ClientBase () |
| std::pair< u256, ExecutionResult > | estimateGas (Address const &_from, u256 _value, Address _dest, bytes const &_data, int64_t _maxGas, u256 _gasPrice, BlockNumber _blockNumber, GasEstimationCallback const &_callback) override |
| u256 | balanceAt (Address _a, BlockNumber _block) const override |
| u256 | countAt (Address _a, BlockNumber _block) const override |
| u256 | stateAt (Address _a, u256 _l, BlockNumber _block) const override |
| h256 | stateRootAt (Address _a, BlockNumber _block) const override |
| bytes | codeAt (Address _a, BlockNumber _block) const override |
| h256 | codeHashAt (Address _a, BlockNumber _block) const override |
| std::map< h256, std::pair< u256, u256 > > | storageAt (Address _a, BlockNumber _block) const override |
| LocalisedLogEntries | logs (unsigned _watchId) const override |
| LocalisedLogEntries | logs (LogFilter const &_filter) const override |
| virtual void | prependLogsFromBlock (LogFilter const &_filter, h256 const &_blockHash, BlockPolarity _polarity, LocalisedLogEntries &io_logs) const |
| unsigned | installWatch (LogFilter const &_filter, Reaping _r=Reaping::Automatic) override |
| Install, uninstall and query watches. More... | |
| unsigned | installWatch (h256 _filterId, Reaping _r=Reaping::Automatic) override |
| bool | uninstallWatch (unsigned _watchId) override |
| LocalisedLogEntries | peekWatch (unsigned _watchId) const override |
| LocalisedLogEntries | checkWatch (unsigned _watchId) override |
| h256 | hashFromNumber (BlockNumber _number) const override |
| BlockNumber | numberFromHash (h256 _blockHash) const override |
| int | compareBlockHashes (h256 _h1, h256 _h2) const override |
| BlockHeader | blockInfo (h256 _hash) const override |
| BlockDetails | blockDetails (h256 _hash) const override |
| Transaction | transaction (h256 _transactionHash) const override |
| LocalisedTransaction | localisedTransaction (h256 const &_transactionHash) const override |
| Transaction | transaction (h256 _blockHash, unsigned _i) const override |
| LocalisedTransaction | localisedTransaction (h256 const &_blockHash, unsigned _i) const override |
| TransactionReceipt | transactionReceipt (h256 const &_transactionHash) const override |
| LocalisedTransactionReceipt | localisedTransactionReceipt (h256 const &_transactionHash) const override |
| std::pair< h256, unsigned > | transactionLocation (h256 const &_transactionHash) const override |
| Transactions | transactions (h256 _blockHash) const override |
| Transactions | transactions (BlockNumber _block) const override |
| TransactionHashes | transactionHashes (h256 _blockHash) const override |
| BlockHeader | uncle (h256 _blockHash, unsigned _i) const override |
| UncleHashes | uncleHashes (h256 _blockHash) const override |
| unsigned | transactionCount (h256 _blockHash) const override |
| unsigned | transactionCount (BlockNumber _block) const override |
| unsigned | uncleCount (h256 _blockHash) const override |
| unsigned | number () const override |
| h256s | pendingHashes () const override |
| BlockHeader | pendingInfo () const override |
| BlockDetails | pendingDetails () const override |
| EVMSchedule | evmSchedule () const override |
| ImportResult | injectBlock (bytes const &_block) override |
| Injects the RLP-encoded block given by the _rlp into the block queue directly. More... | |
| Addresses | addresses (BlockNumber _block) const override |
| u256 | gasLimitRemaining () const override |
| Get the remaining gas limit in this block. More... | |
| u256 | gasBidPrice () const override |
| Address | author () const override |
| Get the block author. More... | |
| bool | isKnown (h256 const &_hash) const override |
| bool | isKnown (BlockNumber _block) const override |
| bool | isKnownTransaction (h256 const &_transactionHash) const override |
| bool | isKnownTransaction (h256 const &_blockHash, unsigned _i) const override |
| void | startSealing () override |
| void | stopSealing () override |
| bool | wouldSeal () const override |
| Would we like to be sealing now? More... | |
| SyncStatus | syncStatus () const override |
| Get some information on the block queue. More... | |
| Block | blockByNumber (BlockNumber _h) const |
| int | chainId () const override |
| Gets the chain id. More... | |
| u256 | balanceAt (Address _a) const |
| virtual u256 | balanceAt (Address _a, BlockNumber _block) const=0 |
| u256 | countAt (Address _a) const |
| virtual u256 | countAt (Address _a, BlockNumber _block) const=0 |
| u256 | stateAt (Address _a, u256 _l) const |
| virtual u256 | stateAt (Address _a, u256 _l, BlockNumber _block) const=0 |
| bytes | codeAt (Address _a) const |
| virtual bytes | codeAt (Address _a, BlockNumber _block) const=0 |
| h256 | codeHashAt (Address _a) const |
| virtual h256 | codeHashAt (Address _a, BlockNumber _block) const=0 |
| std::map< h256, std::pair< u256, u256 > > | storageAt (Address _a) const |
| virtual std::map< h256, std::pair< u256, u256 > > | storageAt (Address _a, BlockNumber _block) const=0 |
| virtual Addresses | addresses () const |
| virtual Addresses | addresses (BlockNumber _block) const=0 |
Public Member Functions inherited from dev::eth::Interface | |
| Interface () | |
| Constructor. More... | |
| virtual | ~Interface () |
| Destructor. More... | |
| virtual h256 | submitTransaction (TransactionSkeleton const &_t, Secret const &_secret)=0 |
| void | submitTransaction (Secret const &_secret, u256 const &_value, Address const &_dest, bytes const &_data=bytes(), u256 const &_gas=1000000, u256 const &_gasPrice=DefaultGasPrice, u256 const &_nonce=Invalid256) |
| Submits the given message-call transaction. More... | |
| virtual h256 | importTransaction (Transaction const &_t)=0 |
| Imports the given transaction into the transaction queue. More... | |
| virtual void | flushTransactions ()=0 |
| Blocks until all pending transactions have been processed. More... | |
| virtual ExecutionResult | call (Address const &_from, u256 _value, Address _dest, bytes const &_data, u256 _gas, u256 _gasPrice, BlockNumber _blockNumber, FudgeFactor _ff=FudgeFactor::Strict)=0 |
| Makes the given call. Nothing is recorded into the state. More... | |
| ExecutionResult | call (Address const &_from, u256 _value, Address _dest, bytes const &_data=bytes(), u256 _gas=1000000, u256 _gasPrice=DefaultGasPrice, FudgeFactor _ff=FudgeFactor::Strict) |
| ExecutionResult | call (Secret const &_secret, u256 _value, Address _dest, bytes const &_data, u256 _gas, u256 _gasPrice, BlockNumber _blockNumber, FudgeFactor _ff=FudgeFactor::Strict) |
| ExecutionResult | call (Secret const &_secret, u256 _value, Address _dest, bytes const &_data, u256 _gas, u256 _gasPrice, FudgeFactor _ff=FudgeFactor::Strict) |
| int | getDefault () const |
| void | setDefault (BlockNumber _block) |
| u256 | balanceAt (Address _a) const |
| u256 | countAt (Address _a) const |
| u256 | stateAt (Address _a, u256 _l) const |
| bytes | codeAt (Address _a) const |
| h256 | codeHashAt (Address _a) const |
| std::map< h256, std::pair< u256, u256 > > | storageAt (Address _a) const |
| LocalisedLogEntries | peekWatchSafe (unsigned _watchId) const |
| LocalisedLogEntries | checkWatchSafe (unsigned _watchId) |
| BlockHeader | blockInfo (BlockNumber _block) const |
| BlockDetails | blockDetails (BlockNumber _block) const |
| Transaction | transaction (BlockNumber _block, unsigned _i) const |
| TransactionHashes | transactionHashes (BlockNumber _block) const |
| BlockHeader | uncle (BlockNumber _block, unsigned _i) const |
| UncleHashes | uncleHashes (BlockNumber _block) const |
| unsigned | uncleCount (BlockNumber _block) const |
| virtual Transactions | pending () const =0 |
| virtual Addresses | addresses () const |
| virtual TransactionSkeleton | populateTransactionWithDefaults (TransactionSkeleton const &_t) const =0 |
| Populate the uninitialized fields in the supplied transaction with default values. More... | |
| virtual void | setAuthor (Address const &_us)=0 |
| Set the block author address. More... | |
| virtual bool | isSyncing () const |
| Are we updating the chain (syncing or importing a new block)? More... | |
| virtual bool | isMajorSyncing () const |
| Are we syncing the chain? More... | |
| virtual u256 | networkId () const |
| Gets the network id. More... | |
| virtual void | setNetworkId (u256 const &) |
| Sets the network id. More... | |
| virtual SealEngineFace * | sealEngine () const |
| Get the seal engine. More... | |
| virtual std::tuple< h256, h256, h256 > | getWork ()=0 |
Protected Member Functions | |
| virtual BlockChain & | bc ()=0 |
| virtual BlockChain const & | bc () const =0 |
| virtual Block | block (h256 const &_h) const =0 |
| virtual Block | preSeal () const =0 |
| virtual Block | postSeal () const =0 |
| virtual void | prepareForTransaction ()=0 |
Protected Attributes | |
| Mutex | x_filtersWatches |
| } More... | |
| std::unordered_map< h256, InstalledFilter > | m_filters |
| The dictionary of filters that are active. More... | |
| std::unordered_map< h256, h256s > | m_specialFilters = std::unordered_map<h256, std::vector<h256>>{{PendingChangedFilter, {}}, {ChainChangedFilter, {}}} |
| The dictionary of special filters and their additional data. More... | |
| std::map< unsigned, ClientWatch > | m_watches |
| Each and every watch - these reference a filter. More... | |
| Logger | m_loggerWatch {createLogger(VerbosityDebug, "watch")} |
Protected Attributes inherited from dev::eth::Interface | |
| int | m_default = PendingBlock |
Definition at line 67 of file ClientBase.h.
|
inline |
Definition at line 70 of file ClientBase.h.
|
inlinevirtual |
Definition at line 71 of file ClientBase.h.
|
inline |
Get a list of all active addresses. NOTE: This only works when compiled with ETH_FATDB; otherwise will throw InterfaceNotSupported.
Definition at line 192 of file Interface.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 442 of file ClientBase.cpp.
| virtual Addresses dev::eth::Interface::addresses |
|
overridevirtual |
Get the block author.
Implements dev::eth::Interface.
Definition at line 455 of file ClientBase.cpp.
|
inline |
Definition at line 110 of file Interface.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 94 of file ClientBase.cpp.
| virtual u256 dev::eth::Interface::balanceAt |
|
protectedpure virtual |
Implemented in dev::eth::Client.
|
protectedpure virtual |
The interface that must be implemented in any class deriving this. {
Implemented in dev::eth::Client.
Implemented in dev::eth::Client.
| Block ClientBase::blockByNumber | ( | BlockNumber | _h | ) | const |
Definition at line 517 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 314 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 307 of file ClientBase.cpp.
|
overridevirtual |
Gets the chain id.
Reimplemented from dev::eth::Interface.
Definition at line 526 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 291 of file ClientBase.cpp.
|
inline |
Definition at line 113 of file Interface.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 114 of file ClientBase.cpp.
| virtual bytes dev::eth::Interface::codeAt |
|
inline |
Definition at line 114 of file Interface.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 119 of file ClientBase.cpp.
| virtual h256 dev::eth::Interface::codeHashAt |
Implements dev::eth::Interface.
Definition at line 480 of file ClientBase.cpp.
|
inline |
Definition at line 111 of file Interface.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 99 of file ClientBase.cpp.
| virtual u256 dev::eth::Interface::countAt |
|
overridevirtual |
Estimate gas usage for call/create.
| _maxGas | An upper bound value for estimation, if not provided default value of c_maxGasEstimate will be used. |
| _callback | Optional callback function for progress reporting |
Implements dev::eth::Interface.
Definition at line 35 of file ClientBase.cpp.
|
inlineoverridevirtual |
Reimplemented from dev::eth::Interface.
Definition at line 129 of file ClientBase.h.
|
inlineoverridevirtual |
Implements dev::eth::Interface.
Definition at line 136 of file ClientBase.h.
|
overridevirtual |
Get the remaining gas limit in this block.
Implements dev::eth::Interface.
Definition at line 450 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 460 of file ClientBase.cpp.
|
overridevirtual |
Injects the RLP-encoded block given by the _rlp into the block queue directly.
Implements dev::eth::Interface.
Definition at line 89 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 235 of file ClientBase.cpp.
|
overridevirtual |
Install, uninstall and query watches.
Implements dev::eth::Interface.
Definition at line 221 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 500 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 492 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 512 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 507 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 340 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 324 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 351 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 145 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 130 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 420 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 469 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 278 of file ClientBase.cpp.
|
overridevirtual |
Reimplemented from dev::eth::Interface.
Definition at line 435 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 425 of file ClientBase.cpp.
|
overridevirtual |
Reimplemented from dev::eth::Interface.
Definition at line 430 of file ClientBase.cpp.
|
protectedpure virtual |
Implemented in dev::eth::Client.
|
protectedpure virtual |
Implemented in dev::eth::Client.
|
virtual |
Definition at line 208 of file ClientBase.cpp.
|
protectedpure virtual |
Implemented in dev::eth::Client.
|
inlineoverridevirtual |
Start sealing. NOT thread-safe - call it & stopSealing only from a single thread
Implements dev::eth::Interface.
Definition at line 146 of file ClientBase.h.
|
inline |
Definition at line 112 of file Interface.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 104 of file ClientBase.cpp.
| virtual u256 dev::eth::Interface::stateAt |
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 109 of file ClientBase.cpp.
|
inlineoverridevirtual |
Stop sealing. NOT thread-safe
Implements dev::eth::Interface.
Definition at line 151 of file ClientBase.h.
Definition at line 115 of file Interface.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 124 of file ClientBase.cpp.
|
inlineoverridevirtual |
Get some information on the block queue.
Implements dev::eth::Interface.
Definition at line 162 of file ClientBase.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 330 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 319 of file ClientBase.cpp.
|
inlineoverridevirtual |
Implements dev::eth::Interface.
Definition at line 122 of file ClientBase.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 406 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 386 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 371 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 346 of file ClientBase.cpp.
|
inlineoverridevirtual |
Implements dev::eth::Interface.
Definition at line 117 of file ClientBase.h.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 376 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 391 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 413 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 401 of file ClientBase.cpp.
|
overridevirtual |
Implements dev::eth::Interface.
Definition at line 256 of file ClientBase.cpp.
|
inlineoverridevirtual |
Would we like to be sealing now?
Implements dev::eth::Interface.
Definition at line 156 of file ClientBase.h.
|
protected |
The dictionary of filters that are active.
Definition at line 185 of file ClientBase.h.
|
protected |
Definition at line 190 of file ClientBase.h.
|
protected |
The dictionary of special filters and their additional data.
Definition at line 186 of file ClientBase.h.
|
protected |
Each and every watch - these reference a filter.
Definition at line 188 of file ClientBase.h.
|
mutableprotected |