Skip to content

feat: derivation pipeline #40

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

Merged
merged 24 commits into from
Apr 2, 2025
Merged

feat: derivation pipeline #40

merged 24 commits into from
Apr 2, 2025

Conversation

greged93
Copy link
Collaborator

@greged93 greged93 commented Mar 25, 2025

Adds the derivation pipeline to the rollup node. Builds towards #2.

Subsequent PR should:

  • Update the data model and store the raw calldata and optional blob versioned hash in database.
  • Remove the BatchInput structure.
  • Read from database and pass this to the derivation pipeline.
  • Add a BlobProvider to fetch optional blobs.

Copy link
Collaborator

@frisitano frisitano left a comment

Choose a reason for hiding this comment

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

Added some comments and questions inline.

Copy link
Collaborator

@frisitano frisitano left a comment

Choose a reason for hiding this comment

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

Looks good. Left some minor style comments inline.

Comment on lines +51 to +52
let block_messages = l1_messages_buf.get(..num_l1_messages).unwrap_or(&[]);
*l1_messages_buf = l1_messages_buf.get(num_l1_messages..).unwrap_or(&[]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

does the l1_messages_buf type have a method such as split? that would be more efficient?

Copy link
Collaborator Author

@greged93 greged93 Apr 1, 2025

Choose a reason for hiding this comment

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

I'm not 100% sure how you would use split, would you mind elaborating?
The slice type has a split iterator which you can get by calling split.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think split_at or split_at_mut would be appropriate and a little more ergonomic but this isn't a big deal.

Copy link
Collaborator Author

@greged93 greged93 Apr 2, 2025

Choose a reason for hiding this comment

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

the only issue with these methods is that they can panic

Copy link
Collaborator

@frisitano frisitano left a comment

Choose a reason for hiding this comment

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

LGTM

@greged93 greged93 merged commit ee5da91 into main Apr 2, 2025
12 checks passed
greged93 added a commit that referenced this pull request Apr 3, 2025
* feat: wip

* feat: changes to the data model

* fix: codec issue

* feat: modify derivation pipeline to fetch blob

* test: move test data to file

* fix: lints

* fix: answer comments

* test: fix migration

* feat: derivation pipeline (#40)

* test: move calldata to files

* feat: batch header decoding

* feat: improve codec interface

* chore: manifests fixes

* feat: revert some codec changes

* feat: wip derivation pipeline

* feat: batch header v7

* feat: add batch abstraction

* feat: basic derivation pipeline

* feat: implement batch data hash

* feat: move PayloadData

* feat: improve batch data hash computation

* test: derivation

* chore: cleaning

* fix: lints

* fix: lints

* fix: skip wasm for derivation pipeline

* fix: data hash computation for batch

* fix: lint

* fix: lint

* fix: lints

* fix: answer comments

* fix: lints

* fix: comments
greged93 added a commit that referenced this pull request Apr 3, 2025
* test: move calldata to files

* feat: batch header decoding

* feat: improve codec interface

* chore: manifests fixes

* feat: revert some codec changes

* feat: wip derivation pipeline

* feat: batch header v7

* feat: add batch abstraction

* feat: basic derivation pipeline

* feat: implement batch data hash

* feat: move PayloadData

* feat: improve batch data hash computation

* test: derivation

* chore: cleaning

* fix: lints

* fix: lints

* fix: skip wasm for derivation pipeline

* fix: data hash computation for batch

* fix: lint

* fix: lint

* fix: lints

* fix: answer comments

* fix: lints

* feat: integrate batch changes (#41)

* feat: wip

* feat: changes to the data model

* fix: codec issue

* feat: modify derivation pipeline to fetch blob

* test: move test data to file

* fix: lints

* fix: answer comments

* test: fix migration

* feat: derivation pipeline (#40)

* test: move calldata to files

* feat: batch header decoding

* feat: improve codec interface

* chore: manifests fixes

* feat: revert some codec changes

* feat: wip derivation pipeline

* feat: batch header v7

* feat: add batch abstraction

* feat: basic derivation pipeline

* feat: implement batch data hash

* feat: move PayloadData

* feat: improve batch data hash computation

* test: derivation

* chore: cleaning

* fix: lints

* fix: lints

* fix: skip wasm for derivation pipeline

* fix: data hash computation for batch

* fix: lint

* fix: lint

* fix: lints

* fix: answer comments

* fix: lints

* fix: comments
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