* 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>
only when you are trying to process a privacy marker transaction
Wrap errors with Enclave exception
Signed-off-by: Antony Denyer <email@antonydenyer.co.uk>
Co-authored-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
Refactor uses of BlockchainQueries so that they use a single instance
instead of createing one every place they need it.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
There are a whole class of errors in the deframer that come from
IllegalArgumentExceptions. Those are thrown when Besu validates incoming
data. Because Besu is not the source of these errors we should not log
them any higher than DEBUG.
The most common one is `Caused by: java.lang.IllegalArgumentException:
Invalid node id. Expected id of length: 64 bytes.` and this is coming
from a non-conforming client connecting to Besu.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* [BESU-122] Index tx log bloom bits and use the index for queries.
This comes in two parts: first a CLI program to generate the log bloom
indexes, then updating BlockchainQueries to use the indexes if present.
First, to create the bloom index on a synced node (for example Goerli):
`bin/besu --network=goerli --data-path /tmp/goerli operator generate-log-bloom-cache`
There are options where to start and to stop. I estimate 15-30 minutes
for mainnet.
The RPCs should magically use the indexes now. Note that the last
fragment of 100K blocks is not indexed and uses the old paths.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Add support for MuirGlacier
* Add block numbers for Ropsten and Mainnet
* Add reference tests for difficulty calculations
* Update reference tests for new MuirGlacier difficulty tests
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
updated ClassicProtocolSpecs for Agharta Definiton to use
SpuriousDragonGasCalculator (instead of Istanbul gas calculator)
Signed-off-by: edwardmack <ed@edwardmack.com>
Vertx by default orders all calls to executeBlocking in an ordered
fashion. As a side effect all requests are single threaded, even across
multiple clients. Because JSON-RPC has request identifiers it is not
needed to thread responses as they can be answered out of order. This
also allows multiple threads to handle requests, increasing throughput.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* NewBlockHeaders performance improvement
When sending out new block headers to the websocket subscribers we
serialized the block once per each subscriber. This had some crypto
calls for each serialization and was CPU bound with redundant
calculations.
We can memoize the result and only serialize it once per block.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Add warning when enabling PRIV/EEA APIs with privacy disabled
* Prevent execution of PRIV/EEA methods when privacy is disabled
Signed-off-by: Lucas Saldanha <lucas.saldanha@consensys.net>
(a) Setting classic block to zero requires all blocks at zero to have the mainnet 1920000 hash. That will never happen. No clients will sync as long as this is in place
(b) a full sync fails
```
2019-11-18 10:46:51.301-07:00 | EthScheduler-Services-5 (importBlock) | WARN | MainnetBlockBodyValidator | Invalid block: state root mismatch (expected=0xb8df31366db4c4dd0076bc0ddaffdeceba6c882681108cc000db9bc5f85c300c, actual=0xf4344e62f031897ff61f9e02a465b3d13f983220f52f1e452690448dc366a2ee)
```
Probably a bug in besu code, but until that bug is sussed out we can't support mordor.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Change the configuration name of "CustomForks" to "Transitions." This
will better reflect that this is a list of blocks where transition
events might happen. These may be more than forks, and mainnet is also
moving away from the name forks to "network upgrades." Transitions is
more general purpose.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Remove publishing steps from Jenkins Build
We are moving to CircleCI for our primary CI/CD solution
Signed-off-by: Edward Evans <edward.joshua.evans@gmail.com>
* Enable circle publishing
Signed-off-by: Edward Evans <edward.joshua.evans@gmail.com>
It was identified that when both KV_ROCKSDB metrics and Privacy were enabled,
that Besu failed to start due to a naming collision in Metrics Collators - this was ultimately due to Besu having 2 keyvalue stores - one for public state, and another for private state - and _both_ using the same metrics.
To overcome this issue, the metrics used in the private kv store are prefixed with the word "private".
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
* Multi-Tenancy: Do not specify a public key anymore when requesting a payload from Orion, so all private keys are tried to decrypt the encrypted payload.
Signed-off-by: Stefan Pingel <stefan.pingel@consensys.net>
This PR introduces support for the Gotham fork on the Ethereum Classic Network including:
ECIP-1017: Monetary Policy and Final Modification to the Ethereum Classic Emission Schedule
ECIP 1039: Monetary policy rounding specification
ECIP 1041: Remove Difficulty Bomb
Signed-off-by: edwardmack <ed@edwardmack.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>
EF's testing team published the first version of the 7.0.0 reference tests.
* Update some blacklist patterns to catch all future fork names
* Ignore a new "postStateHash" json property
* Ignore test randomStatetest94 as it is too memory heavy to run in parallel
* Update file pattern as a stray test sits alone in one directory
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
This includes code to address reading config for classic network and
kotti test network.
ClassicForkPeerValidator checks peers at classicForkBlock (same as Dao
Fork Block) and connects with peers that did not do the Dao Fork and
continued on the classic network.
Signed-off-by: edwardmack <ed@edwardmack.com>