Skip to content
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

feat(operator): bump risc0 and sp1 versions #1324

Merged
merged 17 commits into from
Oct 25, 2024

Conversation

PatStiles
Copy link
Contributor

@PatStiles PatStiles commented Oct 24, 2024

Update SP1 and Risc0 verifier versions

closes #1205

This PR:

  • Bumps the risc0 and sp1 verifier versions of operators.
  • Provides retro-compatibility for each version. If proof verification for SP1 and Risc0 between the current and old ('_old') verifier versions fails within the operator it will try verifying using the older version of SP1/Risc0 before returning false.

To Test:

Verify network bindings works on a local network:

  • make test_risc_zero_go_bindings_macos
  • make test_sp1_go_bindings_macos
  • run local testnet and confirm you can submit sp1 and risc0 proofs. via
    make batcher_send_risc0_task
    make batcher_send_sp1_task

Verify Retro Compatiblility of Operator Verifiers:

To verify operator retro-compatibility we deploy the rest of infrastructure of Aligned and boot the retro-compatible operator. This tests that network retro-compatible operator can verify SP1/Risc0 proofs from both verifier versions.

Note:
Commands suffixed with _old indicate the deprecated version of the SP1/Risc0 verifier that is currently running on testnet

To test this have two repos of aligned_layer one set to testnet and one to 1205-bump-sp1-and-risc0-version.

In testnet repo:

go clean
go mod tidy
make go_deps
make deps
  • Then you must run anvil, aggregator and batcher:
make anvil_start_with_block_time
make aggregator_start
make batcher_start_local

In 1205-operator-verifier-update repo:

make deps
  • Then you can run operator
make operator_register_and_start
  • Send proof from the older SP1 and Risc0 versions from the testnet repo.
make batcher_send_burst_groth16
make batcher_send_sp1_burst
make batcher_send_risc0_burst

Observe the Risc0 proof verification failed. and SP1 proof verification failed. logs are emitted and the operator successfully verifying the proofs from the old SP1/Risc0 verifiers. If you send a proof from the latest version of SP1/Risc0 you should notice its verification fails in the batcher.

  • Keep the operator running on the 1205-operator-verifier-update repo.
  • In the testnet repo, kill the batcher.
  • Navigate to the 1205-operator-verifier-update and start the batcher within the repo.
  • Send proof from both the SP1 and Risc0 versions from the 1205-operator-verifier-update repo.
make batcher_send_sp1_burst
make batcher_send_risc0_burst

Observe the operator successfully verifying the proofs from the new SP1/Risc0 verifiers. If you send a proof from the older version of SP1/Risc0 you should notice its verification fails in the batcher.

Type of change

  • New feature

Checklist

  • 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.
    • No, they will be added later in the network upgrade
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue

Copy link
Collaborator

@MarcosNicolau MarcosNicolau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the small comments, everything worked well on my macos and linux.

Makefile Outdated Show resolved Hide resolved
.github/workflows/test-risc-zero-old.yml Outdated Show resolved Hide resolved
.github/workflows/test-sp1-old.yml Outdated Show resolved Hide resolved
.github/workflows/test-risc-zero-old.yml Outdated Show resolved Hide resolved
.github/workflows/test-sp1-old.yml Outdated Show resolved Hide resolved
operator/pkg/operator.go Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@JuArce JuArce changed the title 1205 operator verifier update feat(operator): bump risc0 and sp1 versions Oct 25, 2024
@JuArce JuArce merged commit 19ca180 into staging Oct 25, 2024
7 checks passed
@JuArce JuArce deleted the 1205-operator-verifier-update branch October 25, 2024 18:18
PatStiles added a commit that referenced this pull request Oct 25, 2024
avilagaston9 pushed a commit that referenced this pull request Oct 29, 2024
samoht9277 pushed a commit that referenced this pull request Oct 29, 2024
PatStiles added a commit that referenced this pull request Nov 6, 2024
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.

4 participants