Skip to content

Conversation

@Tomi-3-0
Copy link
Contributor

No description provided.

@tersec
Copy link
Contributor

tersec commented Nov 14, 2025

Can run make test locally to regenerate test summaries to fix the Jenkins CI errors, which do exactly this and verify that the test summaries are current/consistent:

[2025-11-14T03:34:35.919Z] + git diff --exit-code --ignore-submodules=all
[2025-11-14T03:34:35.919Z] diff --git a/AllTests-mainnet.md b/AllTests-mainnet.md
[2025-11-14T03:34:35.919Z] index 1fc63000f..74a9b36cb 100644
[2025-11-14T03:34:35.919Z] --- a/AllTests-mainnet.md
[2025-11-14T03:34:35.919Z] +++ b/AllTests-mainnet.md
[2025-11-14T03:34:35.919Z] @@ -836,6 +836,15 @@ AllTests-mainnet
[2025-11-14T03:34:35.919Z]  ```diff
[2025-11-14T03:34:35.919Z]  + pre-1.1.0                                                                                  OK
[2025-11-14T03:34:35.919Z]  ```
[2025-11-14T03:34:35.919Z] +## Payload attestation pool [Preset: mainnet]
[2025-11-14T03:34:35.919Z] +```diff
[2025-11-14T03:34:35.919Z] ++ Can add and retrieve payload attestations [Preset: mainnet]                                OK
[2025-11-14T03:34:35.919Z] ++ Can get payload attestations for block production [Preset: mainnet]                        OK
[2025-11-14T03:34:35.919Z] ++ Different payload presence values [Preset: mainnet]                                        OK
[2025-11-14T03:34:35.919Z] ++ Duplicate validator in PTC - multiple signatures [Preset: mainnet]                         OK
[2025-11-14T03:34:35.919Z] ++ Multiple validators in PTC can attest [Preset: mainnet]                                    OK
[2025-11-14T03:34:35.919Z] ++ Payload attestations get pruned [Preset: mainnet]                                          OK
[2025-11-14T03:34:35.919Z] +```
[2025-11-14T03:34:35.919Z]  ## PeerPool testing suite
[2025-11-14T03:34:35.919Z]  ```diff
[2025-11-14T03:34:35.919Z]  + Access peers by key test


true

func findAllPtcPositions(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be an iterator and avoid allocating the seq[int], because it's only used by

        for ptc_index in ptc_positions:
          aggregation_bits[ptc_index] = true
          signatures.add(cookedSig)

Instead of positions.add(i), it would yield i.

@github-actions
Copy link

github-actions bot commented Nov 14, 2025

Unit Test Results

       12 files  ±  0    2 436 suites  +4   48m 27s ⏱️ +42s
12 649 tests +  6  12 084 ✔️ +  6  565 💤 ±0  0 ±0 
63 612 runs  +24  62 884 ✔️ +24  728 💤 ±0  0 ±0 

Results for commit abf5e3b. ± Comparison against base commit 1c55749.

♻️ This comment has been updated with latest results.

@tersec
Copy link
Contributor

tersec commented Nov 14, 2025

The

gcc  @nimcache/release/all_tests/all_tests.makefile.linkerArgs
/github-runner/github-runner-node-02/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/consensus_object_pools/payload_attestation_pool.nim: In function ‘_ZN24payload_attestation_pool17aggregateMessagesEN24payload_attestation_pool22PayloadAttestationPoolEN9constants4SlotE3ptrIN24payload_attestation_pool23PayloadAttestationEntryEE3varIN4base10StateCacheEE.isra’:
/github-runner/github-runner-node-02/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/consensus_object_pools/payload_attestation_pool.nim:90:15: error: stack usage is 5664224 bytes [-Werror=stack-usage=]
   90 | proc aggregateMessages(
      |               ^
lto1: some warnings being treated as errors
make[2]: *** [/tmp/ccr4dSTb.mk:383: /tmp/ccUDECaB.ltrans127.ltrans.o] Error 1
make[2]: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[1]: *** [nimcache/release/all_tests/all_tests.makefile:3856: build] Error 1
make: *** [Makefile:373: all_tests] Error 2

errors are deliberate stack-usage-checking:

nimbus-eth2/config.nims

Lines 64 to 70 in 1c55749

if defined(limitStackUsage):
# This limits stack usage of each individual function to 1MB - the option is
# available on some GCC versions but not all - run with `-d:limitStackUsage`
# and look for .su files in "./build/", "./nimcache/" or $TMPDIR that list the
# stack size of each function.
switch("passC", "-fstack-usage -Werror=stack-usage=1048576")
switch("passL", "-fstack-usage -Werror=stack-usage=1048576")

and appear to be due to:

@Tomi-3-0
Copy link
Contributor Author

The

gcc  @nimcache/release/all_tests/all_tests.makefile.linkerArgs
/github-runner/github-runner-node-02/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/consensus_object_pools/payload_attestation_pool.nim: In function ‘_ZN24payload_attestation_pool17aggregateMessagesEN24payload_attestation_pool22PayloadAttestationPoolEN9constants4SlotE3ptrIN24payload_attestation_pool23PayloadAttestationEntryEE3varIN4base10StateCacheEE.isra’:
/github-runner/github-runner-node-02/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/consensus_object_pools/payload_attestation_pool.nim:90:15: error: stack usage is 5664224 bytes [-Werror=stack-usage=]
   90 | proc aggregateMessages(
      |               ^
lto1: some warnings being treated as errors
make[2]: *** [/tmp/ccr4dSTb.mk:383: /tmp/ccUDECaB.ltrans127.ltrans.o] Error 1
make[2]: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[1]: *** [nimcache/release/all_tests/all_tests.makefile:3856: build] Error 1
make: *** [Makefile:373: all_tests] Error 2

errors are deliberate stack-usage-checking:

nimbus-eth2/config.nims

Lines 64 to 70 in 1c55749

if defined(limitStackUsage):
# This limits stack usage of each individual function to 1MB - the option is
# available on some GCC versions but not all - run with `-d:limitStackUsage`
# and look for .su files in "./build/", "./nimcache/" or $TMPDIR that list the
# stack size of each function.
switch("passC", "-fstack-usage -Werror=stack-usage=1048576")
switch("passL", "-fstack-usage -Werror=stack-usage=1048576")

and appear to be due to:

Thanks for the pointer! That explains exactly what I have been seeing.
Whenever I set my systems stack limit (with ulimit) low to ~8162KB I get seg faults and when I increase the stack limit the tests pass fine.

@tersec
Copy link
Contributor

tersec commented Nov 14, 2025

The

gcc  @nimcache/release/all_tests/all_tests.makefile.linkerArgs
/github-runner/github-runner-node-02/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/consensus_object_pools/payload_attestation_pool.nim: In function ‘_ZN24payload_attestation_pool17aggregateMessagesEN24payload_attestation_pool22PayloadAttestationPoolEN9constants4SlotE3ptrIN24payload_attestation_pool23PayloadAttestationEntryEE3varIN4base10StateCacheEE.isra’:
/github-runner/github-runner-node-02/workspace/nimbus-eth2/nimbus-eth2/beacon_chain/consensus_object_pools/payload_attestation_pool.nim:90:15: error: stack usage is 5664224 bytes [-Werror=stack-usage=]
   90 | proc aggregateMessages(
      |               ^
lto1: some warnings being treated as errors
make[2]: *** [/tmp/ccr4dSTb.mk:383: /tmp/ccUDECaB.ltrans127.ltrans.o] Error 1
make[2]: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[1]: *** [nimcache/release/all_tests/all_tests.makefile:3856: build] Error 1
make: *** [Makefile:373: all_tests] Error 2

errors are deliberate stack-usage-checking:

nimbus-eth2/config.nims

Lines 64 to 70 in 1c55749

if defined(limitStackUsage):
# This limits stack usage of each individual function to 1MB - the option is
# available on some GCC versions but not all - run with `-d:limitStackUsage`
# and look for .su files in "./build/", "./nimcache/" or $TMPDIR that list the
# stack size of each function.
switch("passC", "-fstack-usage -Werror=stack-usage=1048576")
switch("passL", "-fstack-usage -Werror=stack-usage=1048576")

and appear to be due to:

Thanks for the pointer! That explains exactly what I have been seeing. Whenever I set my systems stack limit (with ulimit) low to ~8162KB I get seg faults and when I increase the stack limit the tests pass fine.

Yes, the 5664224 bytes the error mentions is only for one function, not the whole stack, so it's plausible it would require 2MB+ more of stack for other functions.

state, indices, seed, size=PTC_SIZE, shuffle_indices=false):
yield candidate_index

func get_ptc_list*(state: gloas.BeaconState, slot: Slot,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is only useful for the tests, can move it into tests.

It's nice to have a static guarantee of that sort that the main code isn't using the inefficient approach.

Copy link
Contributor Author

@Tomi-3-0 Tomi-3-0 Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use it here also:

let ptc_list = get_ptc_list(forkyState.data, slot, cache)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants