From 723a28c85ba25e15c2af2e710aea62b1666ea8fb Mon Sep 17 00:00:00 2001 From: Matthew Whitehead Date: Mon, 22 Jul 2024 14:20:27 +0100 Subject: [PATCH 1/2] Do not maintain connections to bootnodes Signed-off-by: Matthew Whitehead --- CHANGELOG.md | 1 + .../java/org/hyperledger/besu/RunnerBuilder.java | 15 +-------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c6cb373ba8..816c64498b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Breaking Changes - Remove deprecated sync modes (X_SNAP and X_CHECKPOINT). Use SNAP and CHECKPOINT instead [#7309](https://github.com/hyperledger/besu/pull/7309) - Remove PKI-backed QBFT (deprecated in 24.5.1) Other forms of QBFT remain unchanged. [#7293](https://github.com/hyperledger/besu/pull/7293) +- Do not maintain connections to PoA bootnodes. Retry them when refreshing the peer table [#7358](https://github.com/hyperledger/besu/pull/7358) ### Additions and Improvements - `--Xsnapsync-bft-enabled` option enables experimental support for snap sync with IBFT/QBFT permissioned Bonsai-DB chains [#7140](https://github.com/hyperledger/besu/pull/7140) diff --git a/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java b/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java index 7ed627cfc17..d62843049e5 100644 --- a/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java +++ b/besu/src/main/java/org/hyperledger/besu/RunnerBuilder.java @@ -792,20 +792,7 @@ public Runner build() { LOG.debug("added ethash observer: {}", stratumServer.get()); } - final Stream maintainedPeers; - if (besuController.getGenesisConfigOptions().isPoa()) { - // In a permissioned chain Besu should maintain connections to both static nodes and - // bootnodes, which includes retries periodically - maintainedPeers = - sanitizePeers( - network, - Stream.concat(staticNodes.stream(), bootnodes.stream()).collect(Collectors.toList())); - LOG.debug("Added bootnodes to the maintained peer list"); - } else { - // In a public chain only maintain connections to static nodes - maintainedPeers = sanitizePeers(network, staticNodes); - } - maintainedPeers + sanitizePeers(network, staticNodes) .map(DefaultPeer::fromEnodeURL) .forEach(peerNetwork::addMaintainedConnectionPeer); From 0f94ba2bb65be930c96d3d4b59aa772ca331e9b4 Mon Sep 17 00:00:00 2001 From: Matthew Whitehead Date: Mon, 22 Jul 2024 14:23:24 +0100 Subject: [PATCH 2/2] Update changelog entry Signed-off-by: Matthew Whitehead --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 816c64498b0..f9c2ec6065f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ ### Breaking Changes - Remove deprecated sync modes (X_SNAP and X_CHECKPOINT). Use SNAP and CHECKPOINT instead [#7309](https://github.com/hyperledger/besu/pull/7309) - Remove PKI-backed QBFT (deprecated in 24.5.1) Other forms of QBFT remain unchanged. [#7293](https://github.com/hyperledger/besu/pull/7293) -- Do not maintain connections to PoA bootnodes. Retry them when refreshing the peer table [#7358](https://github.com/hyperledger/besu/pull/7358) +- Do not maintain connections to PoA bootnodes [#7358](https://github.com/hyperledger/besu/pull/7358). See [#7314](https://github.com/hyperledger/besu/pull/7314) for recommended alternative behaviour. ### Additions and Improvements - `--Xsnapsync-bft-enabled` option enables experimental support for snap sync with IBFT/QBFT permissioned Bonsai-DB chains [#7140](https://github.com/hyperledger/besu/pull/7140)