* implementation of Bonsai snapshots based BonsaiWorldStateArchive
includes: try-with-resources and AutoCloseable WorldState in order to release snapshots when we are done with them
Signed-off-by: garyschulte <garyschulte@gmail.com>
The EVM refactor introduced a couple of EVM trace changes that are
outside the EIP-3115 standards.
* pc, gasRemaining, and memory were all post-execution values
* some places null should be "0x0" or "0x"
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Due to subtle differences between Bytes32 and UInt256 the changes failed
burn-in testing and are being reverted.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
`BlockchainTests/ValidBlocks/bcEIP1559/feeCap.json` performs 16 transactions for the same sender, that's ~4% of the default pool size (i.e. 4096)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* don't add to bad blocks manager on StorageException
* support for MerklePatriciaTrie exceptions
Signed-off-by: Justin Florentine <justin+github@florentine.us>
The current internal storage APIs implement UInt256 rather than Bytes32,
which is an accident of prior EVM design. This migrates all internal
handling of storage addresses and values to Bytes32.
The main performance gain is reduced GC pressure, in that UInt256
stores the data as an array of ints, whereas Bytes32 keeps a sliced or
wrapped array of bytes. Since database APIs are all byte array based
this should remove unneeded conversions when going to/from the DB.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* Adjust tracing calls
Restore two tracing behaviors in the EVM introduced by the unrolled loop
* change gas only on successful operations
* send post execution call after gas and PC changes.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* Fixed default fromBlock value and improved parameter interpretation in eth_getLogs RPC handler. Improved test coverage.
Signed-off-by: mark-terry <mark.terry@consensys.net>
Based on previous work of @garyschulte
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Overview of changes:
* Remove vestigial log tracing. We will never use it in production and
standard json tracing gets us what we need
* Reduce use of lambdas and optionals. Reads great, translates into a 10%
perf hit in a tight loop.
* Unroll operation loop in some cases. Those are (a) ops that haven't
changed in any way since Frontier (b) ops not overridden in downstream
uses and (c) operations that translate into short static executions.
This has the longest tendrils as it is enabled by operations exposing
static methods to do their work.
* Refactoring of the operationTracer. The single, lambda consuming
traceExecution method was a barrier to performance. It has been replaced
with tracePreExecution and tracePostExecution. Look at
DebugOperationTracer to see how traces that need to operate on both
sides of the operation can be handled with this API.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Replace deprecated parseWithHandlers from tests
* Set System out and err to use the streams used in the tests
* Remove defaultExeceptionHandler and new execute API will use different default
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* Also adds a one time call to initiate connection to nodes in static nodes
list after local node is ready. In the absence of this call, the connection attempt
is made after the configured interval (default 60 seconds) to check maintained
connections. This is to make sure the node doesn't have to wait for almost a minute
before it can start interacting with peers (and sync blocks etc.)
Signed-off-by: Vinod Damle <vinod.damle@kaleido.io>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Vinod Damle <vinod.damle@kaleido.io>
* Upgrade RocksDB version from 6.29.5 to 7.6.0.
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
* Add a changelog entry
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: ahamlat <ameziane.hamlat@consensys.net>
* During handshake, flip the encrypted message decryption by starting with the new format (EIP-8), and if there is an exception, try the old format. This will reduce the number of exceptions and unnecessary executions.
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
* update CHANGELOG.md to give more context on this PR.
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
* update CHANGELOG.md to give more context on this PR.
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
* Delete some debug code committed by error
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: ahamlat <ameziane.hamlat@consensys.net>
* use optimistictransactiondb for mutable isolated snapshots
* plumbing necessary to have a snapshot specific updater.
* snapshot rolling working
* implement AutoCloseable on BonsaiSnapshotWorldState to ensure we can correctly dispose of snapshots
* add snapshot transaction cloning, change snapshot based worldstate to extend persisted worldstate rather than in-memory worldstate
Signed-off-by: garyschulte <garyschulte@gmail.com>
* don't add to bad blocks manager on StorageException
* add bugfix to changelog
* adds test coverage
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Our current GraphQL scalar parsing interacts poorly with the variables
support in the library. Revise the parsing so it works correctly.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>