* Use binary search to eth_estimateGas more accurately
eth_estimateGas currently conservatively estimates gas this change
will take that estimate and use it as a hi bound and will use
gasUsed as lo bound to hone in on the most true gas limit required
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
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>
* 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>
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>
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>
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>
Update following sections:
Gradle build, CircleCI, GitHub Actions, Docker
The devp2p TLS mutual authentication unit tests dealing with PKCS11+nss and QBFT+PKCS11+nss ATs were failing on Java 17 when dealing with RSA keys. The unit tests and AT are updated to use EC keys instead. The keystores, truststores, CRL etc. involved in those ATs are regenerated and detailed instructions are provided on how they are created.
Signed-off-by: Usman Saleem <usman@usmans.info>
* split ATs into privacy/permissioning/etc and the rest
* don't run non-mainnet ATs on PR builds
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Handle INVALID_PARAMS with a 200 http status code
* Change tests to expect INVALID_PARAMS with a 200 http status code
* Add change log entry
* Change test to handle jsonRPC result rather than raised exception
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
* override port conflict check
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* add enum for special test type
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Revert "Revert "Upgrade OpenTelemetry (#3675)" (#4031)"
This reverts commit 17de636fe2.
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Make sure we don't initialize the OpenTelemetry global singleton by mistake
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* disable global otel singleton explicitly
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* make sure to set GlobalOpenTelemetry at most once to avoid test failures
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* reset for tests
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* fix changelog
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.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>
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>
modified flexibleutil so it works with dynamic byte arrays, some logs to remove
smart contracts adapted, changed bytecodes
solidity contracts changed so they use bytes instead of bytes32
modified flexibleutil to support ec keys
flexible privacy tests adapted
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Signed-off-by: Miguel Angel Rojo <miguelangel.rojofernandez@mastercard.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Update the greclipse version in spotless as directed by build errors
to reduce random formatting errors.
Also, update formatting to new version
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* create AbstractJsonRpcTest to enable future code reuse in similar tests
Signed-off-by: Pedro Novais <jpvnovais@gmail.com>
Co-authored-by: Antony Denyer <git@antonydenyer.co.uk>
* Revert "ignore the tests that use tessera enclave via docker (#4297)"
This reverts commit 98e214cedc.
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* lock version of tessera and make public
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* removed constraint with the length of the privacy public key
* refactor to include tessera ec encryptor
* added EC snippet to the tessera json config, still need to replace base64string from web3j
* acceptance tests working after modifying the web3j library to allow secp256r1 keys
* using NACL encryptor by default
* using web3j v4.9.4 and web3j-quorum v4.9.0
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
Co-authored-by: Antony Denyer <git@antonydenyer.co.uk>
* Upgrade OpenTelemetry
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* remove a single sleep, poll with a for loop instead
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* use the new approach to send trace requests
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* check that the timestamp in fcu payload attributes is greater than the one of the head block
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* added acceptance tests
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* updated EngineForkchoiceUpdated to return INVALID_FORKCHOICE_STATE when finalized block hash or safe block hash are unknown
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* fixed tests and added new ones for invalid forkchoice state and saving safe block
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Upgrade Errorprone
Upgrade errorprone to 2.13.1. Like all errorprone upgrades there are
new checks requiring code changes.
* Unused methods now cause compilation errors
* fields must be static and final
* Effectively constant booleans must now be returned as true/false.
* longs should not auto-cast to double.
* turn off errorprone javadocs
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Introduces new JsonRPCService that handles both http and websockets
* Removes websocket specific configs
* renames WebSocketRequestHandler to WebSocketMessageHandler to be more in line with websocket semantics.
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
* Fix two operand stack tests
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Remove unreachable assert
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Replace expected annotation field with assert
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Extract variables to let only a single call for assert
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* require 3.1.15 of jnr-posix
* cover more bases with epl license
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>