Skip to content

Commit 9309633

Browse files
authored
Merge branch 'unstable' into column-syncer
2 parents 1885b3f + 4b07120 commit 9309633

37 files changed

+754
-708
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1+
2025-04-26 v25.4.1
2+
==================
3+
4+
Nimbus `v25.4.1` is a high-urgency release for Ethereum and Gnosis mainnets due to their Pectra hardforks.
5+
6+
### Fixes
7+
8+
- fix potential missed MEV blocks starting with Electra builder API:
9+
https://github.com/status-im/nimbus-eth2/pull/7103
10+
11+
- fix `single_attestation` SSE beacon API stream subscription:
12+
https://github.com/status-im/nimbus-eth2/pull/7107
13+
114
2025-04-21 v25.4.0
215
==================
316

4-
Nimbus `v25.4.0` is a high-urgency release for Ethereum Foundation and Gnosis mainnets due to their Pectra hardforks.
17+
Nimbus `v25.4.0` is a high-urgency release for Ethereum and Gnosis mainnets due to their Pectra hardforks.
518

619
### Improvements
720

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ local-testnet-minimal:
235235
--remote-validators-count 512 \
236236
--signer-type $(SIGNER_TYPE) \
237237
--deneb-fork-epoch 0 \
238-
--electra-fork-epoch 2 \
238+
--electra-fork-epoch 0 \
239239
--stop-at-epoch 6 \
240240
--disable-htop \
241241
--enable-payload-builder \
@@ -264,7 +264,7 @@ local-testnet-mainnet:
264264
--data-dir $@ \
265265
--nodes 2 \
266266
--deneb-fork-epoch 0 \
267-
--electra-fork-epoch 2 \
267+
--electra-fork-epoch 0 \
268268
--stop-at-epoch 6 \
269269
--disable-htop \
270270
--base-port $$(( $(MAINNET_TESTNET_BASE_PORT) + EXECUTOR_NUMBER * 400 + 0 )) \

