* add unit test for JWTAuthOptionsFactory
Signed-off-by: Frank Li <b439988l@gmail.com>
* additional test for invalid algo
Signed-off-by: Frank Li <b439988l@gmail.com>
* WIP || Think about how to handle the invalid algorithm exception
Signed-off-by: Frank Li <b439988l@gmail.com>
* WIP || Handle exception at BesuCommand level, remove test
Signed-off-by: Frank Li <b439988l@gmail.com>
* WIP || Acceptance Tests
Signed-off-by: Frank Li <b439988l@gmail.com>
* WIP || Fix obvios test run errors
Signed-off-by: Frank Li <b439988l@gmail.com>
* WIP || Break long line of string
Signed-off-by: Frank Li <b439988l@gmail.com>
* Acceptance tests working
Signed-off-by: Frank Li <b439988l@gmail.com>
* remove accidentally committed file
Signed-off-by: Frank Li <b439988l@gmail.com>
* fix failing tests
Signed-off-by: Frank Li <b439988l@gmail.com>
* changelog entry
Signed-off-by: Frank Li <b439988l@gmail.com>
* fixes based on CR
Signed-off-by: Frank Li <b439988l@gmail.com>
* add missed acceptance test stuff
Signed-off-by: Frank Li <b439988l@gmail.com>
* use enum for CLI arg
Signed-off-by: Frank Li <b439988l@gmail.com>
* two seperate CLI args for ws and http
Signed-off-by: Frank Li <b439988l@gmail.com>
* add file header
Signed-off-by: Frank Li <b439988l@gmail.com>
* use JwtAlgorithm class + fix broken unit test
Signed-off-by: Frank Li <b439988l@gmail.com>
* add fromString
Signed-off-by: Frank Li <b439988l@gmail.com>
* experimental flag || changelog update || CLI option dependency
Signed-off-by: Frank Li <b439988l@gmail.com>
* hide exprimental options
Signed-off-by: Frank Li <b439988l@gmail.com>
* remove experimental flag
Signed-off-by: Frank Li <b439988l@gmail.com>
* change experimental options in toml
Signed-off-by: Frank Li <b439988l@gmail.com>
* add behavior to not drop peers on failed lookup, add test coverage
* add dns discovery server override cli flag
Signed-off-by: garyschulte <garyschulte@gmail.com>
* catch exception
Signed-off-by: Frank Li <b439988l@gmail.com>
* use full error message
Signed-off-by: Frank Li <b439988l@gmail.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* Minimal cleanup: deleting rendundant code from ForkingValidatorProvider and associated tests
TODO refactor
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Refactor: Remove now redundant lambdas and helper method in ForkingValidatorProvider
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* Refactor: Inline variables
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Require validator overrides for blockheader selection mode transitions
A runtime is thrown at startup if this requirement is not met.
Improve ValidatorContractTest: mine an extra block when ending transitions in blockheader mode, such that the test would fail if there were no validator overrides.
First commit for https://github.com/hyperledger/besu/issues/3038
A future commit will cleanup some associated redundant code.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Jacoco failed to instrument some tests using the old version of the tool
when build under jdk17
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* add download link for 21.10.1
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* corrected link and hash
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
We are creating but not starting the dns discovery daemon. After this modification the node find peers instantly
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>
* Remove benchmark from workflow (#2827)
Remove benchmark from workflow
Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Min Song <minsong@splunk.com>
* Added subcommand for validate-config
Signed-off-by: Min Song <ms2597@cornell.edu>
Signed-off-by: Min Song <minsong@splunk.com>
* formatting
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* use the main TomlConfigFile provider
* inject commandLine
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Co-authored-by: Antony Denyer <git@antonydenyer.co.uk>
Co-authored-by: Min Song <minsong@splunk.com>
Co-authored-by: Min Song <ms2597@cornell.edu>
The NodeKeyTest might fail in case the SignatureAlgorithmFactory has an
instance already set from some previous test.
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Next version of the dependency after 0.5.0 was 21.10.0 as can be seen on
the release page: https://github.com/ConsenSys/discovery/releases
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
* 21.10.2-SNAPSHOT
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
* moved things to next release
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
* Only add --bootnodes if there are some nodes set (#1632)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Allow to configure P2P port (#1632)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
* Add discovery options to genesis file (#1632)
Signed-off-by: Diego López León <dieguitoll@gmail.com>
When producing the next block, the previousBlockHeader.number + 1 needs to be used to query the transition forkSchedule.
This is because the list of validators associated with each forkSchedule may be a different set to the current block.
This commit changes the implementation for getValidatorsAfterBlock to support this and points getValidatorsAtHead at this implementation.
Note getValidatorsForBlock's forkSchedule query is unchanged since we have already mined the block at the point this is called (e.g. for RPCs qbft_getValidatorsBy...).
For TransactionValidatorProvider, we need to use the next block's contract address but still use the previous block's validators in the contract call itself.
Querying validators using afterBlock vs forBlock may yield different (blockNumber -> validatorAddresses) combinations when transitioning into CONTRACT mode.
There we also split TransactionValidatorProvider validatorCache into two caches.
Add special case to ForkingValidatorProvider (BlockValidatorProvider.hasValidatorOverridesForBlockNumber) to support transitioning to blockheader mode with some validator overrides. This might be needed if the current validator set loses quorum and we
are no longer able to vote new ones in.
New integration test cases for validatorselectionmode transitions:
- contract -> contract
- contract1 -> blockheader -> contract2
- contract1 -> blockheader with overridden validators -> contract2
Fixes https://github.com/hyperledger/besu/issues/2901
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
* When tls is on, use passthrough framer and passthrough handshaker to avoid double encryption
Signed-off-by: Saravana Perumal Shanmugam <perusworld@linux.com>
* adds a new docker build focusing on providing tools for debugging
* updates the latest build to only include a jvm, not a full jdk as shipped for Java 17
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* 2705 - logging unused request fields during serialization for JsonCallParameter class
- used the @JsonAnySetter marker annotation to catch unused request fields and log their values and class type
Signed-off-by: SivaTharun <kolasivatharun@gmail.com>
* 2705 - addressing review comments
Signed-off-by: SivaTharun <kolasivatharun@gmail.com>
* final on params
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Co-authored-by: SivaTharun <kolasivatharun@gmail.com>
Co-authored-by: Siva Tharun Kola <SivaTharun@users.noreply.github.com>
* [2950] Support websocket binary frames
Signed-off-by: Frank Li <b439988l@gmail.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
* catch exception and shorten warning log
Signed-off-by: Frank Li <b439988l@gmail.com>
Co-authored-by: Frank Li <frank@Franks-MacBook-Pro.local>
Co-authored-by: matkt <karim.t2am@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Diego López León <dieguitoll@gmail.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>