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

Check all "not found" errors #2532

Conversation

sveitser
Copy link
Contributor

Currently only the leveldb not found errors are handled. If a pebble not found error is returned by the backend it is propagated, causing the batchposter to fail to send transactions.

ERROR[07-30|07:16:29.468] failed to re-send transaction            err="couldn't get preceding tx in DataPoster to check if should send tx with nonce 142: pebble: not found" nonce=142 feeCap=32,434,520,350 tipCap=56,469,658 blobFeeCap=<nil> gas=1,586,650
...
ERROR[07-30|07:14:20.688] error posting batch                      err="pebble: not found"

We saw this error only appear recently and I believe it's because the default was changed from leveldb to pebble here

https://github.com/OffchainLabs/nitro/pull/2447/files

With this change all DB not found errors are handled the same way.

(cherry picked from commit 8506886)

Currently only the leveldb not found errors are handled. If a pebble not
found error is returned by the backend it is propagated, causing the
batchposter to fail to send transactions.

With this change all DB not found errors are handled the same way.

(cherry picked from commit 8506886)
Copy link

cla-bot bot commented Jul 30, 2024

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please sign the linked documents below to get yourself added. https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=b15c81cc-b5ea-42a6-9107-3992526f2898&env=na3&acct=6e152afc-6284-44af-a4c1-d8ef291db402&v=2

@sveitser
Copy link
Contributor Author

I signed the CLA.

@@ -61,7 +61,7 @@ func (s *Storage) Get(_ context.Context, index uint64) (*storage.QueuedTransacti
key := idxToKey(index)
value, err := s.db.Get(key)
if err != nil {
if errors.Is(err, leveldb.ErrNotFound) {
if isErrNotFound(err) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think there's an isErrNotFound in scope here. Are you sure you didn't mean dbutil.IsErrNotFound ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you're right. The code has been moved recently. I cherry picked from our fork where the function is still in this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hkalodner
Copy link
Contributor

@cla-bot check

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Jul 30, 2024
Copy link

cla-bot bot commented Jul 30, 2024

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Collaborator

@PlasmaPower PlasmaPower left a comment

Choose a reason for hiding this comment

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

LGTM

@PlasmaPower
Copy link
Collaborator

It looks like I don't have permission to push to your branch, but it'll need to be up to date with master to be merged in

@PlasmaPower
Copy link
Collaborator

Sorry about that, this needs another merge of master. I'll prioritize this PR so it should be merged next and won't need any other merges.

@PlasmaPower PlasmaPower merged commit 0a167b2 into OffchainLabs:master Jul 30, 2024
13 checks passed
@sveitser sveitser deleted the cherry-pick/fix-pebble-not-found-error branch July 31, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-approved s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants