From be756454a4a907d3bb05f65208561775e809a5ed Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Tue, 29 Jun 2021 15:53:36 +0200 Subject: [PATCH 1/4] flush stdout logs (#2669) else pipes end up not getting log output until much later --- beacon_chain/nimbus_binary_common.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/beacon_chain/nimbus_binary_common.nim b/beacon_chain/nimbus_binary_common.nim index 7a6378f7f..0ce0cad41 100644 --- a/beacon_chain/nimbus_binary_common.nim +++ b/beacon_chain/nimbus_binary_common.nim @@ -31,6 +31,7 @@ proc setupStdoutLogging*(logLevel: string) = proc (logLevel: LogLevel, msg: LogOutputStr) {.gcsafe, raises: [Defect].} = try: stdout.write(msg) + stdout.flushFile() except IOError as err: logLoggingFailure(cstring(msg), err) From bd684d0eeae5e2893e7213b4ad2c0376c9f1e5dc Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Tue, 6 Jul 2021 15:11:18 +0200 Subject: [PATCH 2/4] increase block attestation wait time (#2705) We generally send out attestations 250 ms after the block arrives. Recent efficiency improvements have led to a slightly increased incidence of "slot 0" issues where attestations are dropped by other nodes because they have not yet had time to process the block due to epoch processing taking time. This PR mitigates the problem by increasing the window between receiving the block and sending out attestations. --- beacon_chain/validators/validator_duties.nim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/beacon_chain/validators/validator_duties.nim b/beacon_chain/validators/validator_duties.nim index b4caacc88..6d0804ffe 100644 --- a/beacon_chain/validators/validator_duties.nim +++ b/beacon_chain/validators/validator_duties.nim @@ -688,14 +688,18 @@ proc handleValidatorDuties*(node: BeaconNode, lastSlot, slot: Slot) {.async.} = # An opposite case is that we received (or produced) a block that has # not yet reached our neighbours. To protect against our attestations # being dropped (because the others have not yet seen the block), we'll - # impose a minimum delay of 250ms. The delay is enforced only when we're + # impose a minimum delay of 1000ms. The delay is enforced only when we're # not hitting the "normal" cutoff time for sending out attestations. + # An earlier delay of 250ms has proven to be not enough, increasing the + # risk of losing attestations. + # Regardless, because we "just" received the block, we'll impose the + # delay. - const afterBlockDelay = 250 + const afterBlockDelay = 1000 let afterBlockTime = node.beaconClock.now() + millis(afterBlockDelay) afterBlockCutoff = node.beaconClock.fromNow( - min(afterBlockTime, attestationCutoffTime)) + min(afterBlockTime, attestationCutoffTime + millis(afterBlockDelay))) if afterBlockCutoff.inFuture: debug "Got block, waiting to send attestations", From bbced08f6362d9d212eb489194105d858d7046fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 7 Jul 2021 10:19:41 +0200 Subject: [PATCH 3/4] fix metrics on Windows (#2707) --- vendor/nim-eth | 2 +- vendor/nim-web3 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/nim-eth b/vendor/nim-eth index 3514ee648..2dfd352fd 160000 --- a/vendor/nim-eth +++ b/vendor/nim-eth @@ -1 +1 @@ -Subproject commit 3514ee6484038b7e66540f5b5853831198562412 +Subproject commit 2dfd352fd0635171f8cb9a86db94b352d63012e5 diff --git a/vendor/nim-web3 b/vendor/nim-web3 index 57f86f752..97e05aea6 160000 --- a/vendor/nim-web3 +++ b/vendor/nim-web3 @@ -1 +1 @@ -Subproject commit 57f86f752b0b4c4ec1f6caf0b8d2eb9870112f4e +Subproject commit 97e05aea6573d2630e318e7777a54d95db6ec40e From 6f441191e40253f6c1d00ff6cccf9ff9d79ae2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mamy=20Andr=C3=A9-Ratsimbazafy?= Date: Sat, 10 Jul 2021 15:18:32 +0200 Subject: [PATCH 4/4] v1.4.1 changelog and version --- CHANGELOG.md | 24 ++++++++++++++++++++++++ beacon_chain/version.nim | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66fcdf116..fee4a440a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +2021-07-10 v1.4.1 +================= + +Nimbus v1.4.1 - "Every attestation counts" + +This release is marked as `low-urgency` + +## Notable changes + +Nimbus `v1.4.0` users might have noticed that they are missing a small number of (seemingly random) attestations since the update. Our investigation into the matter has showed that, due to `v1.4.0`'s significant performance improvements, Nimbus validators occasionally send their first attestation for a new epoch before some peers are ready. These "slow" peers end up dropping early attestations because they're busy with the epoch transition. + +It's a rare occurrence, since it requires a validator to be scheduled to attest in the first slot of an epoch *and* for the beacon node to only be connected to "slow" peers for the respective libp2p topic. If both these conditions are true, a premature attestation may be lost in time, like tears in the rain. + +As a fix, we are using a larger send delay: [#2705](https://github.com/status-im/nimbus-eth2/pull/2705). + +Fo those Nimbus `v1.4.0` users who are concerned about reaching optimal attestation effectiveness, we encourage you to upgrade as soon as possible. + +Other changes include log flushing and metrics fixes. + +Full list: +- increase attestation wait time ([#2705](https://github.com/status-im/nimbus-eth2/pull/2705)) +- ensure logs are printed without delays ([#2669](https://github.com/status-im/nimbus-eth2/pull/2669)) +- fix metrics on Windows ([#2707](https://github.com/status-im/nimbus-eth2/pull/2707)) + 2021-06-21 v1.4.0 ================= diff --git a/beacon_chain/version.nim b/beacon_chain/version.nim index 95ea89568..e1505f51d 100644 --- a/beacon_chain/version.nim +++ b/beacon_chain/version.nim @@ -16,7 +16,7 @@ when not defined(nimscript): const versionMajor* = 1 versionMinor* = 4 - versionBuild* = 0 + versionBuild* = 1 versionBlob* = "stateofus" # Single word - ends up in the default graffitti