-
Notifications
You must be signed in to change notification settings - Fork 620
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
feat(relayer): adapt to CodecV7 for EuclidV2 #1583
base: omerfirmak/euclid-prover
Are you sure you want to change the base?
Conversation
…submit multiple batches in a single transaction
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…ntextID logic to support multiple batches by concatenating batch hashes
return | ||
} | ||
|
||
dbParentBatch, err = r.batchOrm.GetBatchByIndex(r.ctx, dbBatch.Index-1) |
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.
Most of these batches are already in memory (dbBatches
).
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.
changed to use dbBatches
except for i==0
in 5a479c3
|
||
r.metrics.rollupL2RelayerCommitBlockHeight.Set(float64(maxBlockHeight)) | ||
r.metrics.rollupL2RelayerCommitThroughput.Add(float64(totalGasUsed)) | ||
r.metrics.rollupL2RelayerProcessPendingBatchSuccessTotal.Add(float64(len(batchesToSubmit))) |
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.
Might also want to monitor the time series of len(batchesToSubmit)
(to see average submission).
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.
done in 5a479c3
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## omerfirmak/euclid-prover #1583 +/- ##
============================================================
- Coverage 42.09% 41.80% -0.29%
============================================================
Files 222 222
Lines 17739 17840 +101
============================================================
- Hits 7467 7458 -9
- Misses 9568 9669 +101
- Partials 704 713 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f277483
to
e324f2a
Compare
e324f2a
to
f4e17bc
Compare
@@ -378,11 +378,194 @@ func (r *Layer2Relayer) ProcessGasPriceOracle() { | |||
// ProcessPendingBatches processes the pending batches by sending commitBatch transactions to layer 1. | |||
func (r *Layer2Relayer) ProcessPendingBatches() { | |||
// get pending batches from database in ascending order by their index. | |||
dbBatches, err := r.batchOrm.GetFailedAndPendingBatches(r.ctx, 5) | |||
dbBatches, err := r.batchOrm.GetFailedAndPendingBatches(r.ctx, max(5, r.cfg.SenderConfig.BatchSubmission.MaxBatches)) |
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.
Should we remove 5, and use config value only?
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.
done in fbc14ac. also added some sanity checks on startup to make sure it is always set to at least 1
…o feat/use-codec-v6
ed93b96
to
e27ab5a
Compare
Co-authored-by: jonastheis <4181434+jonastheis@users.noreply.github.com>
Purpose or design rationale of this PR
This PR implements changes according to
CodecV7
forEuclidV2
. Depends on scroll-tech/da-codec#33CodecV7
min
andmax
batches in combination withtimeout
PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
Deployment tag versioning
Has
tag
incommon/version.go
been updated or have you addedbump-version
label to this PR?Breaking change label
Does this PR have the
breaking-change
label?