* add config option for limiting max number of active WS connections
* update test websocket method to not deprecated version
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Decouple PoW from ethash
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Address code review comments, create a dev network for ecip1049, prepare for keccak hasher
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add PoW function and a few simple tests as test vectors
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Make the PoWHasher hash function a bit easier to understand
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* simplify and call out the code of the keccak hash function
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* support fixed difficulty for keccak mining
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Fix the dev network config
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add comment to KeccakHasher
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Increase fixed difficulty for the ecip1049 dev network to produce hashes a bit less often
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* spotless
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* fix test expectations
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Fix javadoc issue
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* add acceptance test using keccak mining
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* add changelog entry
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Address code review comments
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Includes fix for a gradle bug that resulted in project dependencies having the wrong groupId set in generated pom files.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Besu and GoQuorum provide different information in the response from the admin_peers Json RPC.
This change adds just the "enode" field to the Besu response, to make the results more similar (but still different).
(ID field is the node's public key, whereas Geth sets this field to the keccak256 hash of the public key).
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
To prepare for the Bintray shutdown add publication to the hyperledger's
artifactory instance to the build.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Add fields for `chainId`, `publicKey`, and `raw` to RPCs where detailed
transaction data is returned (`eth_getTransactionByBlockHash`,
`eth_getTransactionByBlockNumber`, `eth_getTransactionByHash`, and
`eth_getBlock` with certain parameters).
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
When calling `eth_call` by default account balances will be ignored when
executing the call. If the user wants the gas balance to be a
consideration in the call a new `strict` param in the call params can be
set to true, which will enforce the balance rules. This is the same
behavior as is observed in `eth_estimateGas`.
Addresses #502
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
When an eth_call results in a revert report the call as an error with
the revert reason in the response, like we do with eth_estimateGas.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Don't send requests to peers that have not been fully validated (such as
validating the absence/presence of the DAO block). This has the intended
side effect that unvalidated peers don't report chain height to
prometheus monitoring. On occasion classic/mainnet peers would be
mid-validation when the sync status is requested and the wrong chain
will be reported as the height, typically classic heights erroneously reported
in a mainnet node.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* #1733 - add support for eip-1898
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1733 - update changelog
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1733 - Fix merge issues
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Updated code to handle block parameter as an object; added new tests
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1733 - Update to handle new block parameter; update tests accordingly
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1733 - Updates for PR comments
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1733 - fix broken test
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Finish internal ConstantinopleFix->Petersburg transition, including
class names. Only backwards compatibility and retesteth use of the
name will remain.
* Remove four unused config fields from json configs. These are fields
with no code uses of any sort. All are implied by other fields.
eip150Hash, eip155Block, eip160Block, and daoForkSupport.
* Remove redundant fork block fields where their value is implied
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Now able to inject static nodes by explicitly specifying
a static nodes JSON file (.json) on the command line
Co-authored-by: Ratan (Rai) Sur <ratan.r.sur@gmail.com>
Signed-off-by: Terrence Cooke <terrence.s.cooke@gmail.com>
* #1695 - Added support for EIP-868
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Fix broken test
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1695 - Added tests for new functionality
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1695 - spotlessApply
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Update changelog
Signed-off-by: David Mechler <david.mechler@consensys.net>
Fixes two bugs related to tracing APIs
- invalid trace when calling a precompiled contract
- invalid trace when a create fails with a depth > 0
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Move the block header validation errors logging levels from trace and
debug to info. Also, include a standard prefix "Invalid block header: "
in each of the log lines.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Add `memory` as an option for `--key-value-storage`. This is useful in
small network synchronization tests as memory is faster and is easier to
inspect via a debugger.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.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 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>