Skip to content

apollo_storage: separate events from TransactionOutput#13462

Open
MohammadNassar1 wants to merge 2 commits intomohammad/apollo-storage/events-tablefrom
mohammad/apollo-storage/separate-events-api
Open

apollo_storage: separate events from TransactionOutput#13462
MohammadNassar1 wants to merge 2 commits intomohammad/apollo-storage/events-tablefrom
mohammad/apollo-storage/separate-events-api

Conversation

@MohammadNassar1
Copy link
Contributor

@MohammadNassar1 MohammadNassar1 commented Mar 25, 2026

Summary

  • Removes events field from all TransactionOutput variant structs
  • Adds transaction_events: Vec<Vec<Event>> to BlockBody
  • Adds public append_events and revert_events methods to BodyStorageWriter
  • Extracts event writing from append_body into append_events
  • Updates all callers: central_sync, p2p_sync, rpc, reverts, protobuf converters

Stacked on #13461

Test plan

  • All apollo_storage tests pass
  • All downstream crates build

🤖 Generated with Claude Code


Note

Medium Risk
Touches core storage write/revert paths and multiple sync/RPC call sites to persist and fetch events separately; bugs could cause missing events or marker inconsistencies during sync or reorgs.

Overview
Separates transaction events from receipts/TransactionOutput by adding transaction_events to starknet_api::BlockBody and removing per-variant events fields.

Updates apollo_storage to write and revert events via new BodyStorageWriter::append_events/revert_events methods (with independent event markers and a transaction_events table), and updates central sync, p2p sync, RPC receipt construction, state sync, and tests to call these APIs and read events from storage instead of TransactionOutput.

Written by Cursor Bugbot for commit b1883b1. This will update automatically on new commits. Configure here.

MohammadNassar1 and others added 2 commits March 25, 2026 11:30
Events are now written to a dedicated transaction_events table in addition
to the events index table. Event iterators read from the new table instead
of deserializing transaction outputs from mmap files. This eliminates
redundant file I/O during event iteration and prepares for separating
events from TransactionOutput in a follow-up change.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@reviewable-StarkWare
Copy link

This change is Reviewable

@github-actions
Copy link

Artifacts upload workflows:

@MohammadNassar1 MohammadNassar1 force-pushed the mohammad/apollo-storage/events-table branch 3 times, most recently from 43aefd3 to 2f4f67d Compare March 25, 2026 17:01
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.

2 participants