Skip to content

feat: Flag to always reexecute block proposals#17273

Merged
PhilWindle merged 1 commit intonextfrom
palla/always-reexecute-proposals
Sep 25, 2025
Merged

feat: Flag to always reexecute block proposals#17273
PhilWindle merged 1 commit intonextfrom
palla/always-reexecute-proposals

Conversation

@spalladino
Copy link
Contributor

Adds a flag to always reexecute block proposals. If set, a validator node will always reexecute, even if not part of the committee, though they will not attest. If the node is not a validator, they will just log the result fo the execution.

Note that this does NOT affect p2p propagation, since the reexecution is done after the attestation is propagated, as it happens on a separate handler and not in a p2p-registered validator.

To handle reexecutions in a non-validator node, reexecution was moved to a block-proposal-handler class, which is instantiated instead of a validator client in non-validators.

This PR also causes validators to reexecute a proposal if they are not in the committee if there is a slash penalty defined for broadcasting invalid block proposals. Since this feature is not yet properly tested, I've disabled the default slash for these offenses for the time being (they were not working at the moment). See A-57 for more info.

Fixes A-54

@spalladino
Copy link
Contributor Author

Log extracted from a non-validator node:

[14:41:58.773] VERBOSE: validator:block-proposal-handler Re-executing transactions in the proposal {"blockNumber":3,"slotNumber":15,"lastArchive":"0x04941067c2b659ff60fd1ee38a68ccaeae97d8612d4c0ea144f840f4891e15bf","archive":"0x198cd5341c655e929d67b3e59b102381a621959e9e29642501a6ed0feec14a4f","txCount":7,"proposer":"0x9965507d1a55bcc2695c58ba16fb37d819b0a4dc"}
[14:41:59.383] VERBOSE: validator:block-proposal-handler Transaction re-execution complete for slot 0x000000000000000000000000000000000000000000000000000000000000000f {"numFailedTxs":0,"numProposalTxs":7,"numProcessedTxs":7,"slot":"0x000000000000000000000000000000000000000000000000000000000000000f"}
[14:41:59.384] INFO: validator:block-proposal-handler Non-validator reexecution completed for slot 15 {"blockNumber":3,"reexecutionTimeMs":609.513003,"totalManaUsed":0.044331,"numTxs":7}

Adds a flag to always reexecute block proposals. If set, a validator
node will always reexecute, even if not part of the committee, though
they will not attest. If the node is not a validator, they will just log
the result fo the execution.

Note that this does NOT affect p2p propagation, since the reexecution is
done after the attestation is propagated, as it happens on a separate
handler and not in a p2p-registered validator.

To handle reexecutions in a non-validator node, reexecution was moved to
a block-proposal-handler class, which is instantiated instead of a
validator client in non-validators.

This PR also causes validators to reexecute a proposal if they are not
in the committee if there is a slash penalty defined for broadcasting
invalid block proposals. Since this feature is not yet properly tested,
I've disabled the default slash for these offenses for the time being
(they were not working at the moment). See A-57 for more info.

Fixes A-54
@spalladino spalladino force-pushed the palla/always-reexecute-proposals branch from 0825fb5 to 99bb7dd Compare September 24, 2025 17:54
@PhilWindle PhilWindle added this pull request to the merge queue Sep 25, 2025
Merged via the queue into next with commit f0d2694 Sep 25, 2025
14 checks passed
@PhilWindle PhilWindle deleted the palla/always-reexecute-proposals branch September 25, 2025 11:50
spalladino pushed a commit that referenced this pull request Sep 25, 2025
Adds a flag to always reexecute block proposals. If set, a validator
node will always reexecute, even if not part of the committee, though
they will not attest. If the node is not a validator, they will just log
the result fo the execution.

Note that this does NOT affect p2p propagation, since the reexecution is
done after the attestation is propagated, as it happens on a separate
handler and not in a p2p-registered validator.

To handle reexecutions in a non-validator node, reexecution was moved to
a block-proposal-handler class, which is instantiated instead of a
validator client in non-validators.

This PR also causes validators to reexecute a proposal if they are not
in the committee if there is a slash penalty defined for broadcasting
invalid block proposals. Since this feature is not yet properly tested,
I've disabled the default slash for these offenses for the time being
(they were not working at the moment). See A-57 for more info.

Fixes A-54
spalladino added a commit that referenced this pull request Sep 25, 2025
As part of #17273 I had added a cleanup to the gossip network test to
delete data dirs for the prover. However, the `stop` method on the
prover failed to await for all operations, so when the test finished
successfully, it would still try to use the db (in particular, it seems
to be for the proving broker database `getEpochDatabase`) and abort with
a core dump.

This reverts the folder cleanup.
spalladino added a commit that referenced this pull request Sep 25, 2025
As part of #17273 I had added a cleanup to the gossip network test to
delete data dirs for the prover. However, the `stop` method on the
prover failed to await for all operations, so when the test finished
successfully, it would still try to use the db (in particular, it seems
to be for the proving broker database `getEpochDatabase`) and abort with
a core dump.

This reverts the folder cleanup.
spalladino added a commit that referenced this pull request Sep 25, 2025
As part of #17273 I had added a cleanup to the gossip network test to
delete data dirs for the prover. However, the `stop` method on the
prover failed to await for all operations, so when the test finished
successfully, it would still try to use the db (in particular, it seems
to be for the proving broker database `getEpochDatabase`) and abort with
a core dump.

This reverts the folder cleanup.
spalladino added a commit that referenced this pull request Sep 25, 2025
As part of #17273 I had added a cleanup to the gossip network test to
delete data dirs for the prover. However, the `stop` method on the
prover failed to await for all operations, so when the test finished
successfully, it would still try to use the db (in particular, it seems
to be for the proving broker database `getEpochDatabase`) and abort with
a core dump.

This reverts the folder cleanup.
github-merge-queue bot pushed a commit that referenced this pull request Sep 25, 2025
As part of #17273 I had added a cleanup to the gossip network test to
delete data dirs for the prover. However, the `stop` method on the
prover failed to await for all operations, so when the test finished
successfully, it would still try to use the db (in particular, it seems
to be for the proving broker database `getEpochDatabase`) and abort with
a core dump.

This reverts the folder cleanup.
PhilWindle added a commit that referenced this pull request Sep 29, 2025
This PR is a backport of the following into V2.

#17169
#17176 
#17186 
#17178 
#17177
#17130
#17039 
#17230
#17245 
#17273
#17186
#17192
#17194 
#17225 
#17285 
#17312 
#17326

---------

Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
Co-authored-by: Santiago Palladino <santiago@aztec-labs.com>
Co-authored-by: Santiago Palladino <spalladino@gmail.com>
Co-authored-by: alexghr <3816165+alexghr@users.noreply.github.com>
mralj pushed a commit that referenced this pull request Oct 13, 2025
As part of #17273 I had added a cleanup to the gossip network test to
delete data dirs for the prover. However, the `stop` method on the
prover failed to await for all operations, so when the test finished
successfully, it would still try to use the db (in particular, it seems
to be for the proving broker database `getEpochDatabase`) and abort with
a core dump.

This reverts the folder cleanup.
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