Closed jonas089 closed 2 months ago
Status update:
I think the contract is running out of gas.
The test data (proofs) can be generated by running cargo test --features=metal,write-test-proofs
and modifying the include_bytes!
.
The risc0 1image_id1 is not stable between nix build and devshell.
The test data can only be generated in the devshell not nix, that will be fine once the image_id
is stable.
I have now confirmed we run out of gas on larger proofs. The two simple batches that start with an empty trie are verifiable in the contract wasm. The large proofs are verifiable outside of the contract wasm, they start running the risc0 verifying code and then the runtime give the unreadable error.
All tests except the end to end pass.
kairos: output: deploy size of 1466131 bytes exceeds limit of 1048576
Please review.
We need to increase the deploy size and increase the gas limit for the more complex batch tests.
@Avi-D-coder I was using the following commands to increase max deployment size to 4 MiB in my local NCTL:
sed -i 's|\(max_deploy_size = \)[0-9_]\+|\14_194_304|' ~/casper-node/resources/local/chainspec.toml.in
sed -i 's|\(max_body_bytes = \)[0-9_]\+|\18_388_608|g' ~/casper-node/resources/local/config.toml
Notably, max_body_bytes
must be adjusted as well (total size of put_deploy
request's body that contains serialized deploy) - approximately doubled in size comparing to max_deploy_size
.
merge https://github.com/cspr-rad/kairos/pull/125 before this pr.
Objective of this PR: Add Batch verifier entry point to the demo contract
Todo before merge:
Optional (but likely appreciated):
Post demo todos (irrelevant to the demo):
This is for Marijan to decide, I just did what I thought was convenient to get it to work.