Skip to content
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

filter out irrelevant l1 txs, before sending into the enclave #2006

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

tudor-malene
Copy link
Collaborator

Why this change is needed

We have a memory leak which kills our node every few days on sepolia.
Upon investigation, it turns out there is a memory leak inside RLP decoding when submitting a sepolia block. More specifically when decoding the L1 transactions.
We only need very few L1 transactions inside the enclave, and we are sending all of them.

What changes were made as part of this PR

Filter out transactions that are irrelevant before submitting an L1 block to the enclave.

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

@@ -425,6 +425,15 @@ func (g *Guardian) submitL1Block(block *common.L1Block, isLatest bool) (bool, er
g.submitDataLock.Unlock() // lock must be released before returning
return false, fmt.Errorf("could not fetch obscuro receipts for block=%s - %w", block.Hash(), err)
}
// only submit the relevant transactions to the enclave
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only material change in this pr

Copy link
Contributor

@StefanIliev545 StefanIliev545 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tudor-malene tudor-malene merged commit e30e4ea into main Aug 5, 2024
2 checks passed
@tudor-malene tudor-malene deleted the tudor/filter_out_irrelevant_txs branch August 5, 2024 08:19
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