Skip to content

Comments

Add Nightstream zkVM adapter and integration tests#90

Open
guillevalin wants to merge 17 commits intofeature/midnight-privacyfrom
feature/nightstream-zkvm
Open

Add Nightstream zkVM adapter and integration tests#90
guillevalin wants to merge 17 commits intofeature/midnight-privacyfrom
feature/nightstream-zkvm

Conversation

@guillevalin
Copy link
Contributor

@guillevalin guillevalin commented Feb 12, 2026

Description

  • Introduced the sov-nightstream-adapter crate to enable Nightstream as a zkVM backend for the Sovereign SDK.
  • Implemented the Nightstream host and guest environments, including proof generation and verification.
  • Added integration tests to validate the prove-verify cycle for the value-validator ROM.
  • Updated the ValueSetterZk module to support multiple proof backends, including Nightstream.
  • Enhanced documentation and examples for the new adapter and its usage.

Testing

Run on one terminal the rollup script:
./examples/demo-rollup/run_rollup.sh

On other terminal run the TX generator:
./scripts/test_nightstream_e2e_rollup.sh --no-rollup --value 42 --release

Both scripts have a --skip-build arg to just run the binary after it's compiled.

Additional information

- Introduced the `sov-nightstream-adapter` crate to enable Nightstream as a zkVM backend for the Sovereign SDK.
- Implemented the Nightstream host and guest environments, including proof generation and verification.
- Added integration tests to validate the prove-verify cycle for the value-validator ROM.
- Updated the `ValueSetterZk` module to support multiple proof backends, including Nightstream.
- Enhanced documentation and examples for the new adapter and its usage.
@guillevalin guillevalin marked this pull request as ready for review February 13, 2026 16:46
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7c704cbb4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Deleted the Ligero adapter, including its associated files and configurations.
- Updated `.gitignore` to reflect the removal of Ligero-related files.
- Adjusted `Cargo.toml` and `Cargo.lock` to remove dependencies related to Ligero.
- Cleaned up references to Ligero in the project structure and documentation.
- Updated the default chunk size comment to reflect the new ECALL behavior for Poseidon2.
- Improved logging in the `prove_timings` method to include detailed breakdowns of VM execution timings, specifically trace and witness durations.
- Updated the cache preloading logic to conditionally use a digest if available, improving the verification process.
- Ensured backward compatibility by retaining the original preloading method when no digest is present.
- Updated the rollup configuration to use PostgreSQL instead of SQLite for local development.
- Added new scripts for running various Nightstream services, including the controller, indexer, and verifier service.
- Introduced environment variable management for service configurations, enhancing flexibility and usability.
- Cleaned up the Dockerfile for the sov-proof-verifier-service, removing unnecessary dependencies and comments.
- Updated `.gitignore` to include new temporary data files.
- Improved Makefile to support PostgreSQL database cleanup during the clean process.
- Introduced the Midnight bridge for improved data availability and transaction processing.
- Added new scripts for generating genesis keys and prefunding wallets.
- Updated rollup configuration to support read-only replica mode.
- Enhanced the Nightstream service controller with asset seeding for the Midnight bridge.
- Added new binaries for generating authority FVK and decrypting authority notes.
- Updated dependencies in Cargo.toml and Cargo.lock to include base64, rockbound, and sov-midnight-adapter.
- Created new README documentation for the Nightstream rollup, detailing setup and usage instructions.
…ist proofs

- Added support for viewer attestations in the NoteSpendWitness structure, allowing for enhanced privacy features.
- Implemented blacklist proof generation for sender and recipient identities, improving security against unauthorized access.
- Updated the transfer operation to build and include NoteSpendWitness, facilitating proof generation with viewer data.
- Integrated pool viewer signature injection into proof packages, ensuring compliance with viewer authority requirements.
- Updated dependencies in Cargo.toml and Cargo.lock to include flate2 for compression functionalities.
- Updated Nightstream dependencies in Cargo.toml and Cargo.lock to point to the latest Git revisions.
- Changed the target architecture for RISC-V builds from `riscv32im-unknown-none-elf` to `riscv32i-unknown-none-elf` for improved compatibility.
- Refactored the Nightstream host to utilize the new `Rv32TraceWiring` builder, enhancing performance and trace capabilities.
- Removed references to the old CCS caching mechanism in the Nightstream proof package, streamlining the verification process.
- Updated integration tests to reflect changes in the proving and verification workflow.
- Updated Nightstream dependencies in Cargo.toml and Cargo.lock to the latest Git revisions for improved functionality.
- Introduced a new linker script for the RISC-V architecture, enhancing compatibility and memory management.
- Refactored the NoteSpend circuit to optimize data handling and improve performance metrics.
- Enhanced the run_controller script to manage dashboard processes and streamline service startup.
- Improved PostgreSQL database cleanup procedures in the Makefile for better local development experience.
- Changed the target architecture from `riscv32im-unknown-none-elf` to `riscv32i-unknown-none-elf` in `export_rom_rs.py` and `.cargo/config.toml` for improved compatibility and consistency across build configurations.
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.

1 participant