* Removing code identified by the 'unused declaration' analysis in IntelliJ
* Undoing removal of injectNewRound as that's actually used
* Removing wrapper class from Clique UT
* Spotless
* Adding back code
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
A problem was identified whereby the vote in a child block was applied to the parent, this was resolved by
duplicating the parent VoteTally before modifying it, and injecting to the child block.
Some refactoring was also conducted to make VoteTally logic simpler.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Reverts #339
Görli's testnet regularly has proposers miss their turn and their
genesis block actually had a bad validator specified (that was voted out
as soon as they could) So many blocks do not have the proper "proposer"
as their block generator. As a consequence the
CliqueDifficultyValidationRule fails regularly, in fact it fails at
block 3, so this should be easy to re-create locally.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
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>
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>