-
Notifications
You must be signed in to change notification settings - Fork 297
add payload attestation pool #7730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: unstable
Are you sure you want to change the base?
Conversation
|
Can run |
beacon_chain/consensus_object_pools/payload_attestation_pool.nim
Outdated
Show resolved
Hide resolved
|
|
||
| true | ||
|
|
||
| func findAllPtcPositions( |
There was a problem hiding this comment.
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.
beacon_chain/consensus_object_pools/payload_attestation_pool.nim
Outdated
Show resolved
Hide resolved
beacon_chain/consensus_object_pools/payload_attestation_pool.nim
Outdated
Show resolved
Hide resolved
|
The errors are deliberate stack-usage-checking: Lines 64 to 70 in 1c55749
and appear to be due to: |
Thanks for the pointer! That explains exactly what I have been seeing. |
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
No description provided.