-
Notifications
You must be signed in to change notification settings - Fork 154
release: v3.2.0 #395
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: main
Are you sure you want to change the base?
release: v3.2.0 #395
Conversation
* wip: use create2 for factory deployment * remove key from config * fmt * fix signatures * inline up exec deployment * 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 <[email protected]> * fix: deploy create2 factory for local deployment * fix: wait for funding * ci: use geth-allow-pre155 * fix: _uint256ToAddress helper * fix: deploy4844 script * fix: apply review comments --------- Co-authored-by: gzeon <[email protected]>
* fix: disable linting on yul only build * chore: disable forge lint_on_build for all profile --------- Co-authored-by: gzeon <[email protected]>
…for custom network deployments (#383) * Add instructions for factory and chain deployments, and small tweaks for custom network deployments * Format * Add important admonition at the beginning of the doc
chore: fix foundry
…onstraint-pricer Add precompile interfaces for Multi-Constraint Pricer
* chore: use arbos 41 precompiles pin * chore: use arbos 41 precompiles pin * chore: use proper v41 pin
* Rename empty genesis assertion hash function * Add comment on genesisAssertionHash
…sional-multi-constraint-pricer Precompiles for Multi-Dimensional Multi-Constraint Pricer
* docs: update instructions to deploy rollups * Update docs/deployment.md --------- Co-authored-by: gzeon <[email protected]>
* 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: gzeon <[email protected]>
* Set optional dataCostEstimate on rollup initialization * Format * Add new parameter to deployment scripts * ci: contnue on error for upload 4bytes * chore: update 4bytes * Update src/rollup/Config.sol --------- Co-authored-by: gzeon <[email protected]> Co-authored-by: gzeon <[email protected]>
* wip: use create2 for factory deployment * remove key from config * fmt * fix signatures * inline up exec deployment * 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 <[email protected]> * fix: deploy create2 factory for local deployment * fix: wait for funding * ci: use geth-allow-pre155 * fix: _uint256ToAddress helper * fix: deploy4844 script * test: fix offset and l1 gas * feat: deployOneStepProofEntry * feat: deployOsp script * fix: apply review comments * chore: remove inherit * fix: missing param * fix: audit ci --------- Co-authored-by: Henry <[email protected]>
* chore: checkout resource-constrait-precompiles * wip: PricingManager * chore: rename ResourceConstraintManager * fix: use proper interface * fix: nConstraints * feat: ResourceConstraintManager.revoke * feat: startingBacklogValue must be 0 * chore: better error * chore: manager * test: ResourceConstraintManagerTest * feat: added pricing exponent check and tests * style: formatting * fix: remove unused error * test: fixed failing test * test: added better revert check --------- Co-authored-by: Chris Buckland <[email protected]>
* feat: added base stake reduction with additional check * style: formatting * test: move missing rollup tests into foundry * test: Added tests for setting base stake * refactor: simplify confirmed stakers check * doc: clarified comment about permissioned stakrs * style: formatting * feat: separate increase/decrease base stake and added additional checks and tests for them * feat: remove getAllStakers public function and instead make stakerlist internal * chore: remove unused comment * fix: yarn format * chore: remove redundent import * chore: update slither db * chore: update 4bytes * refactor: use getStakerAddress * chore: avoid shadowing * chore: keep getStaker external --------- Co-authored-by: gzeon <[email protected]> Co-authored-by: gzeon <[email protected]>
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 release (v3.2.0) introduces several significant enhancements to the nitro-contracts repository, focusing on improved deployment processes, custom data availability support, and resource management capabilities.
Key changes:
- Added CustomDA proof validation interface and implementation for alternative data availability solutions
- Introduced ResourceConstraintManager for gas pricing constraint management
- Implemented base stake adjustment mechanisms (increase/decrease) with safety checks for permissioned chains
- Migrated to deterministic CREATE2 deployments for all factory contracts
- Enhanced rollup initialization with optional data cost estimation
Reviewed Changes
Copilot reviewed 69 out of 71 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/osp/OneStepProverHostIo.sol | Added CustomDA validator support with certificate validation and preimage reading |
| src/osp/ICustomDAProofValidator.sol | New interface for custom data availability proof validators |
| src/rollup/RollupAdminLogic.sol | Split setBaseStake into increaseBaseStake and decreaseBaseStake with additional safety checks |
| src/rollup/RollupCreator.sol | Added constructor with initial setup and customOsp parameter support |
| src/rollup/BridgeCreator.sol | Removed Ownable inheritance and update functions |
| src/rollup/ValidatorWalletCreator.sol | Simplified to immutable template without owner management |
| src/chain/ResourceConstraintManager.sol | New contract for managing gas pricing constraints with time-based expiry |
| scripts/deploymentUtils.ts | Enhanced with CREATE2 support and consolidated OneStepProof deployment |
| test/foundry/Rollup.t.sol | Updated tests for new base stake adjustment functions |
| test/foundry/OneStepProverHostIo.t.sol | Comprehensive tests for CustomDA proof validation |
Comments suppressed due to low confidence (1)
scripts/deploymentUtils.ts:1
- [nitpick] This complex string manipulation for address extraction should be extracted into a helper function with a descriptive name to improve readability and reusability.
import { ethers } from 'hardhat'
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What's Changed
setting base to
mainfor review