From dc749fb98b7323ee41ec3ad0713d3b1488a231d6 Mon Sep 17 00:00:00 2001 From: tersec Date: Wed, 5 Oct 2022 16:29:20 +0000 Subject: [PATCH 1/2] don't crash on getBlindedExecutionPayload network errors (#4222) --- beacon_chain/validators/validator_duties.nim | 25 +++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/beacon_chain/validators/validator_duties.nim b/beacon_chain/validators/validator_duties.nim index d4b3041c1..1743c4314 100644 --- a/beacon_chain/validators/validator_duties.nim +++ b/beacon_chain/validators/validator_duties.nim @@ -660,16 +660,25 @@ proc proposeBlockMEV( Future[Opt[BlockRef]] {.async.} = let executionBlockRoot = node.dag.loadExecutionBlockRoot(head) - executionPayloadHeader = awaitWithTimeout( - node.getBlindedExecutionPayload( - slot, executionBlockRoot, validator.pubkey), - BUILDER_PROPOSAL_DELAY_TOLERANCE): - Result[ExecutionPayloadHeader, cstring].err( - "getBlindedExecutionPayload timed out") + executionPayloadHeader = + try: + awaitWithTimeout( + node.getBlindedExecutionPayload( + slot, executionBlockRoot, validator.pubkey), + BUILDER_PROPOSAL_DELAY_TOLERANCE): + Result[ExecutionPayloadHeader, cstring].err( + "getBlindedExecutionPayload timed out") + except RestDecodingError as exc: + Result[ExecutionPayloadHeader, cstring].err( + "getBlindedExecutionPayload REST decoding error") + except CatchableError as exc: + Result[ExecutionPayloadHeader, cstring].err( + "getBlindedExecutionPayload error") if executionPayloadHeader.isErr: debug "proposeBlockMEV: getBlindedExecutionPayload failed", - error = executionPayloadHeader.error + error = executionPayloadHeader.error, slot, validator_index, + head = shortLog(head) # Haven't committed to the MEV block, so allow EL fallback. beacon_block_builder_missed_with_fallback.inc() return Opt.none BlockRef @@ -720,7 +729,7 @@ proc proposeBlockMEV( # From here on, including error paths, disallow local EL production by # returning Opt.some, regardless of whether on head or newBlock. except RestDecodingError as exc: - error "proposeBlockMEV: REST recoding error", + error "proposeBlockMEV: REST decoding error submitting blinded block", slot, head = shortLog(head), validator_index, blindedBlock, error = exc.msg return Opt.some head From 87fdd92d887f49fbaf8473d0b3020f94bd775bbd Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Mon, 10 Oct 2022 18:20:34 +0300 Subject: [PATCH 2/2] Version 22.10.1 --- CHANGELOG.md | 8 ++++++++ beacon_chain/version.nim | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69296f300..a3cf8e3ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +2022-10-10 v22.10.1 +=================== + +Nimbus `v22.10.1` is a `low-urgency` hotfix release addressing a frequently encountered crash when Nimbus has poor network connectivity to an external block builder: + +https://github.com/status-im/nimbus-eth2/pull/4222 + + 2022-10-03 v22.10.0 =================== diff --git a/beacon_chain/version.nim b/beacon_chain/version.nim index c0041317a..49bba11d9 100644 --- a/beacon_chain/version.nim +++ b/beacon_chain/version.nim @@ -18,7 +18,7 @@ when not defined(nimscript): const versionMajor* = 22 versionMinor* = 10 - versionBuild* = 0 + versionBuild* = 1 versionBlob* = "stateofus" # Single word - ends up in the default graffiti