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>
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>
fixes#233 Allow nodekey to be specified separately to --datadir
Add a `--node-private-key <FILE>` option on CLI to enable the use of a custom key file.
if not set, uses the default "key" file in the data dir
if set but doesn't exist, creates a new key file
if set and exists, uses the specified key file
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Replace the JNI based snappy library with an all Java version.
This will help work on #251 because the error messages are more reasonable
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
Add tests that hit the retry failure case
Move "complete what we just got" semantic into the
DownloadHeaderSequenceTask. Previously it was completing everything
in the chunk it was assigned.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
* Ban Peers via CLI
As part of working on #251 I needed to be able to ban certain nodes from my
connection pool and let others connect. This is a general solution to add
a --banned-nodeids CLI flag where the nodeIds of banned nodes are listed.
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>
Gradle 4.10.2 issues deprecation warnings. Based on the Gradle
documentation, enable the STABLE_PUBLISHING feature preview to
fix this. This is essentially a no-op as no Maven publications
are published.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>