Metrics being captured initially:
Total number of peers ever connected to
Total number of peers disconnected, by disconnect reason and whether the disconnect was initiated locally or remotely.
Current number of peers
Timing for processing JSON-RPC requests, broken down by method name.
Generic JVM and process metrics (memory used, heap size, thread count, time spent in GC, file descriptors opened, CPU time etc).
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>
* Refactoring and removing the duplicate call to web3j
* Single shared variable for the private key for the first genesis account
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>
With the advent of "IBFT 2.0" the config file parsing needed to be
updated such that both the original IBFT, and the new variant can be
uniquely identified at execution time.
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>
Avoids throwing java.util.concurrent.ExecutionException when handling other framing errors in DeFramer.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Add the ipV6 flag to the datagram socket options, this creates a socket that handles both
ipv4 and ipv6 socket connections.
* Set the IPv6 flag state based on the presence or absence of an IPv6 address.
i.e. if your machine runs IPv6 it will accept IPv6 bootnodes and peers. However link-local IPv6 is not fully supported (see issue #288).
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>
* EthGetTransactionReceipt Acceptance test added
* GetTransactionReceipt Acceptance Test updated to conform to new dsl
* Update to new dsl
* Update to new dsl
* Update to new dsl - spotless applied
* Naming convention corrected
* Naming convention corrected
Deleted obsolete test cases
added assertion for status code
* Naming convention corrected
Deleted obsolete test cases
added assertion for status code
* Naming convention corrected
* Removed sender field to make test more efficient
* Removed sender field to make test more efficient
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* IoC for deploying the smart contract
* Smart contract deploy as a Transaction
* Consistent transaction naming
* Avoiding a resource leak with lazy creation of Web3j connections
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Allow IPv6 bootnodes to be specified by translating to address only form when
parsing a URI.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Throw FramingException when snappy decompression fails.
* Handle FramingException in DeFramer as a routine event representing a malformed message.
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>
Some more logging level downgrades.
* At steady state we should get only one info level log per new block
* We don't need to know about peer stuff at info
* Caught up to best peer fires for every block
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>