Repository navigation
fix(ledger): publish transaction data and indexes atomically - #1782
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesLedger transaction publication
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~15 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The transaction-publication change is mergeable after normal checks; no actionable merge-blocking issue was identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
redsuite: PR vs masterSingle-run diff on shared runners — indicative only; statistical verdicts come from Bencher thresholds. |
|
| Project | magicblock-labs |
| Branch | dode/fix-signature-publication |
| Testbed | blacksmith-8vcpu-ubuntu-2404 |
🐰 View full continuous benchmarking report in Bencher
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
What changed
Summary
An address signature could become visible before its transaction bytes were persisted, causing a concurrent
getTransactionlookup to return null and the TEE filter to omit the signature. Publish transaction bytes, metadata, and slot/address indexes in one atomic RocksDB write batch, then advance cached counts after the write succeeds.Closes #1781
Impact
Breaking Changes
None. Storage keys, serialization, RPC behavior, and permission checks retain their existing formats and semantics. The change removes the partial-publication window without retries. It replaces individual database writes with batch construction and buffering; sustained throughput and allocation changes have not been benchmarked.
Reviewer notes
Test Plan
The concurrent regression requires every newly indexed signature to resolve to complete transaction bytes and matching status, and checks cached counts. The former status-only helper is now test-only for fixtures that deliberately construct incomplete index/status records. The affected invariant is that accepted transactions have a durable, queryable outcome; slot/index ordering and serialization are preserved.
The local reproduction submits valid noops with the queried account writable before 90 readonly accounts and polls signatures and transactions concurrently. This exercises the publication window through the original filter without injected RPC failures. Raw upstream responses from the deployed TEE remain unavailable.