* Refactoring for more readable IBFT IT
* Renaming Roles to peers
* Moving the assert behaviour into the RoundChangePeers
* Renmaing prefix of assert to verify, grammar
* Reducing usage of getAllPeers()
* Dropping the getter for the peer list
* Dropping peer from method names, as it's now in the class name
* Spotless
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
fixes NC-2104 remove Clique and iBFT defaults and centralise default values
As toString() is used to display default values in CLI description and this is
not used anywhere else for RpcApi objects, it may have been used for debug long
ago, but now we can use the simple string value as return from toString.
Then we are able to use the DEFAULT_JSON_RPC_APIS constant as default value
directly instead of hard coded defaults string in option that was probably used
because previous toString was not outputting correct representation. It may be
interesting to comment when some does this sort of hack.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Makes Synchronizer responsible for deciding if it has enough peers or not rather than ProtocolManager.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Add Privacy Cli options
* Wire up Precompiled contract configuration to Protocol Spec
* Rename createDefault to noPrivacy to indicate the defaults.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Add support for initiating fast sync to DefaultSynchronizer, starting full sync once that completes.
* Wait for a minimum number of peers to be available before starting fast sync.
* Select pivot block.
* Fetch the pivot block header.
* Ensure that a majority of peers (which have the pivot block) agree on the block.
* Pull isRetryingError and assignPeer up to AbstractRetryingPeerTask so it can be reused.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* fixes#522 remove mention of gas setting from eth_estimateGas
* fixes#522 clarify that gasLimit is irrelevant to estimation
* fixes#522 clarifications on estimation process
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Sometimes metrics are hard to poll (docker containers with varying ip
addresses). Because of that the push gateway exists. This extends the
metrics system to support push or pull mode for metrics (but not both
at the same time).
Three new flags
`--metrics-mode=`<`push`|`pull`> - Whether we are in pull mode (the default) where
prometheus is expected to poll or push mode where pantheon pushes to
a push gateway.
`--metrics-push-interval=`<_integer_> the frequency, in seconds, between pushes to
the push gateway. Only relevant in push mode
`--metrics-prometheus-job=`<_string_> The name of the job to report in the push gateway
Also, `--metrics-host=` and `--metrics-port=` gain new meaning in push mode. Instead of the
server they are opening up it is the host and the port of the push gateway it should push to.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* added test and DSL for node with --no-discovery
* reversed boolean for discovery
* changed to Boolean and arity = 1
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Add Orion module
* Add integration tests
* Use ephemeral instance of Orion for integration test
- Start orion on random port
- test payloads can be send and received
* update build image
* Use snapshot build of orion
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Nodes which are not validators in a network should not inject
IBFT messages to the consensus round, and should not gossip
received messages.
I.e. all events should ensure that they are only handled if
the node is a validator at the current height.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Ibft will no longer buffer round change messages for prior rounds.
While the messages buffered where discarded on round change, they
should not be buffered.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
new JSON rpc call admin_addPeer that lists a peer as a node we should always be connected to
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This commit adds additional tests which fall outside of the existing
suite, and target spuriously behaved peers - i.e. illegal seals,
illformed RLP data etc.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Removing quickstart folder and CI pipeline and parallel test in pipeline as there's only one test now
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This allows individual items of the test framework to be replaced
during the test construction (i.e. eventqueue, clock, validator count).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This adds tests to ensure the IBFT capability handles the chain updating
"under" the state machine.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
The ibftGetValidatorsByBlockNumber and ibftGetValidatorsByBlockHash
both returned a list of Addresses, whichi when translated back into
JSON RPC responses, results in an incorrect 'shape'.
These RPC calls should (and now do) return a list of strings.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>