* When in retesteth return the coinbase in the eth_getBlockByHash, as
required by the retesteth tool.
* use genesis extraData when mining
* storage keys should be 0x00 instead of 0x when zero.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Indicate that it is the node public key displayed in the log
feat: add `public` in key pair loading for clarity purpose
Signed-off-by: Alexandre PARIS-VERGNE <alexpv14@gmail.com>
* Compute transaction gas budget allocation according to EIP-1559 rules.
- Added `TransactionGasBudgetCalculator` with `hasBudget` method.
- Updated `AbstractBlockProcessor` to compute the gas budget using `TransactionGasBudgetCalculator`.
- Added unit tests in `TransactionGasBudgetCalculatorTest`.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* Fixed unit test.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
IbftRound has been updated to accept Signing errors (eg no signature supplier available) and
continue operating if possible.
This also catches failures in signing and ECDH Key agreement
creation during discovery and handshaking.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
- Updated BesuCommand class by removing deprecated usage of besu.docker system property.
- Removed StandaloneCommand and moved the options back into BesuCommand.
Signed-off-by: Usman Saleem <usman@usmans.info>
* Fix EIP-1559 block mining.
- Updated `AbstractBlockCreator` to set base fee to initial value if block is the fork block number.
- Updated `BlockHeaderBuilder` to populate base fee field.
- Updated `EthHash` to include base fee in hash computation if present in header.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* Set the gas block limit as a factor of the target gas usage instead of hard coded value.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
When updating an account we often calculate the address hash multiple
times. We also will always calculate it at least once when tracking an
accout update. Hence, just calculate it in the constructor and re-use
it.
Signed-off-by: Danno Ferrin <danno.ferrin@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>
* Capture test logs in CI
If test logs were saved, store them as CI artifacts
* Only keep logs for failed tests
* Catch tests who didn't define names into a generic filename
Signed-off-by: Horacio Mijail Anton Quiles <hmijail@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Handle legacy gas pool and EIP-1559 gas pool when mining blocks.
- Added `EIP1559` manager class in `ProtocolSpec` (defaulted to `Optional.empty()`).
- Updated `MainnetProtocolSpecs` EIP-1559 definition to set the `EIP1559` manager class.
- Updated `BlockTransactionSelector`
- Added `eip1559CumulativeGasUsed` field in `TransactionSelectionResults`.
- Updated `updateTransactionResultTracking` method to compute cumulative gas used according to `EIP-1559` rules.
- Updated `transactionTooLargeForBlock` method to compute gas remaining according to `EIP-1559` rules.
- Updated `blockOccupancyAboveThreshold` method to compute minimum block occupancy ratio according to `EIP-1559` rules.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
* Update versions of jackson and log4j (direct dependencies)
* Update versions of commons-codec and snakeyaml (indeirect deps)
* Remove version of commons-cli (unused)
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Native feature flags should have been hidden by default
* GraphQL option warnings keyed off of wrong enabled option.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
To support Ethereum Foundation Hive testing an option to ignore the
validity of the mixHash is needed in the block importer command. All
other validation for the blocks is still performed.
Example:
`besu blocks import --skip-pow-validation-enabled --from=<block-file>`
Fixes#803
Signed-off-by: Danno Ferrin danno.ferrin@gmail.com
* Update BlockTransactionSelector transaction gas price computation.
BlockTransactionSelector should compare transaction gas price to the min transaction gas price parameter according to EIP-1559 rules.
- Added `TransactionPriceCalculator` to `ProtocolSpec` (defaulted to `TransactionPriceCalculator.frontier()`.
- Created `minTransactionPriceInNextBlock` method in `BaseFee`.
- Removed useless constructor in `BaseFee`.
- Updated EIP-1559 protocol spec definition to set the correct transaction price calculator.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
Introduced Security Module Plugin API. This allows to switch to a different security module provider to provide cryptographic function that can be used by NodeKey (such as sign, ECDHKeyAgreement etc.). By default register KeyPairSecurityModule otherwise attempt to load Security Module via plugin API.
CLI Options:
--security-module=<name>. (defaults to localfile)
Signed-off-by: Usman Saleem <usman@usmans.info>
* BlockAdded and BlockReorg events listed
BlockAdded and BlockReorg events included in the JavaDoc list of currently supported events for BesuEvents
Signed-off-by: grantnoble <grant.noble@consensys.net>
* Updated based on feedback from @shemnon (Danno Ferrin)
Signed-off-by: grantnoble <grant.noble@consensys.net>
* edit
Signed-off-by: Madeline <madeline.murray@consensys.net>
* edit
Signed-off-by: Madeline <madeline.murray@consensys.net>
* updating plugin api checksum
Signed-off-by: Usman Saleem <usman@usmans.info>
Co-authored-by: MadelineMurray <43356962+MadelineMurray@users.noreply.github.com>
Co-authored-by: Madeline <madeline.murray@consensys.net>
Co-authored-by: Usman Saleem <usman@usmans.info>
@pinges correctly pointed out that, even though we have access to all the logs in the BlockAddedEvent, we still use BlockchainQueries to add the new logs from the event. Now we do the sane thing.
Unfortunately, it doesn't seem as easy with private logs so we still have to use privacyQueries as far as I can tell.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Enable native encryption by default, but retain the feature flags. The problem with acceptance tests is that the new native libraries added some startup overhead, which when translated to starting up 12 nodes on the same vm resulted in longer time getting to a testable state. Start up timeout was increased to 60 seconds.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>