Removes as many Gradle 7.0 compatibility issues as possible
* `baseName` -> `archiveBaseName`
* `extension` -> `archiveExtension`
* `destinationDir` -> `destinationDirectory`
* `runtime` -> `runtimeOnly`
* Change some log4j-api and log4j-core dependencies
* Remove an unneeded and outdated plugin (`net.ltgt.apt`)
* tweak the plugin-api change detector's property annotations.
Warnings still exist with one external plugin used for license file
checking that we do not control the source code for.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Make needed changes to have LogsBloomFilter become an immutable object.
Since we are returning this object from other immutable values then we
should mechanically enforce it's immutability by removing mutating
functions. These are moved into a builder ineterface where the bloom
values can be incrementally built and a LogsBloomFilter object is
produced when calculations are complete.
This allows us to make LogsBloomFilter a DelegatingBytes subclass and
eliminates the need to call getBytes in situations where that is needed.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Update dependencies to most current version
- except picocli which is a major version update
Alphabetize dependencies
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Use UnformattedDataImpl as a DelegatingBytes class, so we can have it used throughout and reduce the churn of new objects
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Add support for external GPU mining via the stratum protocol.
Three new CLI Options support this: `--miner-stratum-enabled`,
`--miner-stratum-host`, and `--miner-stratum-port`.
To use stratum first use the `--miner-enabled` option and add the
`--miner-stratum-enabled` option. This disables local CPU mining and opens up
a stratum server, configurable via `--miner-stratum-host` (default is
`0.0.0.0`) and `--miner-stratum-port` (default is 8008). This server supports
`stratum+tcp` mining and the JSON-RPC services (if enabled) will support the
`eth_getWork` and `eth_submitWork` calls as well (supporting `getwork` or
`http` schemes).
This is known to work with ethminer.
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
The IbftQueryService has been added to the Plugin-api, along with an implementation.
This allows IBFT specific aspects of a block header to be queried (round number, and signers in block).
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
We had two mostly idenitcal classes used for GraphQL and JsonRPC/WS.
This PR merges that to one class.
* Move from org.hyperledger.besu.ethereum.api.json.internal.queries to
org.hyperledger.besu.ethereum.api.query
* Add one method from the GraphQL version
(generateLogWithMetadataForTransaction)
* Remove graphql version and point graphql to the shared version.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* [PAN-3023] Add command line option for target gas limit
Signed-off-by: cfelde <cfelde@cfelde.com>
* [PAN-3023] Add command line option for target gas limit
Signed-off-by: Christian Felde <cfelde@cfelde.com>
* [PAN-3023] Add command line option for target gas limit
Signed-off-by: Christian Felde <cfelde@cfelde.com>
* [PAN-3023] Add command line option for target gas limit
Signed-off-by: Christian Felde <cfelde@cfelde.com>
[PIE-1858] Added functionality to register custom metrics categories and exposed some PoA data for metrics.
Signed-off-by: Mark Terry <mark.terry@consensys.net>
* adding in spdx-license-identifier & updated check for the same; removing license check from spotless
Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>
* Change CheckSpdxHeader to a task.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Move header validations that extract the signer key out of the "light"
validation mode. Reduces fast sync time on goerli 75%
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Retesteth requires support for mining without block rewards and without PoW.
No Proof simply requires exposing the nonce generator and using a special
EthHashSolver.
No Reward is supported via a flag in the ProtocolSpec, stating whether or not
to skip zero rewards. For frontier, homestead, and tangerine whistle (EIP150)
this flag is false. For all other forks and all other consensus engines the
flag is true, even when emulating EVM state from those three forks as all
non-PoW consensus engines never consider block rewards.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This reverts commit 814b36e4
The needed chantes to get rid of Instant.now (which is also needed to get rid
of the wall clock dependency) are too deep and intrusive into IBFT to try and
speed patch them in that some APIs require re-work, so in the interst of test
stability this gets sheleved until it is all ready.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
To allow us to reset the timestamp in the blockchain for Retesteth support
we need to pass a Clock to affected APIs and use that instead of the static method
System.currentTimeMillis(). The most consistent way to do this that will ensure
that the API does not sneak back in is to ban the method via ErrorProne.
TestClock.fixed() was altered to return the "now" time of the first time the fixed clock was requested, needed for many header validation tasks validating headers are not from the future.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Moves init code into a separate builder instead of a static init method, with common code in an abstract base class and subclasses of the builder for each of the consensus variants.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Move RocksDBStats to it's own module. This also brings metrics to
metrics:core since none of our other module have nested modules but
they have peer modules.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [PRIV-41] Use metrics system for private state db
- Use PrivacyParametersBuilder to build PrivacyParameters
- refactor PrivacyParameters to expose default options
- refactor test builders to use PrivacyParameters.DEFAULT
- Use URI in Enclave
* Fix: enclave tests from bad merge
* Fix privacy acceptance tests after db configuration changes
* Switch to use nested class for PrivacyParametersBuilder
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Added ability to subscribe to dropped transactions from the transaction pending pool.
Implemented subscription webservice to support this.
* Added metrics to the pending transactions, tracking the number of local and remote transactions in the pool.
* Converted listener management in pending transactions to use the Subscribers util object.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Store the instant that a pending transaction is added to the txpool, and expose this out through the api.
* Clock.systemUTC only used once.
* TestClock class added with a factory method for a fixed clock.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
It was identified during a demonstration that Pantheon, when running
in IBFT would show a "Bad Block Import" when a validator was added or
removed from the validator pool.
It was determined this was due to IBFT maintaining a single, 'global'
copy of the curent list of validators, which was updated when a block
was imported - thus when a block which had been imported vi IBFT
was then received via Eth block propogation, the validator list would
not align with the global list (as it had been updated in the IBFT
import).
The solution has been to utilise the VoteTallyCache as used in the
Clique implementation.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>