* Allow lenient hex param in eth_submitHashRate
* Migrate Stratum tests to Junit5
* Introduce MockitoExtension in Stratum tests
* Convert start/stop Stratum method to Vert.x future
* Use Stratum only with PowCoordinator
* Call JSON-RPC implementations from Stratum proxy
* Subscribe to newWork on proxy login
* Replace HTTP processing with Netty pipelines
---------
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Move the decision making for connecting or not connecting to peers into the eth layer. Future changes will take advantage if this to improve peering.
Signed-off-by: Stefan <stefan.pingel@consensys.net>
---------
Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* removed separate decoding logic
* run non-mainnet ATs to make sure
* remove goQuorum flag from everywhere
* remove GOQUORUM api group
* remove GoQuorum enclave, privacy params, RPCs and other related config
* removed Goquorum related error codes, rpcMethod codes, privateBloom
* removed v from transaction
* removed private GoQuorum storage provider
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Add 8 metrics to evaluate the state of the flat database for accounts and storage slots
* Total number of calls (for both accounts and storage)
* Number of account or storage entries found in the flat database
* Number of storage slots located in the merkle trie but not found in the flat database
* Number of account or storage entries not found in either the flat database or the merkle trie
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* remove controller and config
* remove ibftlegacy module
* remove further config options
* run non-mainnet ATs just to be sure
* remove temp change to circle config
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* rebase cred trunc behavior
* add jackson verification metadata for older versions required by tasks
Signed-off-by: garyschulte <garyschulte@gmail.com>
* Fix ethstats retry logic. Attempt to connect with and without ssl. If --ethstats is specified without a port, use port 443 (for wss://) and port 80 (for ws://) as defaults instead of 3000.
* Introduced optional --ethstats-cacert-file to specify root CA for ethstats server.
Signed-off-by: Usman Saleem <usman@usmans.info>
While syncing, it is possible that we access the cached header's number before the block itself has had chance to be imported. In other words there is a mismatch between cached blockNumber and non-cached blockHeader that is being retrieved for the RPC.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Use schedule.getByBlockHeader for newPayload, constructing a dummy header for the sole purpose of getting the correct WithdrawalsValidator for this block. See reviews comments below for context.
Use schedule.getForNextBlockHeader for forkchoiceUpdated.
Once we remove usages of schedule.getByTimestamp, we can unify the protocol schedules.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Refactor crypto, datatypes, and plugin-api to reduce plugin APIs in the EVM.
Split crypto into crypto services and crypto algorithms
Reverse the dependency between datatyps and plugin-api.
Remove plugin Hash and Address types (use datatypes)
Move PublicKey and Quantity into datatypes.
Lots of changes to imports and build files, and some fromPlugin calls removed.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Danno Ferrin <danno.ferrin@shemnon.com>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Override the transactionSimulator's default TransactionValidationParams with one that allows for exceeding the account balance (which effectively zeros the baseFee).
This mimics the way that eth_estimateGas and eth_call are implemented.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Add log to show where we're reading the jwt from
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Standard path log
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add jwt path to the prettified info log at startup
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Javadoc
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Refactor to only set engine configs when engine is enabled
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Print the ephemeral jwt created by besu if no jwt is passed to the engine api
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
---------
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Cancel older block creation tasks upon receiving a new one
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Use only one thread for building blocks so there is no risk of overlapping
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Fix tests that fail when debug log is enabled
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
---------
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Add deposits to the Execution Layer block structure: EIP-6110. The scope of this commit is to add Deposit related info into BlockHeader and BlockBody. The rest of the EIP including RPC API and validating Deposit with be included in future PRs.
---------
Signed-off-by: Navie Chan <naviechan@gmail.com>
Signed-off-by: navie <naviechan@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Replace getByBlockNumber by getByBlockHeader
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Replace getByBlockNumber by getByBlockHeader
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Replace BlockDataGenerator by BlockHeaderTestFixture
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Replace BlockDataGenerator by BlockHeaderTestFixture
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add final to method param
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Replace BlockDataGEnerator by BlockHeaderTestFixture
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Replace BlockDataGenerator by BlockHeaderTestFixture
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Remove BlockDataGenerator
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
---------
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Introduce BftProtocolSchedule with a copy of MutableProtocolSchedule.getByBlockNumber.
This method will be deleted from the ProtocolSchedule interfaces and so will only exist in BftProtocolSchedule.
Use BftProtocolSchedule in CombinedProtocolScheduleFactory.
Move getScheduledProtocolSpecs into BftProtocolSchedule since it is only used by CombinedProtocolScheduleFactory.
Rename existing BftProtocolSchedule classes to append Builder for clarity.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
It's now only used by the tests following removal of production code paths in 08b822a860
A simple decorator pattern would have been a nicer implementation but I didn't want to expose the protocolSpecs from within the schedule hence why I've used inheritance.
ForksIdsNetworkConfigTest has a particularly hairy construction since it relies on TransitionProtocolSchedule but I've isolated this as an inner class.
I am hopeful that we can refactor ForksIdsNetworkConfigTest out of existence eventually and avoid using streamMilestoneBlocks at the same time.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Changes and config to support using GraalVM AOT to compile and
execute evmTool as an alternate configuration.
While not as long-term performant the startup time
makes filling reference tests with Besu reasonable.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Replace usages of streamMilestoneBlocks on production code paths: RunnerBuilder and TransactionPoolFactory.
These usages were also using getBlockByNumber which is ultimately what we're trying to remove.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Upgrade reference tests to v12.
* Extend the UncleFromSideChain exception to all future forks
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
tracing endpoints keep open a worldstate for the duration of tracing and
response generation.
---------
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Karim TAAM <karim.t2am@gmail.com>
<!-- Thanks for sending a pull request! Please check out our
contribution guidelines: -->
<!-- https://github.com/hyperledger/besu/blob/main/CONTRIBUTING.md -->
## PR description
There is an issue when restarting Besu when a backward sync session is
running, since after the restart it is possible that the Consensus
client sends a FcU or a NewPayload for a block that is present in the
backward sync storage, but not yet imported, so not on the main chain,
but still the backward sync thinks it should not do anything with that
block, so it returns like it has completed the sync, but since the sync
is not done actually then the internal error that the finalize block is
not present.
The solution is to persist the backward sync status, so in case of a
restart, it can resume from where it was interrupted.
## Fixed Issue(s)
<!-- Please link to fixed issue(s) here using format: fixes #<issue
number> -->
<!-- Example: "fixes #2" -->
fixes#5053
## Documentation
- [x] I thought about documentation and added the `doc-change-required`
label to this PR if
[updates are
required](https://wiki.hyperledger.org/display/BESU/Documentation).
## Acceptance Tests (Non Mainnet)
- [x] I have considered running `./gradlew acceptanceTestNonMainnet`
locally if my PR affects non-mainnet modules.
## Changelog
- [x] I thought about the changelog and included a [changelog update if
required](https://wiki.hyperledger.org/display/BESU/Changelog).
---------
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
When receiving transactions from a file parse them as an RLP list.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: Antoine Toulme <antoine@toulme.name>
Reduce the number of places that expose Log4J classes as a part of the
interfaces for methods and classes. While Log4j remains the default we
still need to be able to function when the Log4J jars are removed from
the classpath.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>