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>
<!-- Thanks for sending a pull request! Please check out our
contribution guidelines: -->
<!-- https://github.com/hyperledger/besu/blob/main/CONTRIBUTING.md -->
## PR description
This PR aims to remove the usage of getByBlockNumber from the
FlexiblePrivacyPrecompiledContract. As far as analysis shows the only
requirement is to get a protocolSpec (it doesn't matter which one)
currently it always fetches the protocolSpec for block number 1 which
can vary according to the network config. We're changing that get the
protocolSpec for block 0 which is the only block we always have the
header.
AT nonmainnet on circle CI
Pipeline - 21048
## Fixed Issue(s)
<!-- Please link to fixed issue(s) here using format: fixes #<issue
number> -->
<!-- Example: "fixes #2" -->
Fixes#5160
## 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: Gabriel Fukushima <gabrielfukushima@gmail.com>
This GHA will add the checklist that's currently in the PR template, as
a comment, on newly opened PRs.
Because it needs write access (to add the comment), it needs to run on
the `pull_request_target` action, which means you won't see the outcome
on _this_ PR, but only once it's merged in, you'll see it on subsequent
PRs - example -
https://github.com/daisy-row/vigilant-octo-umbrella/pull/51
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.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>
* Remove deprecated EF bootnodes
Signed-off-by: Rafael Matias <rafael@skyle.net>
* Remove unnecessary bootnode data from checkpoint json test
* Remove ef deprecated bootnodes from genesis
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
---------
Signed-off-by: Rafael Matias <rafael@skyle.net>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
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>
Pull up and simplify data passed to CheckpointSource, which then allows checkpointBlockHeader to be used by protocolSchedule.getByBlockHeader.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Fix empty body concept after shanghai
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Check protocolSchedule to create empty block and add withdrawals to empty block check
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Add unit tests
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Extract block creation into a private method
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Nit changes
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* Refactor test names
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
---------
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Add an acceptance test to ensure eth_getBlockByNumber and eth_getBlockByHash return withdrawals correctly for shanghai
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Added Ethereum execution spec test to be generated and executed by reference tests gradle task. Add `https://github.com/ethereum/execution-spec-tests/releases` as custom ivy repository to easily download and cache the test specs. Updated the reference test gradle file to generate the test Java classes.
Signed-off-by: Usman Saleem <usman@usmans.info>
Support two in-the-wild models of blockhash for testing. For state-tests
always use the keccak hash of the decimal text of the block number.
For t8n always use the blockHashes table in the env. No change to production
handling of blockhash. Refactored BlockHashLookup to split caching
implementation from API.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
In one case reading config files used parseLong instead of decode.
decode accepts `0x` and decimal, only a single radix for parseLong.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>