* Decouple PoW from ethash
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Address code review comments, create a dev network for ecip1049, prepare for keccak hasher
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add PoW function and a few simple tests as test vectors
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Make the PoWHasher hash function a bit easier to understand
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* simplify and call out the code of the keccak hash function
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* support fixed difficulty for keccak mining
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Fix the dev network config
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add comment to KeccakHasher
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Increase fixed difficulty for the ecip1049 dev network to produce hashes a bit less often
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* spotless
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* fix test expectations
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Fix javadoc issue
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* add acceptance test using keccak mining
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* add changelog entry
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Address code review comments
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
This allows Besu to interop with an Quorum IBFT-1 network which has been updated to use a 2/3 validator threshold, rather than 2F+1.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
* Enable Besu to import blocks containing quorum style private transactions
* Add RPC to accept quorum style raw private transactions
Signed-off-by: Stefan Pingel <stefan.pingel@consensys.net>
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
Co-authored-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
* Finish internal ConstantinopleFix->Petersburg transition, including
class names. Only backwards compatibility and retesteth use of the
name will remain.
* Remove four unused config fields from json configs. These are fields
with no code uses of any sort. All are implied by other fields.
eip150Hash, eip155Block, eip160Block, and daoForkSupport.
* Remove redundant fork block fields where their value is implied
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Aspects of the consensus mechanism associated with block creation, and validation have been moved
from the IBFT package, into into consensus/common, such that they can be reused for the QBFT
implementation.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
* modifying transaction RLP encode/decode to handle GoQuorum private tx value
* added static flag to be read by TransactionRLPDecoder so that we can still allow chainId=1
* ensure chainId and v not both provided
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Add genesis config parameter ecip1099Block
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add stub for epoch activation config
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add stubs for EtcBesuControllerBuilder
that will handle ECIP 1099 Colibrate Epoch Duration functionality
Signed-off-by: Edward Mack <ed@edwardmack.com>
* introduce EtcHashMinerExecutor
Signed-off-by: Edward Mack <ed@edwardmack.com>
* implement EtcHashMinerExecutor
Signed-off-by: Edward Mack <ed@edwardmack.com>
* remove ecip1099 genesis config option
Signed-off-by: Edward Mack <ed@edwardmack.com>
* apply spotless to code
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add test for Etc Hash epoch calculation
Signed-off-by: Edward Mack <ed@edwardmack.com>
* cleanup comments, apply spotless
Signed-off-by: Edward Mack <ed@edwardmack.com>
* make needed variables final
Signed-off-by: Edward Mack <ed@edwardmack.com>
* update changelog
Signed-off-by: Edward Mack <ed@edwardmack.com>
* refactor code to add epochCalculator to EthHash
As suggested in comment removed EtcHash series of classes to keep
existing controller.
Signed-off-by: Edward Mack <ed@edwardmack.com>
* use gas limit calculator
Signed-off-by: Edward Mack <ed@edwardmack.com>
* fix imports
Signed-off-by: Edward Mack <ed@edwardmack.com>
* run spotless apply
Signed-off-by: Edward Mack <ed@edwardmack.com>
* fix imports
Signed-off-by: Edward Mack <ed@edwardmack.com>
* fix comments
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add ecip1099Block option to asMap method
Signed-off-by: Edward Mack <ed@edwardmack.com>
* addded genesis config option getEcip1017EraRounds
to define the number of Rounds in an Era for Ethereum Classic Emission
Schedule.
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add entry to CHANGLOG.mg
Signed-off-by: Edward Mack <ed@edwardmack.com>
* some doc changes and implemented style suggestions
Signed-off-by: Edward Mack <ed@edwardmack.com>
The IBFT2 configuration section of a genesis file has been updated
to allow the specification of a block reward (defaults to 0) and also an explicit
recipient (defaults to the block proposer).
The block reward can be specified as a hex string (with 0x prefix) or a decimal
string (no prefix), and is defined in Wei.
These values are not modifiable for the duration of the network.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
* update getForks to ignore classicforkblock param
Signed-off-by: Edward Mack <ed@edwardmack.com>
* update gotham block fork number
Signed-off-by: Edward Mack <ed@edwardmack.com>
* add to entry to CHANGELOG.md
Signed-off-by: Edward Mack <ed@edwardmack.com>
allow either constantinoplefixblock or petersburgblock but not both
throw RuntimeException when both petersburg and constantinoplefix are specified
Signed-off-by: Alexandre PARIS-VERGNE <alexpv14@gmail.com>
Some of our loggers were not private, static, and final. In a few
cases these were non-static fields in classes that were repeatedly
instantiated in core transaction logic.
This is enforced via a new ErrorProne check, so the PR includes fixes
for all of the places this was a problem, not just the performance
impacting code.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Added changelog entries for PR:
- https://github.com/hyperledger/besu/pull/430
- https://github.com/hyperledger/besu/pull/440
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* For post EIP-1559 blocks we must disable GasLimitRangeAndDeltaValidationRule.
We must also update ProofOfWorkValidationRule to include base fee field in the hash computation.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* Rename logger
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* Rename logger
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* Fix base fee computation and add tests.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* Address PR comments
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
Add support for `berlinBlock` in genesis configs.
Until the final contents of Berlin are finalized this will be guarded by
a feature flag `--Xberlin-enabled`. Once Berlin is finalized and before
it is deployed on test nets the flag will be removed.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Added changelog entries for PR:
- https://github.com/hyperledger/besu/pull/430
- https://github.com/hyperledger/besu/pull/440
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* Prepare EIP-1559 genesis field.
The fork name is not known so for the moment we let eip1559 as a placeholder to update when the actual fork name is known.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
This PR introduces functionality to conform with ECIP-1061
https://ecips.ethereumclassic.org/ECIPs/ecip-1061
Signed-off-by: edwardmack <ed@edwardmack.com>
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Co-authored-by: Danno Ferrin <danno.ferrin@shemnon.com>
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>