optimism icon indicating copy to clipboard operation
optimism copied to clipboard

Persist RethDB instance in the `RethDBReceiptsFetcher`

Open sebastianst opened this issue 1 year ago • 6 comments

Description

This is a follow-up to #8130, where the rethdb receipts fetcher was encapsulated in its own type RethDBReceiptsFetcher. This allows us now to persist a database instance/handle. The instance would replace the dbPath string field. It still needs to be determined how to persist the instance, since the rethdb fetcher currently opens the database on the fly on every request, and then throws away the db instance. We probably need to create a function rdb_open_db that returns a pointer to the instance as an unsafe Go pointer or so. And rdb_read_receipts would then receive this pointer instead of the db path string.

Testing

Existing tests should be adapted and extended where appropriate.

sebastianst avatar Nov 21 '23 17:11 sebastianst

Hi, @sebastianst. Is this issue still open? If so, I'd like to work on this. I saw this issue mentioned in #8130, and it's not assigned to anyone yet.

AryanGodara avatar Jan 04 '24 09:01 AryanGodara

@AryanGodara it's still up for grabs! Note that there's a somewhat related PR https://github.com/ethereum-optimism/optimism/pull/8187 but not sure if @Inphi still wants to complete it.

sebastianst avatar Jan 05 '24 19:01 sebastianst

@AryanGodara it's still up for grabs! Note that there's a somewhat related PR #8187 but not sure if @Inphi still wants to complete it.

I see, I'm going through #8187 , and if there's no update from @Inphi , I'll start working on this asap. Will keep you updated :)

AryanGodara avatar Jan 06 '24 08:01 AryanGodara

@AryanGodara Confirmed with @Inphi that his work is not blocking or interfering much with this issue, so feel free to get started 🚀

sebastianst avatar Jan 06 '24 14:01 sebastianst

@AryanGodara Confirmed with @Inphi that his work is not blocking or interfering much with this issue, so feel free to get started 🚀 That's great, I'll start working on this now! Can you point me in the right direction on where I should begin? (if there are any pointers/hints)

AryanGodara avatar Jan 07 '24 14:01 AryanGodara

Hi, @sebastianst, I have submitted a PR for this issue https://github.com/ethereum-optimism/optimism/pull/9349. I used an another solution.

Nickqiaoo avatar Feb 05 '24 09:02 Nickqiaoo