All received QBFT messages are now validated with respect to protocol safety prior to be accepted to QBFT business logic.
This includes updates to the QBFT integration test framework.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
* 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>
intermediate values of the base fee can be higher than maximum value encoded by a long. Now using BigInteger to compute intermediate fee delta.
Signed-off-by: Abdelhamid Bakhta <abdelhamid.bakhta@consensys.net>
This supplies the necessary validation logic for parsing received RoundChange messages.
This logic is wired into the QBFT business logic.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
The code required to deserialise signed payloads for QBFT is verbose and can be reduced by templating.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
Creates the validator for qbft commit messages, but does not wire it into business logic at this stage.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
Adds the Prepare validator, but does not wire it into the QBFT message validation at this stage.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
Two updates to Bonsai Tries
* Log Rolling is implemented on top of the existing Persisted head. When
Besu is at chain head and the new best head makes the current head an
orphan branch, the Bonsai TrieLogs are used to roll back to a common
block and roll forward to the needed base block. Goerli is known to
maintain sync. There are still some issues with frontier era block
receipts.
* Non-mutable reads can be done off of the persisted block. These are
accurate for all reads that were performed in the block. If a read is
not known it proceeds through a fallback series of calls to prior
layers until it hits the persisted block. These layered reads are
driven off of the TrieLogs.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Move the messageFactory out of IbftFinalState such that the IbftFinalState can be reused between IBFT and QBFT.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
Exceptions encountered during the import of blocks is suppressed and the
importer can hang. Normally not a problem with perfect blocks but when
testing broken chains its a hinderance.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Two refactorings to make the next Bonsai PR less noisy.
Prefer WorldState when we used to ask for MutableWorldState.
Persist takes an optional block header instead of a block hash.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
The Acceptance Test harness occasionally misses the last line of the
help text (not sure if it's a linux, java, or harness issue, or all
three).
Accept two possible variants for trailer text.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
This adds the proposal and roundchange messages required for QBFT.
This does not wire in the ability to transmit/receive these messages, it just defines the message structure.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
Bonsai tries will require storing state by block hash rather than by
state root. To accommodate both forest mode and bonsai mode all state
queries will pass in both the block hash and state root. This also
permits parallel forest/bonsai modes for private state with bonsai
public state.
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>
This adds the Prepare and Commit messages used in the QBFT protocol, this is an incremental movement toward QBFT - and does not offer new functionality.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
When validating a RoundChange message, its important that not only
are there sufficient Prepare msgs in the PreparedCertificate, but
also that each are from a different validator (i.e. cannot simply
count the number msgs, but must count distinct authors).
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
The tests were brittle when I started to change BlockDataGenerator to
randomly generate transactions of different types. This makes sure that
we're always under the limit so we can test it more resiliently.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Remove all but 4 log4j2.xml config files
* The main config for the besu CLI app
* The config for the evmTool CLI app
* The config for acceptance tests
* A config in testUtil
If any tests depend on a log4j file they should import testutil.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Now able to inject static nodes by explicitly specifying
a static nodes JSON file (.json) on the command line
Co-authored-by: Ratan (Rai) Sur <ratan.r.sur@gmail.com>
Signed-off-by: Terrence Cooke <terrence.s.cooke@gmail.com>
* Add tracing support for internals and JSON-RPC
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Remove rocksdb tracing as it slows down execution too much
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add B3 headers extraction on JSON-RPC requests
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Remove traces around trie tree as they slow down syncing significantly
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add tracing to fast sync pipeline
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add tracing for all pipelines
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Address code review
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Add acceptance tests and break out the shaded dependency
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Fix tracer id
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Revert changes to trie
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Upgrade otel to latest, remove old tracing
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Code review comments
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* #1695 - Added support for EIP-868
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Fix broken test
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1695 - Added tests for new functionality
Signed-off-by: David Mechler <david.mechler@consensys.net>
* #1695 - spotlessApply
Signed-off-by: David Mechler <david.mechler@consensys.net>
* Update changelog
Signed-off-by: David Mechler <david.mechler@consensys.net>