 |
Ethereum
PoC-8
The C++ Implementation of Ethereum
|
Go to the documentation of this file.
47 std::vector<std::pair<u256, std::string>>
const&
units();
56 static const u256 ether = exp10<18>();
57 static const u256 finney = exp10<15>();
58 static const u256 szabo = exp10<12>();
59 static const u256 shannon = exp10<9>();
68 static const h256 LatestBlockHash =
h256(2);
69 static const h256 EarliestBlockHash =
h256(1);
70 static const h256 PendingBlockHash =
h256(0);
72 static const u256 DefaultBlockGasLimit = 4712388;
145 void fire(Args
const&... _args) { m_h(_args...); }
157 for (
auto const& h : m_fire)
158 if (
auto l = h.second.lock())
164 auto n = m_fire.empty() ? 0 : (m_fire.rbegin()->first + 1);
165 auto h = std::shared_ptr<HandlerAux>(
new HandlerAux(n,
this, _h));
172 for (
auto const& f:
valuesOf(m_fire))
173 if (
auto h = f.lock())
178 std::map<unsigned, std::weak_ptr<typename Signal::HandlerAux>> m_fire;
181 template<
class... Args>
using Handler = std::shared_ptr<
typename Signal<Args...>::HandlerAux>;
194 std::string
userReadable(
bool _toProxy, std::function<std::pair<bool, std::string>(
TransactionSkeleton const&)>
const& _getNatSpec, std::function<std::string(
Address const&)>
const& _formatAddress)
const;
AlethErrors
Errors returned from main.
std::string formatBalance(bigint const &_b)
User-friendly string representation of the amount _b in wei.
@ CheckUncles
Check uncle seals.
const unsigned c_databaseVersion
Current database version.
void fire(Args const &... _args)
@ ValidSeal
Validate seal.
@ CheckTransactions
Check transaction signatures.
const unsigned c_protocolVersion
Current protocol version.
Describes the progress of a mining operation.
std::string userReadable(bool _toProxy, std::function< std::pair< bool, std::string >(TransactionSkeleton const &)> const &_getNatSpec, std::function< std::string(Address const &)> const &_formatAddress) const
@ UncleBasic
Check the basic structure of the uncles.
uint64_t hashes
Total number of hashes computed.
void badBlock(bytesConstRef _block, string const &_err)
@ InOrderChecks
Do all checks that cannot be done independently of prior blocks having been imported.
@ UncleSeals
Check the basic structure of the uncles.
@ KeyManagerInitializationFailure
@ ArgumentProcessingFailure
@ Parent
Check parent block header.
Address toAddress(std::string const &_s)
Convert the given string into an address.
std::vector< h256 > h256s
@ OutOfOrderChecks
Do all checks that can be done independently of prior blocks having been imported.
std::vector< U > valuesOf(std::map< T, U > const &_m)
@ Retry
Import transaction even if it was dropped before.
IfDropped
Import transaction policy.
const bytes c_blockhashContractCode
Code of the special contract for block hash storage defined in EIP96.
vector< pair< u256, string > > const & units()
Get information concerning the currency denominations.
std::vector< byte > bytes
@ ConfigFileEmptyOrNotFound
@ BadBlockNumberHashOption
std::vector< LogBloom > LogBlooms
Many log blooms.
@ UncleParent
Check uncle parent block header.
const Address c_blockhashContractAddress(0xf0)
Address of the special contract for block hash storage defined in EIP96.
constexpr u256 Invalid256
std::function< void(Args...)> Callback
const unsigned c_minorProtocolVersion
Current minor protocol version.
boost::multiprecision::number< boost::multiprecision::cpp_int_backend<> > bigint
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void > > u256
std::shared_ptr< HandlerAux > add(Callback const &_h)
@ BadHexValueInAddressOption
@ Ignore
Don't import transaction that was previously dropped.
uint64_t ms
Total number of milliseconds of mining thus far.
DEV_SIMPLE_EXCEPTION(NoHashRecorded)
void operator()(Args const &... _args)
std::shared_ptr< typename Signal< Args... >::HandlerAux > Handler
std::vector< Transaction > goodTranactions
Super-duper signal mechanism. TODO: replace with somthing a bit heavier weight.
@ TransactionBasic
Check the basic structure of the transactions.
@ PostGenesis
Require block to be non-genesis.
@ TransactionSignatures
Check the basic structure of the transactions.