Skip to content

Commit 3e4e606

Browse files
authored
Merge branch 'unstable' into column-syncer
2 parents cb7df93 + 9eb010e commit 3e4e606

28 files changed

+71
-94
lines changed

beacon_chain/gossip_processing/light_client_processor.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ proc processLightClientFinalityUpdate*(
564564
self.latestFinalityUpdate = finality_update.toOptimistic
565565
v
566566

567-
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-beta.2/specs/altair/light-client/sync-protocol.md#process_light_client_finality_update
567+
# https://github.com/ethereum/consensus-specs/blob/v1.6.0-alpha.0/specs/altair/light-client/sync-protocol.md#process_light_client_optimistic_update
568568
proc processLightClientOptimisticUpdate*(
569569
self: var LightClientProcessor, src: MsgSource,
570570
optimistic_update: ForkedLightClientOptimisticUpdate

beacon_chain/networking/eth2_network.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,7 @@ proc new(T: type Eth2Node,
18451845
ip: Opt[IpAddress], tcpPort, udpPort: Opt[Port],
18461846
privKey: keys.PrivateKey, discovery: bool,
18471847
directPeers: DirectPeers, announcedAddresses: openArray[MultiAddress],
1848-
rng: ref HmacDrbgContext): T {.raises: [CatchableError].} =
1848+
rng: ref HmacDrbgContext): T =
18491849
when not defined(local_testnet):
18501850
let
18511851
connectTimeout = chronos.minutes(1)

beacon_chain/nimbus_beacon_node.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2595,7 +2595,7 @@ proc doSlashingExport(conf: BeaconNodeConf) {.raises: [IOError].}=
25952595
db.exportSlashingInterchange(interchange, conf.exportedValidators)
25962596
echo "Export finished: '", dir/filetrunc & ".sqlite3" , "' into '", interchange, "'"
25972597

2598-
proc doSlashingImport(conf: BeaconNodeConf) {.raises: [SerializationError, IOError].} =
2598+
proc doSlashingImport(conf: BeaconNodeConf) {.raises: [IOError].} =
25992599
let
26002600
dir = conf.validatorsDir()
26012601
filetrunc = SlashingDbName

beacon_chain/statusbar.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# beacon_chain
2-
# Copyright (c) 2018-2024 Status Research & Development GmbH
2+
# Copyright (c) 2018-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).
@@ -107,7 +107,7 @@ proc renderCells(cells: seq[StatusBarCell], sep: string) =
107107
stdout.write cell.content, " "
108108
stdout.resetAttributes()
109109

110-
proc render*(s: var StatusBarView) {.raises: [ValueError].} =
110+
proc render*(s: var StatusBarView) =
111111
doAssert s.consumedLines == 0
112112

113113
let

beacon_chain/validators/slashing_protection.nim

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# beacon_chain
2-
# Copyright (c) 2018-2024 Status Research & Development GmbH
2+
# Copyright (c) 2018-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).
@@ -115,8 +115,7 @@ proc init*(
115115

116116
proc loadUnchecked*(
117117
T: type SlashingProtectionDB,
118-
basePath, dbname: string, readOnly: bool
119-
): SlashingProtectionDB {.raises:[IOError].}=
118+
basePath, dbname: string, readOnly: bool): SlashingProtectionDB =
120119
## Load a slashing protection DB
121120
## Note: This is for CLI tool usage
122121
## this doesn't check the genesis validator root
@@ -282,12 +281,10 @@ proc registerSyntheticAttestation*(db: SlashingProtectionDB,
282281
source, target: Epoch) =
283282
db.db_v2.registerSyntheticAttestation(validator, source, target)
284283

285-
proc inclSPDIR*(db: SlashingProtectionDB, spdir: SPDIR): SlashingImportStatus
286-
{.raises: [SerializationError, IOError].} =
284+
proc inclSPDIR*(db: SlashingProtectionDB, spdir: SPDIR): SlashingImportStatus =
287285
db.db_v2.inclSPDIR(spdir)
288286

289-
proc toSPDIR*(db: SlashingProtectionDB): SPDIR
290-
{.raises: [IOError].} =
287+
proc toSPDIR*(db: SlashingProtectionDB): SPDIR =
291288
db.db_v2.toSPDIR()
292289

293290
proc exportSlashingInterchange*(

beacon_chain/validators/slashing_protection_common.nim

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# beacon_chain
2-
# Copyright (c) 2018-2024 Status Research & Development GmbH
2+
# Copyright (c) 2018-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).
@@ -277,10 +277,7 @@ chronicles.formatIt SPDIR_SignedAttestation: it.shortLog
277277
# --------------------------------------------
278278

279279
proc importInterchangeV5Impl*(
280-
db: auto,
281-
spdir: var SPDIR
282-
): SlashingImportStatus
283-
{.raises: [SerializationError, IOError].} =
280+
db: auto, spdir: var SPDIR): SlashingImportStatus =
284281
## Common implementation of interchange import
285282
## according to https://eips.ethereum.org/EIPS/eip-3076
286283
## spdir needs to be `var` as it will be sorted in-place

beacon_chain/validators/slashing_protection_v2.nim

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,8 +1381,7 @@ proc registerSyntheticAttestation*(
13811381
let status = db.sqlCommitTransaction.exec()
13821382
checkStatus()
13831383

1384-
proc toSPDIR*(db: SlashingProtectionDB_v2): SPDIR
1385-
{.raises: [IOError].} =
1384+
proc toSPDIR*(db: SlashingProtectionDB_v2): SPDIR =
13861385
## Export the full slashing protection database
13871386
## to a json the Slashing Protection Database Interchange (Complete) Format
13881387
result.metadata.interchange_format_version = "5"
@@ -1477,8 +1476,8 @@ proc toSPDIR*(db: SlashingProtectionDB_v2): SPDIR
14771476
)
14781477
doAssert status.isOk()
14791478

1480-
proc inclSPDIR*(db: SlashingProtectionDB_v2, spdir: SPDIR): SlashingImportStatus
1481-
{.raises: [SerializationError, IOError].} =
1479+
proc inclSPDIR*(db: SlashingProtectionDB_v2, spdir: SPDIR):
1480+
SlashingImportStatus =
14821481
## Import a Slashing Protection Database Intermediate Representation
14831482
## file into the specified slashing protection DB
14841483
##

config.nims

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,16 @@ switch("warning", "CaseTransition:off")
187187
# Transitional for Nim v2.2, due to newSeqUninit replacing newSeqUninitialized.
188188
switch("warning", "Deprecated:off")
189189

190-
# Too many of these because of Defect compat in 1.2
190+
# 1 nimbus-eth2/tests/consensus_spec/test_fixture_ssz_generic_types.nim(238, 28) Hint: 'sszCheck' cannot raise 'YamlConstructionError' [XCannotRaiseY]
191+
# 1 nimbus-eth2/tests/consensus_spec/test_fixture_ssz_generic_types.nim(238, 51) Hint: 'sszCheck' cannot raise 'YamlParserError' [XCannotRaiseY]
192+
# 1 nimbus-eth2/vendor/nim-testutils/testutils/moduletests.nim(17, 24) Hint: 'main' cannot raise 'CatchableError' [XCannotRaiseY]
193+
# 2 nimbus-eth2/tests/consensus_spec/test_fixture_light_client_sync.nim(135, 20) Hint: 'loadTestMeta' cannot raise 'YamlConstructionError' [XCannotRaiseY]
194+
# 2 nimbus-eth2/tests/consensus_spec/test_fixture_light_client_sync.nim(135, 43) Hint: 'loadTestMeta' cannot raise 'YamlParserError' [XCannotRaiseY]
195+
# 2 nimbus-eth2/vendor/nim-toml-serialization/toml_serialization/reader.nim(213, 58) Hint: 'readValue' cannot raise 'IOError' [XCannotRaiseY]
196+
# 3 nimbus-eth2/vendor/nim-toml-serialization/toml_serialization/reader.nim(369, 38) Hint: 'readValue' cannot raise 'SerializationError' [XCannotRaiseY]
197+
# 3 nimbus-eth2/vendor/nim-toml-serialization/toml_serialization/reader.nim(369, 58) Hint: 'readValue' cannot raise 'IOError' [XCannotRaiseY]
198+
# 4 nimbus-eth2/vendor/nim-serialization/serialization.nim(27, 86) Hint: 'readValue' cannot raise 'IOError' [XCannotRaiseY]
199+
# 116 nimbus-eth2/vendor/nim-ssz-serialization/ssz_serialization.nim(51, 77) Hint: 'writeFixedSized' cannot raise 'IOError' [XCannotRaiseY]
191200
switch("hint", "XCannotRaiseY:off")
192201

193202
# Useful for Chronos metrics.

tests/consensus_spec/altair/test_fixture_ssz_consensus_objects.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) 2018-2024 Status Research & Development GmbH
2+
# Copyright (c) 2018-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).
@@ -80,10 +80,8 @@ proc checkSSZ(
8080

8181
# TODO check the value (requires YAML loader)
8282

83-
proc loadExpectedHashTreeRoot(
84-
dir: string
85-
): SSZHashTreeRoot {.raises: [
86-
Exception, IOError, OSError, YamlConstructionError, YamlParserError].} =
83+
proc loadExpectedHashTreeRoot(dir: string): SSZHashTreeRoot
84+
{.raises: [IOError, OSError, YamlConstructionError, YamlParserError].} =
8785
let s = openFileStream(dir/"roots.yaml")
8886
yaml.load(s, result)
8987
s.close()

tests/consensus_spec/bellatrix/test_fixture_operations.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ suite baseDescription & "Execution Payload " & preset():
143143
proc makeApplyExecutionPayloadCb(path: string): auto =
144144
return proc(
145145
preState: var bellatrix.BeaconState, body: bellatrix.BeaconBlockBody):
146-
Result[void, cstring] {.raises: [IOError].} =
146+
Result[void, cstring] =
147147
let payloadValid = os_ops.readFile(
148148
OpExecutionPayloadDir/"pyspec_tests"/path/"execution.yaml"
149149
).contains("execution_valid: true")

0 commit comments

Comments
 (0)