Skip to content

Conversation

@JuArce
Copy link
Collaborator

@JuArce JuArce commented Apr 25, 2025

Invert variables order and add setter for risc0 contract

Description

Variable declaration in AlignedProofAggregation contract was

    /// @notice The address of the SP1 verifier contract.
    /// @dev This can either be a specific SP1Verifier for a specific version, or the
    ///      SP1VerifierGateway which can be used to verify proofs for any version of SP1.
    ///      For the list of supported verifiers on each chain, see:
    ///      https://docs.succinct.xyz/onchain-verification/contract-addresses
    address public sp1VerifierAddress;

    /// @notice The address of the Wallet that is allowed to call the verify function.
    address public alignedAggregatorAddress;

In PR #1874, it was changed to

    /// @notice The address of the SP1 verifier contract.
    /// @dev This can either be a specific SP1Verifier for a specific version, or the
    ///      SP1VerifierGateway which can be used to verify proofs for any version of SP1.
    ///      For the list of supported verifiers on each chain, see:
    ///      https://docs.succinct.xyz/onchain-verification/contract-addresses
    address public sp1VerifierAddress;

    /// @notice The address of the Risc0 verifier contract
    /// @dev See supported verifier here:
    /// https://dev.risczero.com/api/blockchain-integration/contracts/verifier#contract-addresses
    address public risc0VerifierAddress;

    /// @notice The address of the Wallet that is allowed to call the verify function.
    address public alignedAggregatorAddress;

Setting the risc0VerifierAddress to alignedAggregatorAddress, and setting alignedAggregatorAddress to 0x0...0

How to Test

Contracts upgrade

Once upgraded the contract, the risc0VerifierAddress will be set to 0x0...0

You can set the risc0VerifierAddress address with

For STAGE

cast send 0x7Eace34A8d4C4CacE633946C6F7CF4BeF3F33513 "setRisc0VerifierAddress(address)" 0xf70aBAb028Eb6F4100A24B203E113D94E87DE93C --rpc-url https://ethereum-holesky-rpc.publicnode.com --interactive

For TESTNET

cast send 0xe84CD4084d8131841CE6DC265361f81F4C59a1d4 "setRisc0VerifierAddress(address)" 0xf70aBAb028Eb6F4100A24B203E113D94E87DE93C --rpc-url https://ethereum-holesky-rpc.publicnode.com --interactive

In both cases you must be the owner

Type of change

  • Bug fix

Checklist

  • “Hotfix” to testnet, everything else to staging
  • Linked to Github Issue
  • This change depends on code or research by an external entity
    • Acknowledgements were updated to give credit
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue
  • If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • This PR adds compatibility for operator for both versions and do not change batcher/docs/examples
    • This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

feat: add risc0 contract setter
@JuArce JuArce self-assigned this Apr 25, 2025
@JuArce JuArce changed the base branch from testnet to staging April 25, 2025 21:25
@github-actions
Copy link

github-actions bot commented Apr 25, 2025

Changes to gas cost

Generated at commit: 3cf1f38e3cae9edf337b92b17ebf44b6f32b1825, compared to commit: 837b4fbe4715d1b848b001bf77ce517608ae7d02

🧾 Summary (10% most significant diffs)

Contract Method Avg (+/-) %
AlignedLayerServiceManager createNewTask -171 ✅ -0.22%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
AlignedLayerServiceManager 8,319,208 (0) createNewTask
receive
57,818 (-24)
23,496 (0)
-0.04%
0.00%
77,626 (-171)
47,003 (-188)
-0.22%
-0.40%
77,910 (-12)
47,472 (0)
-0.02%
0.00%
78,744 (-48)
47,472 (0)
-0.06%
0.00%
256 (0)
256 (0)
BLSApkRegistryHarness 3,124,225 (-12)

@JuArce JuArce marked this pull request as ready for review April 28, 2025 19:23
@MauroToscano MauroToscano added this pull request to the merge queue Apr 29, 2025
Merged via the queue into staging with commit a132bf0 Apr 29, 2025
4 checks passed
@MauroToscano MauroToscano deleted the 1900-fixaggregation_mode-invert-variables-order-and-add-setter-for-risc0-contract branch April 29, 2025 15:15
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.

fix(aggregation_mode): invert variables order and add setter for Risc0 contract

4 participants