-
Notifications
You must be signed in to change notification settings - Fork 156
wip: make rollup creator support customda feature #361
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b0462fc to
d5cb4a1
Compare
d5cb4a1 to
de204ba
Compare
gzeoneth
added a commit
that referenced
this pull request
Nov 14, 2025
* Add CustomDA proof validation interface and reference implementation - Introduce ICustomDAProofValidator interface for extensible DA proof validation - Implement ReferenceDAProofValidator with hash verification and chunk extraction - Integrate CustomDA validation into OneStepProverHostIo for preimage type 3 - Add comprehensive test coverage for reference validator implementation * format: yarn format * fix: 0x01 * wip: use create2 for factory deployment * remove key from config * fmt * fix signatures * refactor: make OneStepProverHostIo validator immutable * test: storage and 4bytes * test: simple CustomDAProof test * chore: restore file * fix: triage slither * inline up exec deployment * chore: move file to foundry test folder * salt length check * update tests * fmt * remove SetTemplatesArgs struct * remove ownership from bridge creator * add CREATE2_FACTORY env and deployment instructions * fix signatures * factory owner as deployAllContracts arg * set deployer as owner in local deployment * chore: disable metahash and align hardhat foundry (#363) * disable CBOR * chore: remove entries for removed files * refactor: commonSetting * feat: foundry override * fix: test * chore: default profile * format: yarn format * ci: comapre bytecodes * fix: slither db --------- Co-authored-by: gzeon <im@gzeon.dev> * fix: deploy create2 factory for local deployment * fix: wait for funding * ci: use geth-allow-pre155 * fix: _uint256ToAddress helper * test: fix ReferenceDAProofValidatorTest * fix: 4bytes and storage * wip: make rollup creator support customda feature (#361) * feat: rollup creator support custom osp * fix: slither and typo * Add CUSTOM_DA_MESSAGE_HEADER_FLAG support * Cert is part of the customda proof * Make certificate part of verioned proof * format: yarn format * test: fix ReferenceDAProofValidatorTest * chore: include customOsp in example config * fix: add customOsp to scripts * fix: createRollup * test: fix sig --------- Co-authored-by: Tristan Wilson <twilson@offchainlabs.com> * Check certKeccak against proven hash in memory * Move cert into standardized part of OSP validation * Simplify CustomDA proof format and fix stack depth error This commit removes redundant certHash and offset from the proof data, since they are part of the instruction parameters, which are proven. The certificate is checked against the proven hash (leafContents). Also work around stack too depth limit in ReferenceDAProofValidator. * format: yarn format * test: fix * test: refactor * test: add more coverage * Add ValidatePreimage inst for CustomDA cert val OSP - Add new ValidatePreimage instruction that validates CustomDA certificates - Update ICustomDAProofValidator interface to pass full proof to validateCertificate for extensibility - Implement certificate validation in ReferenceDA, just checking a simple version byte as an example - OSP verifies prover's validity claim matches DA provider's validation result * feat: add trusted signer validation to ReferenceDAProofValidator Implement ECDSA signature validation for CustomDA certificates with configurable trusted signers. This demonstrates how validators can verify that certificates are signed by authorized parties before accepting them as valid. Key changes: - Add trustedSigners mapping to store authorized signer addresses - Implement signature recovery and validation in validateCertificate() - Update certificate format to include ECDSA signature components (v, r, s) - Add comprehensive tests for signature validation scenarios - Document revert vs return behavior for different validation failures * Fix hostio range * chore: disable forge lint_on_build * refactor: avoid assembly * chore: check nonzero customDAValidator * refactor: isValid * refcator: avoid more assembly * Rename VALIDATE_PREIMAGE opcode to VALIDATE_CERTIFICATE * Replace hardcoded proof offset values with constants * Return up to 32 bytes from validateReadPreimage * Move ReferenceDAProofValidator.sol out of contracts Since this is a reference implementation only, it's moved into the nitro repo under contracts-local. * Fix: Read certificate size from correct offset in validateAndCheckCertificate Bug was introduced in 44b2eb4 when refactoring from assembly. The certSize was being read from proof[0:] instead of proof[proofOffset:], causing PROOF_TOO_SHORT errors when the validator tried to use garbage data as the certificate size. * fix: foundry config * fix: inherit is default * fix: use foundry v1.3.6 * format: yarn format * chore: update slither db * chore: remove RollupDeploymentParamsLegacy --------- Co-authored-by: Henry <11198460+godzillaba@users.noreply.github.com> Co-authored-by: gzeon <hng@offchainlabs.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Deploying the OSP in the RollupCreator is not feasible due to contract size limit unless we create a OSP factory which isn't ideal either. This fits tightly into the existing rollup creator while still support legacy abi (not that important, but helpful for older sdk versions)
Including change from #358