- Added `--rpc-tx-feecap` command line flag.
- Maximum transaction fees (in Wei) accepted for transaction submitted through RPC.
- Defaulted to 1 ether.
- Updated `TransactionPool.addLocalTransaction` method: performs an additional check to verify if transaction fees don't exceed user defined fee cap (if cap is set to 0 then it is ignored and means no cap).
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* rename more whitelist occurrences; change allowlisted to allowed and reword where we ended up with allowlisting
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* change Perm*Whitelist JSON-RPC methods to extend the Perm*Allowlist methods to remove dupe
* added unit test for Perm JSON RPC methods collection
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Remove ROADMAP.md and link Wiki Roadmap in README.md
Signed-off-by: Tim Beiko <t.beiko23@gmail.com>
* Update changelog to add EIP 2315
Signed-off-by: Tim Beiko <t.beiko23@gmail.com>
* Update Changelog for 1.5
Signed-off-by: Tim Beiko <t.beiko23@gmail.com>
* Remove developper advocate contact
Signed-off-by: Tim Beiko <t.beiko23@gmail.com>
* Remove ROADMAP.md and link Wiki Roadmap in README.md
Signed-off-by: Tim Beiko <t.beiko23@gmail.com>
* Update changelog to add EIP 2315
Signed-off-by: Tim Beiko <t.beiko23@gmail.com>
* Update Changelog for 1.5
Signed-off-by: Tim Beiko <t.beiko23@gmail.com>
Internally we used to use an enum set to track halt reasons and we would
track multiple halt reasons. However, what the halt reason is does not
matter to reference tests and tracing, only that a halt occurred.
Repalace the EnumSet with an Optional and trace only one revert reason.
This saves us time in enumset management and also allows us to return
quicker once any halt is detected.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Upgrade to ErrorProne 2.4.0
* public constructors on abstract classes are removed
* Javadoc must have meaningfull documentation
* lambdas should not be variables
* Added to the list of confusing inner class names (Entry and Type)
* no assert keyword in tests
* Obsolete JDK classes produce errors now
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Upgrade Library Versions
Upgrade library versions to most recent version
Exceptions:
* Errorprone - lots of new violations need fixing
There will be a follow on PR for this.
* picocli - non-trivial conformance changes
* EthSigner&Orion - similar non-trivial API changes, plus it's only for
integration testing
* Kubernetes - significant library revisions
* Web3j - Web3j changed some error semantics in 5.0 that broke
acceptance tests. Expect an update in a follow on PR.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Detect zombies backend query and abort useless processing.
The timeout handler populate the request context with a boolean value indicating whether or not the query is alive, i.e the HTTP request has not expired. Backend queries are now conditioned by this value and can be stopped if needed.
This PR experiments this mechanism on a reduced scope. Hence, only `eth_getLogs` backend queries are affected.
- Created `BackendQuery` utility class to run a process only if the query is alive, i.e timeout not expired.
- Put `AtomicBoolean` value in the `JsonRpcRequestContext`
- `TimeoutHandler` sets the alive value to `false` if the timeout handler is triggered.
- Updated `BlockchainQueries` to run steps depending on the value of the `AtomicBoolean` retrieved from the request context.
- Added unit tests.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
Way back in the pantheon days, I put the DATABASE_METADATA.json file in
the database directory. This was a bad idea because rocksdb owns that
directory. We changed to putting it in the directory we own, data, but
we needed to support the old way of doing things. The time to support
that old location has well and truly past so now we're safe to stop
looking in that directory.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
* replace whitelist/blacklist with allowlist/denylist and support both versions in CLI options
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
- Implemented submitHashrate endpoint.
- Updated eth_hashrateEndpoint so that it returns the cumulative hashrate of all sealers if available. Otherwise it returns the local hashrate
- Added hashrate submission with Stratum1EthProxyProtocol and Stratum1Protocol
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
* Resolve inconsistent handling of [Bb]oolean config options by handling primitives the same as the boxed type.
Signed-off-by: Steven J Schroeder <steven.schroeder@consensys.net>
Ensures the "node" field on log messages is correct when node-clusters are restarted during AT.
Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>
Before this pull request Besu was using the latest known fork id to create status message for Ethereum P2P protocol handshake.
This latest known fork id was created based on a list of forks retrieved from the Genesis.
For private networks it is possible that all fork blocks number are set to 0.
The algorithm to compute the valid fork hashes excludes 0 values.
As a result, the list was empty and the `getLatestForkId` was returning `null`. This is an issue when you support capabilities >= to Eth/64 sub protocol because other peers expect the fork id value in the `RLP` encoded message.
Moreover, the algorithm to compute the fork id should be aware of the chain head number and update `CRC` value only for fork blocks below the current head.
This pull request fixes this issue by fetching the chain head number and update accordingly the `CRC` value.
Unit tests have been extended to cover an exhaustive list of possible combinations on named networks (`goerli`, `rinkeby`, `ropsten` and `mainnet`).
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* Add onchain privacy group multi-tenancy support to priv_getPrivateTx and priv_getPrivRcpt
Signed-off-by: Lucas Saldanha <lucas.saldanha@consensys.net>
ProtocolContext uses a generic for the consensus state, which has a very
large footprint across the code to accomplish what it intends to
accomplish. For every call there are about 61 other lines per call that
need to be updated, over 1300 lines total.
Instead replace it with java.lang.Class#cast, which provides runtime
security, and use generics to provide the compile time sugar that
allows for chained methods of the appropriate type. Then remove its
(quite large) footprint from the rest of the code.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
The NAT manager's `MANUAL` method has been removed. This mode does not seem really useful because it does the same thing as a NONE mode.
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
* reduce number of validators, remove unnecessary checks for number of peers (this is already done in cluster.start) and reduce number of blocks we wait for
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* check status of cluster not a single node
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Performance measurements have indicated that the list of Bytes32 for
memory is not performant enough. Moving to a byte array reduces wrapper
object thrashing as well as simplifying cross-word boundary logic (there
are no boundaries).
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Add an option to run besu after blocks import. This is aimed to cut the
startup penalty in half for hive testing, combining the block import
with the node execution.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* feat: FastSync now stops on failure instead of falling back to FullSync
* feat: exiting on FastSync failed
* feat: FastSync continues on FullSync when no errors happened
Signed-off-by: Alexandre PARIS-VERGNE <alexpv14@gmail.com>
We consider the named network condition to be satisfied when --network
is explicitly used OR when it isn't supplied but neither are
--genesis-file nor --privacy-enabled
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Extend the `blocks import` subcommand to accept multiple files in the
command line and import them in the same batch.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Improved JUMP and JUMPSUB destination check. Avoid having to browse the code if the destination == code size
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
* Handle nested TOML array to resolve TOML array decoding bug in certain plugin configs.
* Fix for picocli unable to determine if plugin options are multivalue.
Signed-off-by: Steven J Schroeder <steven.schroeder@consensys.net>