op-program: Implement oracle backed database#5349
Conversation
|
✅ Deploy Preview for opstack-docs canceled.
|
a8291ac to
4dbc7b0
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #5349 +/- ##
===========================================
- Coverage 38.84% 35.28% -3.56%
===========================================
Files 394 240 -154
Lines 26345 21890 -4455
Branches 838 0 -838
===========================================
- Hits 10233 7724 -2509
+ Misses 15331 13421 -1910
+ Partials 781 745 -36
Flags with carried forward coverage won't be shown. Click here to find out more.
|
4dbc7b0 to
1f24cc1
Compare
3640864 to
c09dd88
Compare
protolambda
left a comment
There was a problem hiding this comment.
LGTM, but the prefix check looks unsafe, so I'll mark this as request-changes for now. If it's actually safe this way then a comment would help for later readers.
Adds separate oracle method to access code by hash to support the way Geth now adds a prefix to the hash when storing new code values in the database.
c09dd88 to
421d487
Compare
|
This PR has been added to the merge queue, and will be merged soon. |
|
This PR is next in line to be merged, and will be merged as soon as checks pass. |
1 similar comment
|
This PR is next in line to be merged, and will be merged as soon as checks pass. |
Description
Adds an implementation of
ethdb.KeyValueStoresufficient to be used for block processing.Also adds separate oracle method to access code by hash to support the way Geth now adds a prefix to the hash when storing new code values in the database.
Removed the context from oracle methods and stored one as a property in the fetcher implementation. This isn't the typical golang pattern but it fits better here as we'll need to support a fully synchronous, local execution mode where having a context doesn't make sense and a context isn't passed into the
ethdb.KeyValueStoremethods.Tests
Tested the database adapter methods directly for low lever behaviour, as well as a backing for an op-geth statedb to ensure the database behaviour is compatible with the real code using it.
Metadata