Received New Round messages require significant validation to ensure their content is consistent and valid with regard the current state of the system.
This commit includes a class (and tests) which ensures illegally constructed NewRound messages are identified.
This does not include the action to be taken upon detection of an illegal New Round message.
* basic updatdes
* spotless inter alia
* building successfully
* funtioning
* minor update to docs
* rebased in previous commit, attempt to pass build server
* eliminate distanceSortedPeers
* spotless update
* revamp outstanding requests
* implementation of timeoutTask and corresponding test
* use setPeriodic
* testing with DiscoveryPeer
* remove commenceTimeoutTask from constructor
* isolate clock functionality out of recursive state
* update to docs
* validate size of outstandingrequestlist
* improve sanity check test
* remove extraneous copy
* add accurate interface parameters
* finalize
* use Peer for enode not String
* moved NodeWhitelistController and PermissionConfig to p2p/permissioning
* reject messages if not from a whitelisted peer
* Time all tasks
This is fairly high touch consisting of 3 things:
* Moving to Prometheus's Summary for timers
* Timing at .2, .5, .8, .9, .99, and 1.0 (1.0 actually gets max I believe)
* Timing all abstract EthTasks
* The bulk of the changes: plumbing the timing context everywhere we need it
* NC-1880 High TX volume swamps block processing
Move transaction processing into its own thread(s).
Size of txWorkerExecutor thread pool can be independently configured.
* Plumb in three more metrics
* add blockchain_height gauge
* add blockchain_difficulty_total gauge
* add blockchain_announcedBlock_ingest histogram
This involved some deep pluming such that the metrics system needs to be
created in the PantheonCommand, along with trickle down effects into other
consensus engines. This is likely where it should live anyway.
* [MINOR] no fixed ports in tests
First enable "0" port in PeerDiscoveryAgent so it binds to
an open port. Then change the test to use two PeerDiscoveryAgents
The change to zero is accomplished by populating the endpoint with
the actual bound socket instead of the value passed in. If it is
zero the value will change otherwise it will be the value passed in.
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).
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.
* 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).
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.
* 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.
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
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
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.
* 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.
* 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).
* 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.
As recommended in #231 alter the API so that the
subclasses always return their list from executePeerTask in the
`CompletableFuture` and reset the retry in `#executeTask()` when any
non-empty list is returned.
* Fix corner case where Memory did not clear target destination if the new bytes to set was empty.
* Use BytesValue.EMPTY instead of Bytes32.EMPTY to make it clear that it's a 0 length BytesValues rather than 32 bytes of zeross.
* Treat outputLength for call operations as a maximum length - when the actual data to output is shorter than outputLength, do not zero out the tail end of the memory range.