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>
RoundChangeValidator has been added which is responsible for
validating the content of a RoundChange message by using the
underlying MessageValidator capabilities.
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>
* Remove release/retain requirement from MessageData.
MessageData now wraps a BytesValue rather than a Netty ByteBuf so we no longer need to call release/retain and pass that through to the underlying ByteBuf.
Entirely removed support for a BytesValue wrapping a Netty ByteBuf as it does not provide any way to release the underlying ByteBuf.
* Add BytesValue.copyTo(byte[]) to avoid the need to call getArrayUnsafe() to copy the data.
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>
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>
The Ibft consensus mechanism is responsible for sending a variety of
messages to other validating nodes in the network (provided they have
a point-to-point connection to them).
This change tracks which nodes have connected to the IBFT
subprotocol, and provides the functionality to only transmit messages
to nodes which are also validators.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Upgrade ethereum reference tests
* Add support for sealEngine: NoProof by skipping PoW validation for ommer headers as well. Production code continues to always use full validation for ommers.
* Add Constantinople to reference test schedules ready for when we enable Constantinople tests.
* Blacklist the new reference tests that are failing while we investigate them.
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>