garyschulte
a2f517ce32
consensus context changes in support of merge context ( #2976 )
...
Signed-off-by: garyschulte <garyschulte@gmail.com>
3 years ago
Lucas Saldanha
cb27f339bf
Improved QBFT logs ( #2996 )
...
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
3 years ago
Lucas Saldanha
ad67ad03cc
Improve ValidatorContractController result validation ( #2979 )
...
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
3 years ago
Simon Dudley
b0fc632a1b
Simplify clock in ValidatorContractTest ( #2924 )
...
* Simplify ValidatorContractTest by using TestClock instead of mocking
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
3 years ago
Jason Frame
0e0d67dbe5
Bft block period transition ( #2902 )
...
Allow block period to be configured using transitions for IBFT2 and QBFT
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
3 years ago
Simon Dudley
984cced655
Qbft RPCs should read validators from the contract when in contract mode ( #2881 )
...
Create readOnlyValidatorProvider in QbftBesuControllerBuilder and pass into QbftJsonRpcMethods constructor (better than using protocolContext as is only used once when creating the RPCs
This requires storing transactionValidatorProvider in a field and relying on its earlier creation during createConsensusContext()
Fixes #2795
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
3 years ago
Lucas Saldanha
6be1ed55d0
Added log for validator selection mode transition ( #2909 )
...
* Added log for validator selection mode transition
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
3 years ago
Jason Frame
91ef16d378
Qbft validator selection was incorrectly being applied to non validator selection mode transitions ( #2874 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
3 years ago
Simon Dudley
71e6b0ccf1
Fix for Select correct ValidatorProvider when transitioning from validator contract to block header mode ( #2869 )
...
During the transition from contract mode to block header mode, when creating the extra data for a new block, we need to look ahead to the next block's voteProvider to obtain the nonEmpty one associated with the BlockValidatorProvider.
This only applies to ForkingValidatorProvider which is currently only used for QBFT. However, we don't want QBFT to know it's using a ForkingValidatorProvider. Therefore we need to implement getVoteProviderAfterBlock on the ValidatorProvider interface even though it's implementation is equivalent to getVoteProvider.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
3 years ago
Jason Frame
3996da8108
Common Bft forks schedule ( #2862 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
3 years ago
Lucas Saldanha
bbff3c8b56
Added support for PKCS11 keystore on PKI Block Creation ( #2865 )
...
* Added support for PKCS11 keystore on PKI Block Creation
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
3 years ago
Antony Denyer
a30c314290
Allow Besu to host RPC endpoints via a plugin. ( #2754 )
...
This is a re-implementation of the initial POC done in https://github.com/PegaSysEng/pantheon/pull/1909/ by Danno Ferrin <danno.ferrin@gmail.com>
* Only enable plugin rpc api when enabled on --rpc-http-api or --rpc-ws-apis
* Only allow new rpc endpoints to be defined
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
3 years ago
Simon Dudley
fc687ab1a4
Qbft RPCs should be disabled after starting with or switching to use validator contract ( #2817 )
...
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
3 years ago
Usman Saleem
93013e9324
Add QBFT support for evmtool ( #2807 )
...
* qbft support in evmtool
Signed-off-by: Usman Saleem <usman@usmans.info>
3 years ago
Justin Florentine
db3a55997b
Jumpdest constructor inj ( #2821 )
...
Implements caching of JUMP destinations for a contract, fixes #2607
Signed-off-by: Justin Florentine <justin.florentine@consensys.net>
Co-authored-by: taccatisid <88524035+taccatisid@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Co-authored-by: Danno Ferrin <danno.ferrin@gmail.com>
3 years ago
Sally MacFarlane
84f58a9aa5
Rename: OnChain -> onchain ( #2806 )
...
* onChain -> onchain
* OnChain -> Onchain
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
3 years ago
Jason Frame
2541b155f8
Remove duplication between Qbft protocol schedule and Ibft protocol schedule ( #2751 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
3 years ago
Danno Ferrin
2abc7074bb
Create new datatypes module for Address, Hash, and Wei ( #2779 )
...
* Create new datatypes module
Create a new `datatypes` module to hold datatypes that are broadly used.
This will aid modularization by making sure the base types in the module
minimize the amount of unrelated support classes needed.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
* Add Address, Hash, and Wei to datatypes
Move the Address, Hash, and Wei to datatypes in as they are needed for
EVM modularization.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
3 years ago
Jason Frame
a2fd2147cd
Allow QBFT to switch from the existing block header validator selection mechanism to using a smart contract ( #2655 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
3 years ago
Jason Frame
19a54778d4
Move QBFT CMS creation to block creator ( #2720 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
3 years ago
Lucas Saldanha
021544403b
QBFT PKI-backed Block Creation ( #2677 )
...
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
Co-authored-by: Jason Frame <jasonwframe@gmail.com>
3 years ago
matkt
82aabdef81
Update pending transaction manager ( #2656 )
...
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
3 years ago
Lucas Saldanha
68f222be5c
Updated ATs DSL to create PKI QBFT node configuration ( #2670 )
...
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
3 years ago
Usman Saleem
4a22b41c2f
QBFT - Create extradata with round information only ( #2625 )
...
* Create extradata with round information only when using contract to obtain validators and vote
* Qbft header validation rule for extradata when validators are obtained from contract
Signed-off-by: Usman Saleem <usman@usmans.info>
3 years ago
garyschulte
632312bd3a
refactor of GasLimitCalculator into protocolSchedule ( #2632 )
...
Signed-off-by: garyschulte <garyschulte@gmail.com>
3 years ago
Lucas Saldanha
60397308a1
Refactor QbftExtraDataCodec from new instance to injection ( #2645 )
...
* Removed static codec on RoundChange
* Removed static codec on ProposalPayload
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
3 years ago
Lucas Saldanha
eff15cc768
Injecting BftExtraDataCodec into SubsequentMessageValidator ( #2640 )
...
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
3 years ago
Lucas Saldanha
047b680ddc
PKI Block Creation cli configuration ( #2619 )
...
* Added CLI options for PKI Block Creation
* BesuCommand changes for PKI Block Creation
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
3 years ago
Jason Frame
47a3941467
Qbft to use validator contract ( #2574 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
3 years ago
Lucas Saldanha
e19df06c92
PKI QbftContext and QbftBesuControllerBuilder update ( #2604 )
...
* Added PkiQbftContext
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
3 years ago
Lucas Saldanha
46df46cf90
Created PkiQbftExtraData ( #2580 )
...
* Added PKI extra data and codec
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
3 years ago
Jason Frame
63468d8a9d
BFT validator RPCs to use validator providers so that they will work with qbft voting changes ( #2592 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
3 years ago
Antoine Toulme
bc697e82cb
Add unstable CLI option for max ommers depth ( #2584 )
...
* Add unstable CLI option for max ommers depth
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
* Move to a builder pattern for mining parameters
Signed-off-by: Antoine Toulme <antoine@lunar-ocean.com>
3 years ago
Jason Frame
bdb9c1ad85
Bft validator provider ( #2570 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
3 years ago
Jason Frame
5ab214e894
Fix bft messages having duplicate prepares in roundChange message ( #2449 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
3 years ago
Jason Frame
c047d3c791
QBFT to use fixed IBFT mixhash value for headers ( #2379 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
4 years ago
Jason Frame
b55c6b8321
Fix Ibft and Qbft creating header with invalid timestamp ( #2265 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
4 years ago
Jason Frame
18fe0e473e
Qbft vote encoding to use empty for drop for extradata to match quorum ( #2232 )
...
Signed-off-by: Jason Frame <jasonwframe@gmail.com>
4 years ago
Jason Frame
8827603c77
Qbft to start round timer after block period expiry ( #2112 )
...
Signed-off-by: Jason Frame jasonwframe@gmail.com
4 years ago
Jason Frame
1c25b825b0
qbft to not include round number in proposal block ( #2141 )
...
Signed-off-by: Jason Frame jasonwframe@gmail.com
4 years ago
Usman Saleem
76a5887e00
Update qbft reference test submodule with SPDX header ( #2153 )
...
* Update qbft reference test submodule with SPDX header
* exclude submodule qbft reference-test docker_interop directory from spotless check
Signed-off-by: Usman Saleem <usman@usmans.info>
4 years ago
Jason Frame
bb1ad364a2
qbft roundchange metadata message encoding to match quorum ( #2144 )
...
Signed-off-by: Jason Frame jasonwframe@gmail.com
4 years ago
Jason Frame
36ef9e724e
Use istanbul 100 subprotocol in QBFT ( #2076 )
...
Signed-off-by: Jason Frame jasonwframe@gmail.com
4 years ago
Lucas Saldanha
3ce42a3731
Make BftBlockInterface#replaceRoundInBlock non-static ( #2067 )
...
* Make BftBlockInterface#replaceRoundInBlock non-static
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
4 years ago
Jason Frame
a030235e3a
Update qbft extra data encoding to match GoQuorum qbft encoding ( #2039 )
...
Signed-off-by: Jason Frame jasonwframe@gmail.com
4 years ago
Jason Frame
a627f9d9af
Allow use of custom BFT extra data encoding in common BFT code ( #1972 )
...
Signed-off-by: Jason Frame jasonwframe@gmail.com
Co-authored-by: Trent Mohay <trent.mohay@consensys.net>
4 years ago
Trent Mohay
ebefafe09f
Update Qbft payload signing to interop ( #2003 )
...
The Hash of a qbft payload is calculated by hashing the RLP'd bytes of the message-id, followed by the payload's encoded bytes.
RLP(msgCode, RLP(payload.encodedBytes()))
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
4 years ago
Trent Mohay
fd2d1d9c17
Use scalars for consensus round encoding ( #2002 )
...
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
4 years ago
Ratan (Rai) Sur
2e540e5241
Retrieve In-Memory Storage Segments Instead of Creating New Ones ( #1994 )
...
We were creating new in-memory storage segments each time we were
supposed to be retrieving it which prevented me from being able to test
what keys ended up being stored in that segment.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
4 years ago
Daniel Lehrner
8315ba6dc6
Replacing the static references of SECP256K1 by an interface ( #1933 )
...
* Replacing the static references of SECP256K1 by an interface
Signed-off-by: Daniel Lehrner <daniel@io.builders>
4 years ago