* added test file to match any topic
* add singleton list containing null if empty topic passed in
Signed-off-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>
* avoid the edge case of long minimum value which gives a negative value when passed into abs()
* changed some Longs to long where they were statically intialized
* replace Lists.emptyList() with Collections.emptyList()
* removed unnecessary eq() invocation and resulting code smell
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Replace Log4j2 API with SLF4j API
* Replace explicit Log4J2 with util call
* Replace ThreadContext with Slf4J's MDC in test
* Inspect raw request parameter for admin_changeLogLevel
* Add errorprone rule to prevent the creation Log4j2 loggers
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* test + fix
Signed-off-by: Frank Li <b439988l@gmail.com>
* spotless
Signed-off-by: Frank Li <b439988l@gmail.com>
* typo
Signed-off-by: Frank Li <b439988l@gmail.com>
Co-authored-by: Frank Li <b439988l@gmail.com>
* timestamp being behind or at head does not make a block invalid
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Fix json-rpc HTTP tests [#535]
The `o.h.b.e.a.j.JsonRpcHttpServiceTest#exceptionallyHandleJsonSingleRequest` and `o.h.b.e.a.j.JsonRpcHttpServiceTest#exceptionallyHandleJsonBatchRequest` tests were throwing ClassCastException in `o.h.b.e.a.j.JsonRpcHttpService#validateMethodAvailability` which wasn't ever catched, returning status 500 by default, but that wasn't the use case aimed to test. Another test running an exceptional method is `o.h.b.t.a.p.EnclaveErrorAcceptanceTest#whenEnclaveIsDisconnectedGetReceiptReturnsInternalError` which validates an "Internal Error" proper json-rpc response. I changed the first two tests to be consistent with the later one.
* Extract json-rpc HTTP authentication to a handler [#535]
* Replace TimeoutHandler in GraphQLHttpService with Vert.x's impl [#535]
* Extract json-rpc HTTP parser to a handler [#535]
* Refactor json-rpc WS handler [#535]
* Add json-rpc IPC support [#535]
Signed-off-by: Diego López León <dieguitoll@gmail.com>
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* for snap and fastsync. we need to clean the flat storage between two pivot block
* return empty optional when storage and account location are empty or the data does not match the hash.
Signed-off-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Karim TAAM <karim.t2am@gmail.com>
* use paris evm config in merge protocolschedule
catch exception on block persist so that it can be added to badBlocks
Signed-off-by: garyschulte <garyschulte@gmail.com>
* add trailing peer limiter
Signed-off-by: Frank Li <b439988l@gmail.com>
* spotless
Signed-off-by: Frank Li <b439988l@gmail.com>
* add conservative estimation of next pivot
Signed-off-by: Frank Li <b439988l@gmail.com>
* create new limiter for every pivot
Signed-off-by: Frank Li <b439988l@gmail.com>
* typo
Signed-off-by: Frank Li <b439988l@gmail.com>
Fix a bug that caused the worldstate to be missing during a fastsync and prevented it from completing properly
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Remove the Gas object from the EVM and replace it with the primitive
long. This will have positive impact on short lived object garbage
collection stats, which at very high load causes significant performance
issues.
This also codifies EIP-4803 in the Besu EVM, limiting gas to a signed
64-bit long internally.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Change the unit test execution to use the Junit5 JUnitPlatform. This
allows for a mix of junit 4 and junit 5 tests and for a gradual
migration to junit 5 instead of a big bang. One class depended on
junit 4 exceptions and was updated. Two tests depending on
native libraries fail gracefully on mac (and only mac).
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Upgrade EnodeURLImpl builder strategy
* Lookup the local hostname if specifying localhost/loopback
* Add test for valid domain that can be found and can not be found
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
Co-authored-by: Alberto Hernandez <albherna@gmail.com>