Commit d4d77e3
authored
fix(ethereum): prevent unhandled L1 rejections from tx monitor loops during shutdown (v5 line, partial) (#24551)
## Flake
`multi-node/slashing/sentinel_status_slash.parallel.test.ts` ("slashes
an attestor that gets stopped after the network is running") flaked on
PR #24507 (unrelated change). CI log:
http://ci.aztec-labs.com/9bb09d2f904e290a
## What actually failed
The test itself **passed**. Immediately after, the node process crashed
with an **unhandled rejection** (`ECONNREFUSED` on anvil after teardown)
— something was still polling L1 after shutdown. Root cause:
`L1TxUtils.monitorTransaction`'s loop calls `getL1Timestamp()` at the
top of its loop, outside the loop's own try/catch, and nothing waited
for in-flight monitor iterations to actually stop during shutdown.
## Scope of this PR (rebased onto `merge-train/spartan-v5`)
This PR was originally written against `next` and touched 4 files. After
rebasing onto `merge-train/spartan-v5`, 2 of those files cherry-picked
cleanly and are included here:
- `yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils.ts` — guards the
loop-top `getL1Timestamp()` call to break quietly when interrupted.
- `yarn-project/sequencer-client/src/publisher/sequencer-publisher.ts` —
adds `.catch` to a bare fire-and-forget `backupDroppedInSim(...)` call.
The other 2 files (`publisher_manager.ts`, `checkpoint_proposal_job.ts`)
have diverged in structure on this branch and needed their own
investigation rather than a blind cherry-pick — that's covered
separately in
[#24560](#24560),
which found `publisher_manager.ts` had the same defect (fixed there) and
`checkpoint_proposal_job.ts` did not (this branch already routes
fire-and-forget L1 requests through a `RequestsTracker` that attaches
its own rejection handler).
No tracked issue exists for this flake; reference only.
---
*Created by
[claudebox](https://claudebox.work/v2/sessions/0959caa9f03f59fa) ·
group: `slackbot`*1 parent 5627161 commit d4d77e3
2 files changed
Lines changed: 18 additions & 3 deletions
File tree
- yarn-project
- ethereum/src/l1_tx_utils
- sequencer-client/src/publisher
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
443 | 456 | | |
444 | 457 | | |
445 | 458 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
473 | 475 | | |
474 | 476 | | |
475 | 477 | | |
| |||
0 commit comments