From 9e66a26826bc06ac3dda4059cfcb5164f8dd746f Mon Sep 17 00:00:00 2001 From: Merkel Tranjes <140164174+rnkrtt@users.noreply.github.com> Date: Fri, 26 Dec 2025 08:07:07 +0100 Subject: [PATCH 1/2] fix(fork-choice): correct index type in currentEpochTips.del --- beacon_chain/fork_choice/proto_array.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/beacon_chain/fork_choice/proto_array.nim b/beacon_chain/fork_choice/proto_array.nim index c8e6038d29..8f71115092 100644 --- a/beacon_chain/fork_choice/proto_array.nim +++ b/beacon_chain/fork_choice/proto_array.nim @@ -387,9 +387,10 @@ func prune*( trace "Pruning blocks from fork choice", checkpoints let finalPhysicalIdx = finalizedIdx - self.nodes.offset - for nodeIdx in 0 ..< finalPhysicalIdx: - self.currentEpochTips.del nodeIdx - self.indices.del(self.nodes.buf[nodeIdx].bid.root) + for nodePhysicalIdx in 0 ..< finalPhysicalIdx: + let nodeLogicalIdx = nodePhysicalIdx + self.nodes.offset + self.currentEpochTips.del nodeLogicalIdx + self.indices.del(self.nodes.buf[nodePhysicalIdx].bid.root) # Drop all nodes prior to finalization. # This is done in-place with `moveMem` to avoid costly reallocations. From f8b0cc14535e301f18afaffbde918190a1376ed6 Mon Sep 17 00:00:00 2001 From: Merkel Tranjes <140164174+rnkrtt@users.noreply.github.com> Date: Fri, 26 Dec 2025 12:45:25 +0100 Subject: [PATCH 2/2] update Copyright --- beacon_chain/fork_choice/proto_array.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_chain/fork_choice/proto_array.nim b/beacon_chain/fork_choice/proto_array.nim index 8f71115092..b9572e7b85 100644 --- a/beacon_chain/fork_choice/proto_array.nim +++ b/beacon_chain/fork_choice/proto_array.nim @@ -1,5 +1,5 @@ # beacon_chain -# Copyright (c) 2018-2024 Status Research & Development GmbH +# Copyright (c) 2018-2025 Status Research & Development GmbH # Licensed and distributed under either of # * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). # * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).