Skip to content

Comments

bedrock batch derivation v2#2714

Closed
protolambda wants to merge 90 commits intodevelopfrom
batch-deriv-v2
Closed

bedrock batch derivation v2#2714
protolambda wants to merge 90 commits intodevelopfrom
batch-deriv-v2

Conversation

@protolambda
Copy link
Contributor

@protolambda protolambda commented Jun 8, 2022

Work in progress, see Batch derivation v2 doc.

@changeset-bot
Copy link

changeset-bot bot commented Jun 8, 2022

⚠️ No Changeset found

Latest commit: 80ee8ac

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mergify
Copy link
Contributor

mergify bot commented Jun 8, 2022

This PR changes implementation code, but doesn't include a changeset. Did you forget to add one?

@mergify mergify bot requested review from Inphi and mslipper June 8, 2022 11:39
@protolambda protolambda changed the title bedrock inwards/outwards batch deriv draft v2 bedrock batch derivation v2 Jun 13, 2022
@protolambda protolambda changed the base branch from develop to bedrock-test-utils June 13, 2022 14:02
@protolambda
Copy link
Contributor Author

Blocked by #2761

Remaining TODOs (roughly):

  • swap new channel emitter for previous batch building in node API
  • finish BatchQueue to derive l2 attributes without full window contents
    • Alternative: buffer a full window, and make it stream later
  • finish integration into driver, to read the L1 inputs into the new pipeline of things

Base automatically changed from bedrock-test-utils to develop June 13, 2022 16:25
@mergify
Copy link
Contributor

mergify bot commented Jun 13, 2022

Hey @protolambda! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Jun 13, 2022
@mergify mergify bot removed the conflict label Jun 13, 2022
// if we fail to fetch the L1 data, simply not update the derivation pipeline yet,
// we'll hit an EOF later again and retry.
} else if err != nil {
// TODO: maybe make the log less scary if it failed because of a L1 reorg.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO in error handling code (Line 396)

⚪️ This finding does not block your pull request.
🙈 From dgryski.semgrep-go.errtodo.err-todo.

@mergify
Copy link
Contributor

mergify bot commented Jun 17, 2022

Hey @protolambda! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Jun 17, 2022
@mergify
Copy link
Contributor

mergify bot commented Jun 27, 2022

Hey @protolambda! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Jun 27, 2022
protolambda and others added 2 commits June 28, 2022 00:19
This commits a batch to a specific L1 origin block by hash rather
than just by number. This help in the case of L1 reorgs by stopping
batches from being applied in weird ways.
progress := s.derivation.Progress() // TODO: add conf depth
if progress.Origin != s.l1Head || !progress.Closed {
s.log.Warn("not creating block, node is not synced", "progress_origin", progress.Origin, "progress_closed", progress.Closed, "head_l1", s.l1Head)
if !s.idleDerivation {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the logic is right, but the name is kinda feels like a double negative with this check & is a little confusing.

protolambda and others added 3 commits June 28, 2022 17:18
The batcher is still very simple generating a new channel full of
L2 blocks since the last channel that it created, but it is just
a tad smarter now in that if will handle the case of multiple frames
per channel.

This is the bare minimum functionality to handle happy case batching
on a real network. The only other thing that it can't handle is
reorgs, but it can now handle very larger L2 transactions and blocks.
@protolambda
Copy link
Contributor Author

Closing in favor of #2871

theochap pushed a commit that referenced this pull request Dec 10, 2025
Closes #2714 and #2713 

Dashboard preview:

<img width="1845" height="281" alt="Screenshot 2025-08-20 at 15 43 45"
src="https://github.com/user-attachments/assets/101c7cb2-f900-40fa-b708-6277930d11e2"
/>

This should also work with other Kona services.
theochap pushed a commit that referenced this pull request Jan 14, 2026
Closes #2714 and #2713 

Dashboard preview:

<img width="1845" height="281" alt="Screenshot 2025-08-20 at 15 43 45"
src="https://github.com/user-attachments/assets/101c7cb2-f900-40fa-b708-6277930d11e2"
/>

This should also work with other Kona services.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants