This implements the encoding/decoding logic and because it's backwards
compatible we can introduce it immediately. You can see that some of
the typed-transaction specific encoding/decoding logic is tested where
there are EIP-1559 encoding/decoding tests but there'll be more tests
included in the EIP-2930 PR.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* modifying transaction RLP encode/decode to handle GoQuorum private tx value
* added static flag to be read by TransactionRLPDecoder so that we can still allow chainId=1
* ensure chainId and v not both provided
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Make sure DNS discovery URLs are never present if using a genesis file
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add tests to make sure we cover extensively the genesis file vs named network use cases
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
This PR adds a waiting list for NewPooledTransactionHashesMessage in order to group several hashes into a single GetPooledTransactionsFromPeerTask
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* Add more block import metrics, including gas burnt and gas burn rate.
* Drop reporting period from 100 blocks to 1000.
* Log one final time at the end of each file.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
With future storage needs in mind change `createPruningStorage` to a
more generic `getStorageBySegmentIdentifier` method where the segment
identifier is the argument. For now that's just pruning storage as
world state needs a specific return type.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Fixed issue where get methods were no longer public
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Add tests for JSON
Signed-off-by: David Mechler <david.mechler@consensys.net>
* expose epochCalculator to MiningCoordinator
Signed-off-by: Edward Mack <ed@edwardmack.com>
* replace epochCalculator Function with interface
Signed-off-by: Edward Mack <ed@edwardmack.com>
* apply spotless, clean-up tests
Signed-off-by: Edward Mack <ed@edwardmack.com>
* cleanup comments, fix more tests
Signed-off-by: Edward Mack <ed@edwardmack.com>
* fixing failures from testing
Signed-off-by: Edward Mack <ed@edwardmack.com>
* modify dagSeed calculator to use epochCalculator
epochStartBlock to determine epoch start block based on current epoch
length.
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add epochCalculator to StratumConnectionTest
Signed-off-by: Edward Mack <ed@edwardmack.com>
* apply spotless
Signed-off-by: Edward Mack <ed@edwardmack.com>
* remove unnecessary comments
Signed-off-by: Edward Mack <ed@edwardmack.com>
* remove activation block from Ecip1099EpochCalculator
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add messages to IllegalArgumentExceptions, init epochCalculator
Signed-off-by: Edward Mack <ed@edwardmack.com>
* un-wrap private dagSeed method
Signed-off-by: Edward Mack <ed@edwardmack.com>
* fix typo
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add unit tests for epochStartBlock functions
Signed-off-by: Edward Mack <ed@edwardmack.com>
* remove unused field
Signed-off-by: Edward Mack <ed@edwardmack.com>
switch to bash comments for commented out commands.
(It's inside a scalar, so it should still go to bash)
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Add DNS discovery for goerli, rinkeby and mainnet to help speed up discovery of peers
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add final to constant fields
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Co-authored-by: David Mechler <david.mechler@consensys.net>
Add the protocols section to admin_peers. This involved plumbing
EthPeers through where we were previously using the P2PNetwork to get
our data. Hence most of the PR is DI refactoring.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
This is a stronger check than in the past, which potentially allowed for a the IBFT system to handle messages for the current round, even if a block had already been imported (but had not yet received the new-block event) - which in turn, could lead to a network fork in a adversarial environment.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
Update eth_gasPrice to return the median gas price of transactions in
the last several blocks (or whole chain if the chain is short). If there
are no TXes return the old value. Block window and percentile are CLI
configurable.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
For every block produced and imported directly log the same information
we would get from other import paths.
* If this node produced the block, note that with "Produced" instead of
"Imported"
* Log the size of the pending transaction pool
* Only log IBFT rounds at INFO if they go past round 0, DEBUG otherwise.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
The addition of the EvmTool resulted in duplication of some files in the
zip and tar.gz distributions. Remove the build configurations that
caused that duplication.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>