beacon_chain/era_db.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,8 @@ proc getPartialState(
421421
try:
422422
readSszBytes(tmp.toOpenArray(0, partialBytes - 1), output)
423423
true
424-
except CatchableError:
425-
# TODO log?
424+
except CatchableError as exc:
425+
error "Failed to parse partial beacon state", slot = slot, msg = exc.msg
426426
false
427427

428428
iterator getBlockIds*(

beacon_chain/fork_choice/fork_choice.nim

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import
1111
# Standard library
12-
std/[sequtils, tables],
12+
std/tables,
1313
# Status libraries
1414
results, chronicles,
1515
# Internal
@@ -19,6 +19,7 @@ import
1919
./fork_choice_types, ./proto_array,
2020
../consensus_object_pools/[spec_cache, blockchain_dag]
2121

22+
from std/sequtils import keepItIf
2223
export results, fork_choice_types
2324
export proto_array.len
2425

@@ -487,7 +488,7 @@ when isMainModule:
487488
echo " fork_choice compute_deltas - test zero votes"
488489

489490
const validator_count = 16
490-
var deltas = newSeqUninitialized[Delta](validator_count)
491+
var deltas = newSeqUninit[Delta](validator_count)
491492

492493
var indices: Table[Eth2Digest, Index]
493494
var votes: seq[VoteTracker]
@@ -518,7 +519,7 @@ when isMainModule:
518519
const
519520
Balance = Gwei(42)
520521
validator_count = 16
521-
var deltas = newSeqUninitialized[Delta](validator_count)
522+
var deltas = newSeqUninit[Delta](validator_count)
522523

523524
var indices: Table[Eth2Digest, Index]
524525
var votes: seq[VoteTracker]
@@ -557,7 +558,7 @@ when isMainModule:
557558
const
558559
Balance = Gwei(42)
559560
validator_count = 16
560-
var deltas = newSeqUninitialized[Delta](validator_count)
561+
var deltas = newSeqUninit[Delta](validator_count)
561562

562563
var indices: Table[Eth2Digest, Index]
563564
var votes: seq[VoteTracker]
@@ -594,7 +595,7 @@ when isMainModule:
594595
Balance = Gwei(42)
595596
validator_count = 16
596597
TotalDeltas = Delta(Balance * validator_count)
597-
var deltas = newSeqUninitialized[Delta](validator_count)
598+
var deltas = newSeqUninit[Delta](validator_count)
598599

599600
var indices: Table[Eth2Digest, Index]
600601
var votes: seq[VoteTracker]
@@ -642,7 +643,7 @@ when isMainModule:
642643
indices.add fakeHash(1), 0
643644

644645
# 2 validators
645-
var deltas = newSeqUninitialized[Delta](2)
646+
var deltas = newSeqUninit[Delta](2)
646647
let old_balances = @[Balance, Balance]
647648
let new_balances = @[Balance, Balance]
648649

@@ -681,7 +682,7 @@ when isMainModule:
681682
validator_count = 16
682683
TotalOldDeltas = Delta(OldBalance * validator_count)
683684
TotalNewDeltas = Delta(NewBalance * validator_count)
684-
var deltas = newSeqUninitialized[Delta](validator_count)
685+
var deltas = newSeqUninit[Delta](validator_count)
685686

686687
var indices: Table[Eth2Digest, Index]
687688
var votes: seq[VoteTracker]
@@ -730,7 +731,7 @@ when isMainModule:
730731
indices.add fakeHash(2), 1
731732

732733
# 1 validator at the start, 2 at the end
733-
var deltas = newSeqUninitialized[Delta](2)
734+
var deltas = newSeqUninit[Delta](2)
734735
let old_balances = @[Balance]
735736
let new_balances = @[Balance, Balance]
736737

@@ -769,7 +770,7 @@ when isMainModule:
769770
indices.add fakeHash(2), 1
770771

771772
# 2 validator at the start, 1 at the end
772-
var deltas = newSeqUninitialized[Delta](2)
773+
var deltas = newSeqUninit[Delta](2)
773774
let old_balances = @[Balance, Balance]
774775
let new_balances = @[Balance]
775776

beacon_chain/gossip_processing/gossip_validation.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type
5252
template errIgnore*(msg: cstring): untyped =
5353
err((ValidationResult.Ignore, cstring msg))
5454
template errReject*(msg: cstring): untyped =
55-
err((ValidationResult.Reject, cstring msg))
55+
err((ValidationResult.Reject, msg))
5656

5757
# Internal checks
5858
# ----------------------------------------------------------------
@@ -206,7 +206,7 @@ func check_blob_sidecar_inclusion_proof(
206206
blob_sidecar: deneb.BlobSidecar): Result[void, ValidationError] =
207207
let res = blob_sidecar.verify_blob_sidecar_inclusion_proof()
208208
if res.isErr:
209-
return errReject(res.error)
209+
return errReject(cstring res.error)
210210

211211
ok()
212212

beacon_chain/light_client.nim

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# beacon_chain
2-
# Copyright (c) 2022-2024 Status Research & Development GmbH
2+
# Copyright (c) 2022-2025 Status Research & Development GmbH
33
# Licensed and distributed under either of
44
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
55
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@@ -434,10 +434,8 @@ proc updateGossipStatus*(
434434
if gossipFork >= ConsensusFork.Altair:
435435
let forkDigest = lightClient.forkDigests[].atConsensusFork(gossipFork)
436436
lightClient.network.subscribe(
437-
getLightClientFinalityUpdateTopic(forkDigest),
438-
basicParams)
437+
getLightClientFinalityUpdateTopic(forkDigest), basicParams())
439438
lightClient.network.subscribe(
440-
getLightClientOptimisticUpdateTopic(forkDigest),
441-
basicParams)
439+
getLightClientOptimisticUpdateTopic(forkDigest), basicParams())
442440

443441
lightClient.gossipState = targetGossipState

beacon_chain/networking/eth2_network.nim

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,15 +2635,13 @@ proc broadcast(node: Eth2Node, topic: string, msg: auto):
26352635
broadcast(node, topic, gossipEncode(msg))
26362636

26372637
proc subscribeAttestationSubnets*(
2638-
node: Eth2Node, subnets: AttnetBits, forkDigest: ForkDigest) =
2638+
node: Eth2Node, subnets: AttnetBits, forkDigest: ForkDigest,
2639+
topicParams: TopicParams) =
26392640
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-beta.0/specs/phase0/p2p-interface.md#attestations-and-aggregation
2640-
# Nimbus won't score attestation subnets for now, we just rely on block and
2641-
# aggregate which are more stable and reliable
2642-
26432641
for subnet_id, enabled in subnets:
26442642
if enabled:
26452643
node.subscribe(getAttestationTopic(
2646-
forkDigest, SubnetId(subnet_id)), TopicParams.init()) # don't score attestation subnets for now
2644+
forkDigest, SubnetId(subnet_id)), topicParams)
26472645

26482646
proc unsubscribeAttestationSubnets*(
26492647
node: Eth2Node, subnets: AttnetBits, forkDigest: ForkDigest) =

0 commit comments

Comments
 (0)