Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for snap server #6609

Merged
merged 50 commits into from
Jul 3, 2024
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
81840ff
commit building version
pinges Feb 13, 2024
40d9ea1
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
pinges Feb 13, 2024
7f2fd43
EthPeer add isServingSnap to be able to make sure that we have enough…
pinges Feb 23, 2024
dcbb895
add real check for snap server using a snap task
pinges Feb 26, 2024
5449acc
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
pinges Feb 27, 2024
d3455c9
some cleanup
pinges Feb 29, 2024
f2d7beb
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
pinges Feb 29, 2024
01f9101
add log for snap server check
pinges Feb 29, 2024
5d7f1f1
change the way we handle the max incoming connections
pinges Mar 1, 2024
80534d3
fix unit tests
pinges Mar 5, 2024
edbc9d4
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
pinges Mar 5, 2024
734bb89
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
pinges Mar 6, 2024
ea43fd0
fix acceptance test
pinges Mar 7, 2024
d6a2999
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
pinges Mar 7, 2024
98fbcce
merge main
pinges Mar 26, 2024
fbe6b52
Merge branch 'main' into CheckForSnapServer
macfarla Apr 3, 2024
446ef1b
merge
macfarla Apr 3, 2024
4203a55
merge
macfarla Apr 11, 2024
61d7265
merge
macfarla Apr 12, 2024
de6899f
extra logging from #6924
macfarla Apr 12, 2024
272c1bb
formatting
macfarla Apr 12, 2024
ae030e7
delete version metadata
macfarla Apr 12, 2024
68934cc
reuse ethPeers
macfarla Apr 12, 2024
a95e4f4
make a switching peer task
macfarla Apr 12, 2024
13fb105
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
macfarla Apr 12, 2024
83ef98f
add client info to disconnect message
macfarla Apr 15, 2024
5af6bbb
check for non-deprecated sync modes
macfarla Apr 15, 2024
9bed81f
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
macfarla Apr 15, 2024
4f4e847
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
macfarla Apr 15, 2024
87690b9
logging
macfarla Apr 15, 2024
c3c5bb3
formatting
macfarla Apr 15, 2024
5d57f1d
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
macfarla Apr 15, 2024
14528e8
merge
pinges Jun 13, 2024
b148347
fix after merge
pinges Jun 13, 2024
12c8350
stop prefering snap servers after sync
pinges Jun 18, 2024
1354979
fix compile
pinges Jun 18, 2024
048765f
add tests and some clean-up
pinges Jun 20, 2024
de7d55b
make constant
pinges Jun 20, 2024
a3e17d1
merge and fix conflicts
pinges Jun 20, 2024
0099f11
add newline
pinges Jun 20, 2024
f1f2073
spotless
pinges Jun 20, 2024
13807b1
fix tests, fix trailing peers, and clean up
pinges Jun 25, 2024
9bf96ff
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
pinges Jun 25, 2024
ab4e7d6
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
pinges Jun 26, 2024
6e98ee9
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
pinges Jun 27, 2024
626af31
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
pinges Jun 27, 2024
1a2b324
Merge branch 'main' into CheckForSnapServer
pinges Jul 1, 2024
2a84c29
review change
pinges Jul 3, 2024
dd0b697
Merge branch 'main' of github.com:hyperledger/besu into CheckForSnapS…
pinges Jul 3, 2024
f4d90f0
Merge branch 'CheckForSnapServer' of github.com:pinges/besu into Chec…
pinges Jul 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make constant
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
  • Loading branch information
pinges committed Jun 20, 2024
commit de7d55b7a5d102faf9988ee0c4697e9b0439a8d1
Original file line number Diff line number Diff line change
@@ -41,6 +41,8 @@

public class SyncTargetManager extends AbstractSyncTargetManager {
private static final Logger LOG = LoggerFactory.getLogger(SyncTargetManager.class);
private static final int LOG_DEBUG_REPEAT_DELAY = 15;
private static final int LOG_INFO_REPEAT_DELAY = 120;

private final WorldStateStorageCoordinator worldStateStorageCoordinator;
private final ProtocolSchedule protocolSchedule;
@@ -50,8 +52,6 @@ public class SyncTargetManager extends AbstractSyncTargetManager {
private final FastSyncState fastSyncState;
private final AtomicBoolean logDebug = new AtomicBoolean(true);
private final AtomicBoolean logInfo = new AtomicBoolean(true);
private final int logDebugRepeatDelay = 15;
private final int logInfoRepeatDelay = 120;

public SyncTargetManager(
final SynchronizerConfiguration config,
@@ -82,14 +82,14 @@ protected CompletableFuture<Optional<EthPeer>> selectBestAvailableSyncTarget() {
"Unable to find sync target. Currently checking %d peers for usefulness. Pivot block: %d",
ethContext.getEthPeers().peerCount(), pivotBlockHeader.getNumber()),
logDebug,
logDebugRepeatDelay);
LOG_DEBUG_REPEAT_DELAY);
throttledLog(
LOG::info,
String.format(
"Unable to find sync target. Currently checking %d peers for usefulness.",
ethContext.getEthPeers().peerCount()),
logInfo,
logInfoRepeatDelay);
LOG_INFO_REPEAT_DELAY);
return completedFuture(Optional.empty());
} else {
final EthPeer bestPeer = maybeBestPeer.get();