Fix ordered multichain regression introduced in 2.30.0 - #771
Conversation
…k-duplicate-history-bug
WalkthroughAdjusts ordered batch preparation to request one ready item per chain iteration. Adds a new E2E test for ordered multichain event ordering. Introduces comprehensive rollback tests for unordered (skipped) and ordered multichain indexers, verifying histories and rollback behavior across chains. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant I as Ordered Multichain Indexer
participant FS as FetchState
participant C1 as Chain A
participant C2 as Chain B
participant DB as Storage
rect rgb(240,248,255)
note over I: Prepare ordered batch
loop per-iteration
I->>FS: getReadyItemsCount(fromItem, targetSize=1)
alt Item ready on Chain A
I->>C1: Fetch next ready item
C1-->>I: Item A_i
else Item ready on Chain B
I->>C2: Fetch next ready item
C2-->>I: Item B_j
end
I->>DB: Append item to batch (ordered)
end
end
note over I,DB: Commit batch preserving cross-chain order
I->>DB: Write batch and histories
DB-->>I: Ack
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (2)**/*.{res,resi}📄 CodeRabbit inference engine (.cursor/rules/rescript.mdc)
Files:
**/*.res📄 CodeRabbit inference engine (.cursor/rules/navigation.mdc)
Files:
🧠 Learnings (1)📚 Learning: 2025-05-27T17:07:12.878ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
Bug Fixes
Tests