Experimental backup and restore via `operator x-backup-state` and `operator x-restore-state` CLI commands. Besu needs to be in a non-operational state for the backup and restore to occur. Restore has only been tested into an empty database, not on top of an existing database.
This feature is not advised for production use at the moment.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
CompletableFuture already has its own atomicity under the hood that
allows for threadsafe cancelations.
Hides the AtomicReference that gives us idempotency in executing the
task so that inheritors don't need to care about it.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
How the GraalVM reports itself in the vendor and vm flags has evolved in
newer version. Report GraalVM if it is seen in either string.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Create different Docker images with different base JVMs. Initially
OpenJDK 11.0.7, whatever OpenJDK latest is (14.0.1 at the moment), and
Graal 20.1.0 .
We still maintain a "Default" which will remain Java 11.0.x
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
handle peerAdded on admin_addPeer to add the peer to the PeerTable
handle peerRemoved on admin_removePeer to remove the peer from the PeerTable
Signed-off-by: Alexandre PARIS-VERGNE <alexpv14@gmail.com>
Refactors prior to Backup/Restore
* Allow multiple extra commands on the command line
* Extra commands appear at the end of the command line
* Pull node setup out of DB migration test
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* add hive test
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* garbage endpoint in peerdisccontrollertest
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* rlp deserialization test
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* make things work with optional
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* PeerDiscoveryPacketPcapSedesTest changes from Optional getFrom
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* rlp deserialization test
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* allow empty from field in ping
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* comment
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* logging
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* cleanup rebase
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* scaffolding
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* pass hive
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* remove some stuff
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* comment
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* leave list properly
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* spotless
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* rename port -> udpPort
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* move comment
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* fix documentation bug
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* remove redundant supression
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* more accurate tests
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* empty commit to trigger build
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Added admin_logsRepairCache end point which takes an optional block
number parameter. The end point fixes all segments starting with the
block number passed in or with the head block if parameter is empty.
Signed-off-by: David Mechler <david.mechler@consensys.net>
* deprecate CLI option for privacy precompile address; only put the relevant precompile in the registry
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Add Reference Test checker
Add a check test to fail the build if the reference test submodule is
accidentally updated without a deliberate change to the
corresponding build.gradle.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Besu's Retesteth implementation failed transition tests. Two reasons:
* It wasn't adding the DaoForkBlock to genesis files correctly
* It wasn't using the protocol schedules og the block being imported,
but instead to the current chain head.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* #1066 Switched to use unprefixed hex strings for memory and stack values
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Disable flaky tests per Ben Burns(Yeti) request
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Revert last commit and enable ignored tests.
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1157 - updated to create 2 agents so that proper bonding can occur
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1162 - Updated test to mock the local peer PING packet creation so that the hash can be managed.
Signed-off-by: David Mechler <david.mechler@consensys.net>
Occasionally, a callback given to a subscriber will complete a future
which then runs another task which adds another callback to the
subscriber list of the same type. By the time the first callback is
finished, the new callback (which presumably wants another "real"
instance of the event to happen) could be next up in the list of the
first's subscribers callback iteration. This takes a snapshot of the
subscribers when the desired event happens so there's no risk of
following down the rabbit hole.
I collected some rough data about the size of the subscriber lists to
see the penalty for copying them and I found that by the time a full
sync began or a fast sync had started downloading headers, the maximum
subscribers any one Subscribers class had was 7.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Our current EVM loop splits out cost, execution and halt evaluation. Flattening these three into one method results in a significant speedup in reference tests, which are EVM heavy.
Mostly the cost, exceptionalHaltCondition, and execute are merged into one method, sharing calculations between the three.
In fixed cost operations the merger is very simple AddOperation is a representative fixed cost operation.
Check the gas, check other exceptional halts, do the work, return the result.
In variable cost operations there is some value reads to be done before the cost is calculated. This is where a lot of the de-duplication occurs. CodeCopyOperation is a representative variable cost operation.
JumpIOperation shows where this merger pays off. If the condition is zero then some exceptional halts don't need to be considered. But with the three way split each step couldn't consider such optimizations because the local data was lost between each call.
Some cleanup was enabled by this. The old exceptional halt predicates were deleted and moved into each operation. Gas costs must be checked by the operation instead of globally, or we would lose state if we had to split into two methods and do the gas check shared.
The OperandStack was flattened into a single class instead of an interface plus a single implementation. stack underflow and overflow are signaled via named exceptions and handled via catches instead of pre-checking the stack height. Since overflow/underflow is exceedingly rare in mainnet transactions java exceptions are the more performant means.
Some of the APIs had lingering impacts on how some tests were run and the EVMTool (we cache operation cost in the message frame now.)
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Update to the reference tests used on hivetests.etherdevops.io and
retesteth.etherdevops.io. Both are using a more current release of the
reference tests that includes performance and subroutines items.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>