-
Notifications
You must be signed in to change notification settings - Fork 58
apollo_l1_provider: add handling for TransactionConsumed event #7677
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
base: 05-14-refactor_apollo_l1_provider_types_change_event_transactionconsumed_to_hold_tx_hash
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
8df63df
to
c439902
Compare
22e7a2b
to
6ce36f4
Compare
c439902
to
d3f152c
Compare
538e438
to
0756c83
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 3 of 5 files at r1, all commit messages.
Reviewable status: 3 of 5 files reviewed, 1 unresolved discussion (waiting on @giladchase)
crates/apollo_l1_provider/src/transaction_manager.rs
line 317 at r1 (raw file):
} self.records.remove(tx_hash)
This returns true
if it succeeds?
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: 3 of 5 files reviewed, 1 unresolved discussion (waiting on @giladchase and @guy-starkware)
crates/apollo_l1_provider/src/transaction_manager.rs
line 317 at r1 (raw file):
Previously, guy-starkware wrote…
This returns
true
if it succeeds?
yep
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.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @giladchase)
d3f152c
to
a1ea388
Compare
0756c83
to
8fde2ec
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.
Just to verify: are you certain that the requirement was to delete the tx on consumption?
I think Lior mentioned that he doesn't want to delete txs at this point. even at the cost of an increasingly bloaty memory, given how few l1 handlers we actually get, just so we'll have some record of it passing through.
Reviewed 2 of 5 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @AlonLStarkWare)
crates/apollo_l1_provider/src/transaction_manager.rs
line 282 at r1 (raw file):
pub(crate) fn consume_tx(&mut self, tx_hash: &TransactionHash) -> bool { let Some(record) = self.records.get(tx_hash) else { warn!("Attempted to consume unknown transaction: {tx_hash:?}");
This is not necessarily a warning, it can happen shortly after starting up, where an old tx is consumed from before the point we started scraping.
Make sure to have this case present in a unit tests, and convert to debug
print with a message explaining this case, so in case it happens ppl won't be alarmed, it's part of a possible happy flow
Code quote:
warn!("Attempted to consume unknown transaction: {tx_hash:?}");
crates/apollo_l1_provider/src/l1_scraper.rs
line 121 at r1 (raw file):
L1Event::LogMessageToL2 { l1_tx_hash, .. } => Some(*l1_tx_hash), L1Event::ConsumedMessageToL2(event_data) => { debug!("Consumed message on L1 with event_data: {event_data:?}");
tx_hash
Code quote:
L1Event::ConsumedMessageToL2(event_data) => {
debug!("Consumed message on L1 with event_data: {event_data:?}");
There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. |
No description provided.