-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(storage)!: not save event_offset in the events table #2062
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2062 +/- ##
=======================================
Coverage 69.01% 69.02%
=======================================
Files 130 130
Lines 17426 17447 +21
Branches 17426 17447 +21
=======================================
+ Hits 12026 12042 +16
- Misses 4068 4069 +1
- Partials 1332 1336 +4 ☔ View full report in Codecov by Sentry. |
dd02e36
to
e681ab9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 5 files at r1, all commit messages.
Reviewable status: 2 of 5 files reviewed, 4 unresolved discussions (waiting on @DvirYo-starkware and @ShahakShama)
a discussion (no related file):
Please check and add TODO in case we don't really need the capability of iterating by more than one contract.
crates/papyrus_storage/src/body/events.rs
line 144 at r2 (raw file):
txn: &'txn DbTransaction<'env, RO>, file_handles: &'txn FileHandlers<RO>, // This value is the next event to return. If it is None there are no more events.
Please rephrase better
Also, rename to something along next_entry_in_event_table
Code quote:
// This value is the next event to return. If it is None there are no more events.
crates/papyrus_storage/src/body/events.rs
line 151 at r2 (raw file):
cursor: EventsTableCursor<'txn>, transaction_metadata_table: TransactionMetadataTable<'env>, current_event_index: usize,
This is the offset in the transaction output, right?
Code quote:
current_event_index
crates/papyrus_storage/src/body/events.rs
line 321 at r2 (raw file):
transaction_metadata_table, current_event_index: key.1.1.0, current_contract_address: key.0,
Should be taken from current?
Code quote:
current_contract_address: key.0,
62279b7
to
a30febc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 5 files reviewed, 3 unresolved discussions (waiting on @ShahakShama)
crates/papyrus_storage/src/body/events_test.rs
line 22 at r1 (raw file):
let from_addresses = vec![ContractAddress(patricia_key!("0x22")), ContractAddress(patricia_key!("0x23"))]; let block = get_test_block(4, Some(5), Some(from_addresses), None);
added more blocks for the test for more coverage
crates/papyrus_storage/src/body/events_test.rs
line 100 at r3 (raw file):
EventIndexInTransactionOutput(2), ); let txn = storage_reader.begin_ro_txn().unwrap();
fix the bug in the test also for the event iter by index test
621a8d9
to
b15362a
Compare
b15362a
to
f164dbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r6, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ShahakShama)
This change is