-
Notifications
You must be signed in to change notification settings - Fork 3
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
Incorporate confirmation depth into the derivation pipeline #93
Conversation
This allows these parameters to be piped all the way through the engine, and thus accessed from the derivation pipeline.
Codecov Report
@@ Coverage Diff @@
## integration #93 +/- ##
===============================================
+ Coverage 45.19% 45.57% +0.37%
===============================================
Files 178 178
Lines 7330 7337 +7
Branches 1161 1161
===============================================
+ Hits 3313 3344 +31
+ Misses 3894 3867 -27
- Partials 123 126 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
7cdc2aa
to
db30ffc
Compare
db30ffc
to
4e0cca8
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.
Changes look good, but I'm getting the following error when I try pulling the latest images. (cd ops-bedrock; docker compose pull). Not sure whether its related to these changes.
WARNING: Some service image(s) must be built from source by running:
docker compose build op_stack_go_builder
1 error occurred:
* Error response from daemon: manifest for us-docker.pkg.dev/oplabs-tools-artifacts/images/op-stack-go:devnet not found: manifest unknown: Failed to fetch "devnet"
Devnet is working fine locally 👍
I'm not getting that error. Can you try the same command on |
Still not able to pull it, but I'm seeing the same issue on |
Scary diff, but it's almost entirely plumbing. The crux of the change is in
EspressoL1Origin
. We simply subtractEspressoL1ConfDepth
from the suggested L1 origin and then proceed as normal.Plumbing: I had to add the new parameter to both
SystemConfig
andL1Block
(the latter because the magic L1 block info transaction is used to reconstruct theSystemConfig
viaPayloadToSystemConfig
in the derivation pipeline). For each of those contracts, the new parameter led to a "stack too deep" error, so I had to pull function parameters out into structs, which led to a lot of changes in the contract tests.I also changed the way we pass information into
CheckBatchEspresso
, which actually reduced plumbing: instead of passingusingEspresso
all through the derivation pipeline, we fetch theSystemConfig
(which we now need anyways) in the batch queue just before callingCheckBatch
. We then use theSystemConfig
both to determine whether we are in Espresso mode and to get the value ofEspressoL1ConfDepth
.Finally, instead of passing a function to retrieve the next L1 block into
EspressoL1Origin
, we now pass a generalL1BlockRefByNumberFetcher
. This allowsEspressoL1Origin
to be more careful about fetching only what is needed, to return a more usefulL1BlockRef
instead of just a block number, and to better encapsulate the business logic. Without this, we would need to adjust the suggested block number byEspressoL1ConfDepth
at the call site (two places), since before this change the suggestedL1BlockRef
was fetched at the call site.Testing: there are new unit tests, for acceptance and rejection, for the new logic in
CheckBatchEspresso
. I configured the first Espresso devnet to use conf depth 3 and the second to use conf depth 0, so we are testing both cases. This also means the e2e tests run with conf depth 3, since they use the config from the first devnet. I have also tested the devnet locally with conf depth 10. For that to work, I had to change the deposit waiting period from 12s to 36s for the ERC-20 deposit test, since all processing of deposit transactions is lagging by at least 10 L1 blocks (30s).Depends on EspressoSystems/op-geth#12
Closes #81