Skip to content

feat: derivation pipeline#40

Merged
greged93 merged 24 commits into
mainfrom
feat/derivation-pipeline
Apr 2, 2025
Merged

feat: derivation pipeline#40
greged93 merged 24 commits into
mainfrom
feat/derivation-pipeline

Conversation

@greged93
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

@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.

Comment thread crates/codec/src/decoding/batch.rs Outdated
Comment thread crates/derivation-pipeline/src/lib.rs
Comment thread crates/l1/src/abi/calls.rs
Copy link
Copy Markdown
Contributor

@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 thread crates/codec/src/block.rs Outdated
Comment thread crates/codec/src/decoding/batch.rs
Comment thread crates/codec/src/decoding/batch.rs Outdated
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
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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

Comment thread crates/codec/src/decoding/batch.rs Outdated
Comment thread crates/codec/src/decoding/payload.rs Outdated
Comment thread crates/codec/src/decoding/v0/batch_header.rs
Comment thread crates/codec/src/decoding/v1/batch_header.rs
Comment thread crates/codec/src/decoding/v1/batch_header.rs Outdated
Comment thread crates/codec/src/decoding/v3/batch_header.rs
Copy link
Copy Markdown
Contributor

@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
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