Skip to content

fix(sync): recover incomplete effects after restart WIP [skip-line-limit]#1707

Draft
hmzakhalid wants to merge 1 commit into
mainfrom
fix/1326-incomplete-effects
Draft

fix(sync): recover incomplete effects after restart WIP [skip-line-limit]#1707
hmzakhalid wants to merge 1 commit into
mainfrom
fix/1326-incomplete-effects

Conversation

@hmzakhalid

Copy link
Copy Markdown
Collaborator

Summary

  • Detects durable side-effect intents that have no matching completion event after a restart.
  • Replays ordinary history with effects disabled, then persists and dispatches bounded EffectRetry envelopes only after the EffectsEnabled fence.
  • Routes retries to compute, document publishing, registry writing, Interfold writing, and slashing actors with completion-aware deduplication.
  • Adds on-chain preflight checks so already-finalized ticket, committee, failure-refund, publication, and slashing operations are treated safely.
  • Documents the updated actor and lifecycle flows.

Recovery flow

  1. Scan each aggregate event log from sequence 1 in bounded pages.
  2. Pair recoverable effect intents with their semantic completion events.
  3. Keep only unmatched locally originated intents, subject to count and memory bounds.
  4. Restore actor state while side effects remain disabled.
  5. Cross the EffectsEnabled fence, then persist and dispatch retry envelopes in bounded batches.
  6. Publish historical events and complete synchronization normally.

This covers the reported crash case where multiple blockchain-write intents were persisted but only some completion events reached the log.

Validation

  • cargo check --workspace --all-targets --locked
  • cargo clippy -p e3-events -p e3-sync -p e3-evm -p e3-multithread -p e3-net --all-targets --locked -- -D warnings
  • cargo fmt --all -- --check
  • 343 focused Rust tests across the affected crates
  • Full pre-push lint, license, package-manager, and committee-consistency hooks

Closes #1326

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
crisp Ready Ready Preview, Comment Jul 15, 2026 10:08am
interfold-dashboard Ready Ready Preview, Comment Jul 15, 2026 10:08am
interfold-docs Ready Ready Preview, Comment Jul 15, 2026 10:08am

Request Review

@hmzakhalid
hmzakhalid force-pushed the fix/1326-incomplete-effects branch from d76e99c to 9d2d8b5 Compare July 15, 2026 10:07
@hmzakhalid
hmzakhalid marked this pull request as draft July 15, 2026 10:12
@hmzakhalid hmzakhalid changed the title fix(sync): recover incomplete effects after restart [skip-line-limit] fix(sync): recover incomplete effects after restart WIP [skip-line-limit] Jul 15, 2026
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.

Open request edgecase: detect incomplete events

1 participant