Skip to content

Commit

Permalink
add trivial {.push raises: [].} to research and test folders (#…
Browse files Browse the repository at this point in the history
…5988)

Annotate the `research` and `test` files for which no further changes
are needed to successfully compile them, to not interfere with periodic
tasks such as spec reference bumps.
  • Loading branch information
etan-status authored Feb 29, 2024
1 parent 5da2bcd commit f5e9d3f
Show file tree
Hide file tree
Showing 66 changed files with 149 additions and 36 deletions.
18 changes: 9 additions & 9 deletions research/fakeee.nim
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## Fake execution engine API implementation useful for testing beacon node without a running execution node

# Nimbus
# beacon_chain
# Copyright (c) 2022-2024 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
# at your option.
# This file may not be copied, modified, or distributed except according to
# those terms.
# 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

## Fake execution engine API implementation useful for testing beacon node without a running execution node

import
std/typetraits,
Expand Down
2 changes: 2 additions & 0 deletions research/mev_mock.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import
confutils, presto,
../beacon_chain/spec/datatypes/capella,
Expand Down
9 changes: 9 additions & 0 deletions research/timing.nim
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# beacon_chain
# Copyright (c) 2023-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import
std/[times, stats]

Expand Down
4 changes: 2 additions & 2 deletions research/wss_sim.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

# `wss_sim` loads a state and a set of validator keys, then simulates a
# beacon chain running with the given validators producing blocks
# and attesting when they're supposed to.

{.push raises: [].}

import
std/[strformat, sequtils, tables],
chronicles,
Expand Down
2 changes: 2 additions & 0 deletions tests/all_tests.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

# All tests except scenarios, which as compiled separately for mainnet and minimal

import
Expand Down
1 change: 1 addition & 0 deletions tests/consensus_spec/all_tests.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

# BLS test vectors are covered by nim-blscurve:
Expand Down
3 changes: 2 additions & 1 deletion tests/consensus_spec/altair/all_altair_fixtures.nim
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# beacon_chain
# Copyright (c) 2021-2022 Status Research & Development GmbH
# Copyright (c) 2021-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
1 change: 1 addition & 0 deletions tests/consensus_spec/altair/test_fixture_rewards.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# beacon_chain
# Copyright (c) 2018-2022 Status Research & Development GmbH
# Copyright (c) 2018-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
3 changes: 2 additions & 1 deletion tests/consensus_spec/bellatrix/all_bellatrix_fixtures.nim
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# beacon_chain
# Copyright (c) 2021-2022 Status Research & Development GmbH
# Copyright (c) 2021-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
1 change: 1 addition & 0 deletions tests/consensus_spec/bellatrix/test_fixture_rewards.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# beacon_chain
# Copyright (c) 2018-2022 Status Research & Development GmbH
# Copyright (c) 2018-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
2 changes: 2 additions & 0 deletions tests/consensus_spec/consensus_spec_tests_preset.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import ../testutil

# Tests that depend on `mainnet` vs `minimal` compile-time configuration
Expand Down
3 changes: 2 additions & 1 deletion tests/consensus_spec/deneb/all_deneb_fixtures.nim
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# beacon_chain
# Copyright (c) 2022 Status Research & Development GmbH
# Copyright (c) 2022-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
1 change: 1 addition & 0 deletions tests/consensus_spec/deneb/test_fixture_rewards.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
3 changes: 2 additions & 1 deletion tests/consensus_spec/phase0/all_phase0_fixtures.nim
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# beacon_chain
# Copyright (c) 2021-2022 Status Research & Development GmbH
# Copyright (c) 2021-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
1 change: 1 addition & 0 deletions tests/consensus_spec/phase0/test_fixture_rewards.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# beacon_chain
# Copyright (c) 2018-2022 Status Research & Development GmbH
# Copyright (c) 2018-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
1 change: 1 addition & 0 deletions tests/consensus_spec/test_fixture_fork.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}
{.used.}

import
Expand Down
10 changes: 9 additions & 1 deletion tests/fuzzing/beacon_node_cli/fuzz_beacon_node_cli.nim
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# beacon_chain
# Copyright (c) 2020-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import
# TODO These imports shouldn't be necessary here
# (this is a variation of the sandwich problem)
Expand All @@ -7,4 +16,3 @@ import
../../../beacon_chain/conf, ../../../beacon_chain/spec/network

fuzzCliParsing BeaconNodeConf

2 changes: 2 additions & 0 deletions tests/fuzzing/ssz_decode_Attestation.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import ./ssz_fuzzing

sszFuzzingTest Attestation
2 changes: 2 additions & 0 deletions tests/fuzzing/ssz_decode_AttesterSlashing.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import ./ssz_fuzzing

sszFuzzingTest AttesterSlashing
2 changes: 2 additions & 0 deletions tests/fuzzing/ssz_decode_BeaconState.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import ./ssz_fuzzing

sszFuzzingTest BeaconState
2 changes: 2 additions & 0 deletions tests/fuzzing/ssz_decode_ProposerSlashing.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import ./ssz_fuzzing

sszFuzzingTest ProposerSlashing
2 changes: 2 additions & 0 deletions tests/fuzzing/ssz_decode_SignedAggregateAndProof.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import ./ssz_fuzzing

sszFuzzingTest SignedAggregateAndProof
2 changes: 2 additions & 0 deletions tests/fuzzing/ssz_decode_SignedBeaconBlock.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import ./ssz_fuzzing

sszFuzzingTest SignedBeaconBlock
2 changes: 2 additions & 0 deletions tests/fuzzing/ssz_decode_VoluntaryExit.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import ./ssz_fuzzing

sszFuzzingTest SignedVoluntaryExit
9 changes: 9 additions & 0 deletions tests/fuzzing/ssz_fuzzing.nim
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# beacon_chain
# Copyright (c) 2021-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import
testutils/fuzzing, faststreams/inputs, serialization/testing/tracing,
../../beacon_chain/spec/datatypes/base
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# beacon_chain
# Copyright (c) 2020-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import
# TODO These imports shouldn't be necessary here
# (this is a variation of the sandwich problem)
Expand All @@ -7,4 +16,3 @@ import
../../../beacon_chain/conf

fuzzCliParsing ValidatorClientConf

2 changes: 2 additions & 0 deletions tests/helpers/debug_state.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import
std/macros,
ssz_serialization/types,
Expand Down
4 changes: 3 additions & 1 deletion tests/helpers/digest_helpers.nim
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# beacon_chain
# Copyright (c) 2018-2021 Status Research & Development GmbH
# Copyright (c) 2018-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

import
../../beacon_chain/spec/digest

Expand Down
4 changes: 3 additions & 1 deletion tests/helpers/math_helpers.nim
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# beacon_chain
# Copyright (c) 2018-2020 Status Research & Development GmbH
# Copyright (c) 2018-2024 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).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

func round_multiple_down*(x: uint64, n: uint64): uint64 =
## Round the input to the previous multiple of "n"
x - x mod n
2 changes: 2 additions & 0 deletions tests/mocking/mock_deposits.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

# Mocking deposits and genesis deposits
# ---------------------------------------------------------------

Expand Down
2 changes: 2 additions & 0 deletions tests/mocking/mock_genesis.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

{.push raises: [].}

# Mocking a genesis state
# ---------------------------------------------------------------

Expand Down
Loading

0 comments on commit f5e9d3f

Please sign in to comment.