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

fix(proposer): submission interval #279

Merged
merged 6 commits into from
Dec 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
split range basic
ratankaliani committed Dec 13, 2024
commit f7a7ca6fcf88961d1863ce351f77cfe4342637fc
33 changes: 16 additions & 17 deletions proposer/op/proposer/range.go
Original file line number Diff line number Diff line change
@@ -185,25 +185,24 @@ func (l *L2OutputSubmitter) GetRangeProofBoundaries(ctx context.Context) error {
// Note: Originally, this used the L1 finalized block. However, to satisfy the new API, we now use the L2 finalized block.
newL2EndBlock := status.FinalizedL2.Number

// Check if the safeDB is activated on the L2 node. If it is, we use the safeHead based range
// splitting algorithm. Otherwise, we use the simple range splitting algorithm.
safeDBActivated, err := l.isSafeDBActivated(ctx, rollupClient)
if err != nil {
l.Log.Warn("safeDB is not activated. Using simple range splitting algorithm.", "err", err)
}

var spans []Span
// If the safeDB is activated, we use the safeHead based range splitting algorithm.
// Otherwise, we use the simple range splitting algorithm.
spans = l.SplitRangeBasic(newL2StartBlock, newL2EndBlock)
if safeDBActivated {
safeHeadSpans, err := l.SplitRangeBasedOnSafeHeads(ctx, newL2StartBlock, newL2EndBlock)
if err == nil {
spans = safeHeadSpans
} else {
l.Log.Warn("failed to split range based on safe heads, using basic range splitting", "err", err)
}
}
spans := l.SplitRangeBasic(newL2StartBlock, newL2EndBlock)

// // Check if the safeDB is activated on the L2 node. If it is, we use the safeHead based range
// // splitting algorithm. Otherwise, we use the simple range splitting algorithm.
// safeDBActivated, err := l.isSafeDBActivated(ctx, rollupClient)
// if err != nil {
// l.Log.Warn("safeDB is not activated. Using simple range splitting algorithm.", "err", err)
// }
// if safeDBActivated {
// safeHeadSpans, err := l.SplitRangeBasedOnSafeHeads(ctx, newL2StartBlock, newL2EndBlock)
// if err == nil {
// spans = safeHeadSpans
// } else {
// l.Log.Warn("failed to split range based on safe heads, using basic range splitting", "err", err)
// }
// }


// Add each span to the DB. If there are no spans, we will not create any proofs.