* Add new config option to use bootnodes during any peer table refresh, not just the first one
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Update everything-config list
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Revert debug setting
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Update ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/internal/PeerDiscoveryController.java
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Signed-off-by: Matt Whitehead <matthew1001@hotmail.com>
---------
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Matt Whitehead <matthew1001@hotmail.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
* Update parameterized unit tests so the enumerate with --dry-run
* Update the prague-withdrawal.json unit test to handle current code
Signed-off-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* EthPeer add isServingSnap to be able to make sure that we have enough snap servers connected when we are snap syncing
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Fix some reasons for chain download halts when syncing
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
- Node discovery via DNS module as a vertex verticle (code adapted from Tuweni)
- Mock DNS server in unit tests.
---------
Signed-off-by: Usman Saleem <usman@usmans.info>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Find and remove peers from the peer table that share the same IP and TCP port with different discovery ports
---------
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Upgrade spotless to 1.22.0 and reformat.
This is required for Java21 support.
Signed-off-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Danno Ferrin <danno@numisight.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Move Besu custom error-prone checks into its own repository and use it as an external dependency. This allows to move to a newer version of Google errorprone checks as well while cleaning up build.gradle file.
Key changes resulted due to this change:
* String toLowerCase and toUpperCase to use Locale.ROOT as argument
* Use interface such as List,Map or NavigatableMap instead of concrete class where appropriate.
* Simplify StringBuilder to plain String
* Suppress warnings where appropriate.
-----
Signed-off-by: Usman Saleem <usman@usmans.info>
* Remove uses of org.jetbrains annotations
We have a mix of org.jetbrains.annotations.NotNull and
javax.annotations.Nonnull. Change all to the latter. Add an errorprone
check to enforce this.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* spotless
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* spdx
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
---------
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
* When refreshing, only disconnect a peer if we have max peers
* If we are disconnecting a peer, disconnect the least useful peer
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Signed-off-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
* use existing NetworkUtility for PeerDiscoveryAgent pingpacket data filtering, add ipv6 check/fallback
* log at debug when we override pingpacket from
* use java native address parsing rather than lookup by host
Signed-off-by: garyschulte <garyschulte@gmail.com>
* add a method for the loggable id to standardise the length
* use same length as peer id for short enode method
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
* make the request for the ENR the default and try to recover the DiscoveryPeer for incoming connections from the PeerTable
Signed-off-by: Stefan <stefan.pingel@consensys.net>
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
* Use P2P 'from' host when parsing incoming P2P packets, if it is present
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Use UDP source address if PING 'from' address is 127.0.0.1 and add a unit test.
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Spotless Java, address PR comment
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Refactor handleIncomingPacket to allow for specific trace logs to show how selection is being done
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Add change log entry
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* Refactor handleIncomingPacket
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
---------
Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
* add check for static peers to allow them to exceed the connection limit
* change logging disonnetction in EthPeers
* returning best peers only returns fully validated peers
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
* modifications to log messages for simplification
* for debug logs, only use the short ID not the full peer
* log timeouts and useless counts
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
---------
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
* Implements EIP-4844.
* introduces a Hardfork class to the protocol schedule system
* new Engine APIs required for CL to work on 4844
* new DataGas type for tracking block cost for 4844 data
* new VersionedHash type to reflect that a versioned hash is not quite a pure sha256
* incorporates wrapped jc-kzg library for KZG point evaluations
* New transaction type, and domain objects for constituent parts to represent the Blobs, KZGCommitments, and Proofs used for 4844
* RLP encoders and decoders to support new transaction type
* gas pricing calculators for the new type of gas
* plugin-api version was changed
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Stefan <stefan.pingel@consensys.net>
Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk>
* junit5 updates
Signed-off-by: Justin Florentine <justin+github@florentine.us>
* update t8n test
Cancun gas claculator was inheriting from london, should have been shanghai.
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
---------
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com>
Co-authored-by: Jason Frame <jason.frame@consensys.net>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Co-authored-by: Stefan <stefan.pingel@consensys.net>
Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk>
Co-authored-by: Danno Ferrin <danno.ferrin@swirldslabs.com>