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/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) 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", 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 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