Skip to content

Commit 6eb34bc

Browse files
Halt Sequencer if the app errors on a transaction (#1386)
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. --> ## Overview Closes: #1356 <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. --> ## Checklist <!-- Please complete the checklist to ensure that the PR is ready to be reviewed. IMPORTANT: PRs should be left in Draft until the below checklist is completed. --> - [x] New and updated code has appropriate documentation - [ ] New and updated code has new and/or updated testing - [x] Required CI checks are passing - [ ] Visual proof for any user facing features like CLI or documentation updates - [x] Linked issues closed with keywords <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved error handling in the block management process to ensure system stability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent fdda245 commit 6eb34bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

block/manager.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,11 @@ func (m *Manager) publishBlock(ctx context.Context) error {
711711

712712
newState, responses, err := m.applyBlock(ctx, block)
713713
if err != nil {
714-
return err
714+
if ctx.Err() != nil {
715+
return err
716+
}
717+
// if call to applyBlock fails, we halt the node, see https://github.com/cometbft/cometbft/pull/496
718+
panic(err)
715719
}
716720

717721
// Before taking the hash, we need updated ISRs, hence after ApplyBlock

0 commit comments

Comments
 (0)