Clique Proposer Selection would choose an incorrect peer
when a signer was removed from the pool, as the algorithm worked
purely on the block count.
The algorithm has now been updated to ensure the next proposer is
incrementally the next signer in the ordered list, based on the
parent's proposer
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Upgrade dependency versions
* All version information is merged into one place
* Upgrade most version to their latest non-test version.
* dependencies are now sorted
Two dependencies were not upgraded:
errorprone - There are new checks that require build or source changes.
vertex - The license to eclipse 2.0 which is not in our current approved license list.
The change is trivial but for tracability it should be done alone.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
The ProposerSelection logic has been reworked such that it now accepts
a BlockInterface, through which IBFT parameters can be accessed
directly from the block header, without requiring literal hashing etc.
This has required the VoteBlockInterface to be renamed to
BlockInterface.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Clique was using integer arithmetic to calculate how much "wiggle"
delay should be added when the proposer is "out of turn".
This would mean when an odd number of validators was in use, the
max delay would be 250ms less than the expected value.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
IBFT requires various aspects of the mining infrastructure in order
to create a proposed block.
This includes specifically the BlockCreator and MiningCoordinating,
the mining executor is not required at this stage, nor is the miner.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Removing dependency upon using map.entry to define a vote that has
been proposed via JSON RPC.
This is part of the general clean up of the voting infrastructure
used for IBFT, Clique and legacy IBFT.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
The consensus-mechanism specific block values have been separated
from the VoteTallyUpdater such that there is a single updater rather
than one per consensus mechanism.
This has necessitated the creation of a custom serialiser/
deserialiser for each mechanism instead.
This change will ultimatley bleed through to the proposed votes and
their insertion to mined blocks.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Update value returned by web3_clientVersion to be ethstats friendly
* Version part starts with a v
* SNAPSHOT builds report 32 bits of the git hash
* OS and architecture are sniffed out and reported
* JVM version and branding are sniffed out and reported
Example values (not all real):
pantheon/v0.9.0-dev-f800a0b1/osx-x86_64/oracle-java-1.8
pantheon/v0.9.0-dev-27960b57/osx-x86_64/zulu-java-11
pantheon/v0.9.0/linux-arm64/openjdk-java-12
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Introduce ProtocolScheduleBuilder and use it for Clique, MainNet, IBFT and dev.
* Remove default milestone blocks and simplify MainnetProtocolSchedule. All milestone blocks must now be defined in the genesis file (previously ethash chains would get Mainnet milestone blocks by default).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Make GenesisConfigFile responsible for handling all the content in the genesis config file and rename GenesisConfig to GenesisState as it is now just responsible for creating the initial state at genesis.
* In CliqueProtocolController, pass the network ID to EthProtocolManager instead of the chain ID and use downloader parallelism setting instead of network ID for the number of threads.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Introduce classes to wrap JSON config instead of accessing it directly in multiple places.
* Fix discrepancy in how CliqueProtocolSchedule and CliquePantheonController loaded the block period configuration.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
We create our own instance of Clock. However the java.time.Clock
provides what is needed and already exists on the platform.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Introduce createInMemoryBlockchain test utility and use it everywhere appropriate.
* Inject BlockchainStorage into DefaultMutableBlockchain.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* [minor] distribution tweaks
* the 'pantheon:client' project is empty, and results in an empty jar, delete
* clique hard codes a version, delete so the parent takes effect
* clique does not describe it's jar, add description
* evmtools does not describe it's jar, add description.
results in
* clique-1.0.0-SNAPSHOT -> pantheon-clique-0.8.0-RC
* evmtools-0.8.0-SNAPSHOT -> pantheon-evmtools-0.8.0-RC
* client-0.8.0-SNAPSHOT -> *deleted*
* spotless formatting on the gradle file
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
The MiningCoordinator has been split into common, and ethhash
specific funcationality.
This adversely affects the JSON RPC, in that all mining related
RPCs are now generic based on the type of miner being used.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This commit adds the clique specific implementation of the Miner
executor.
It is responsible for starting a clique mining operation when
requested. It also supplies the functionality to blend vanity data
with validator data etc. in the extra data field.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Responsible for mining a block if the local node address
is a validator, and has not recently mined a block.
This has necessitated a slight rework of helper functions,
and shuffling of tests.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Clique Block Scheduler has been reworked to prevent high rate blocks
being created when the parent block's timestamp is behind the system
clock.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>