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

Enable integration testing using self-hosted Anvil node #22

Closed
storojs72 opened this issue Jul 7, 2023 · 2 comments
Closed

Enable integration testing using self-hosted Anvil node #22

storojs72 opened this issue Jul 7, 2023 · 2 comments

Comments

@storojs72
Copy link
Collaborator

There is a common practical issue with cryptographic building blocks like Spark multi-evaluation in Nova - they operate on a huge amount of data that may come close to or exceed the limit of EVM memory. This complicates the debugging and testing process, since in "best" case it requires preloading this data which, by itself, wastefully consumes a lot of gas, or in "worst" case requires putting the preloading directly into the implementation, making it impractical to use with different data, or just causes OutOfGas exception. To tackle this problem, in #20 we introduce initial integration testing for Spark multi-evaluation which utilises global storage which in practice is limited only by hard-drive of the hardware where the Ethereum node is running.

This approach of utilising the global state for testing requires both infrastructural and development work. Foundry framework that we use for solidity-verifier development already contains software that we need for this, namely the Ethereum node (anvil) and RPC client (cast) used for performing Ethereum API calls (for issuing transactions in particular).

Infra work:

  • Wrap anvil into Docker and provide it as a self-hosted runner;
  • Enforce integration testing from Spark multi-evaluation library and contract #20 on CI (most of tooling is ready, but it is necessary to combine everything together into automated pipeline);

Development work:

  • Populate mentioned integration testing approach using global state to the whole e2e verification;
  • Implement the utility contract that allows efficient loading the whole public parameters (verifier-key.json) and proof (compressed-snark.json) into the storage considering the requirement of switching to a new format of public parameters / proof.
@storojs72
Copy link
Collaborator Author

We have a prototype of CI-enforced integration testing with Anvil in https://github.com/lurk-lab/solidity-verifier/tree/anvil-ci. @samuelburnham is currently working on polishing things of the overall infrastructure

@storojs72
Copy link
Collaborator Author

With recent updates in anvil-ci branch and #26, I guess the first iteration of this task can be thought as finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants