-
Notifications
You must be signed in to change notification settings - Fork 9
feat: make customize easy #239
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
base: master
Are you sure you want to change the base?
Conversation
lightsing
commented
Dec 4, 2025
- make submodules group scroll public inputs
- expose public inputs api, refactor pi hash api using default trait implementation
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.
Pull request overview
This PR restructures the public inputs API to improve customization by organizing Scroll-specific public input types under a scroll submodule and exposing a cleaner API surface. The refactoring separates the encoding of public inputs from their hashing, using default trait implementations for the hash functions.
Key Changes:
- Moved Scroll-specific public input types (
batch,bundle,chunk) into a newpublic_inputs::scrollsubmodule - Renamed methods from
pi_hash_*topi_*to return raw encoded bytes instead of hashes, with hash computation moved to default trait implementations - Updated all import paths throughout the codebase to reference the new
public_inputs::scroll::*locations
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/types/base/src/public_inputs/scroll.rs | New module file exposing batch, bundle, and chunk submodules |
| crates/types/base/src/public_inputs.rs | Added pi() method to traits with default pi_hash() implementations using keccak256 |
| crates/types/base/src/public_inputs/scroll/chunk.rs | Refactored methods to return Vec<u8> instead of B256, changed cloned() to copied() |
| crates/types/base/src/public_inputs/scroll/bundle.rs | Refactored methods to return Vec<u8>, removed redundant pi_hash_euclidv2() method |
| crates/types/base/src/public_inputs/scroll/batch.rs | Refactored methods to return Vec<u8> instead of B256 |
| crates/types/src/lib.rs | Updated imports to use public_inputs::scroll::* paths |
| crates/types/chunk/src/scroll/*.rs | Updated imports to reference new module structure |
| crates/types/bundle/src/witness.rs | Updated imports to reference new module structure |
| crates/types/batch/src/*.rs | Updated imports throughout batch types to reference new module structure |
| crates/circuits/*/src/circuit.rs | Updated imports in circuit files to reference new module structure |
| crates/integration/tests/bundle_circuit.rs | Updated test to use PublicInputs trait and tuple-based API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
running e2e making sure it's ok |
noel2004
left a comment
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.
LGTM