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

use add_mod segment #29

Closed
tdelabro opened this issue Dec 10, 2024 · 2 comments
Closed

use add_mod segment #29

tdelabro opened this issue Dec 10, 2024 · 2 comments

Comments

@tdelabro
Copy link

cairo-vm = { git = "https://github.com/zksecurity/cairo-vm", features = ["extensive_hints"] }

You are not using the "mod_builtin" feature. So I can't run the latest version of the language using cairo starknet lib in it

rror: could not compile `cdk` (lib) due to 7 previous errors; 2 warnings emitted
➜  cdk git:(cairo-spending-condition) ✗ cargo check
➜  cdk git:(cairo-spending-condition) ✗ stone-cli prove \
  --prover_config_file $CFG_AND_PARAMS_DIR/cpu_air_prover_config.json  \
  --cairo_program target/release/$PROGRAM_NAME.sierra.json \
  --program_input "[650157136941007917207724121471813482783483983289688285320161307177215463403 1655569645808460179723299787189716707852181277595105475126938070374837146371]" \
  --layout all-cairo \
  --output $PROOF_OUTPUT_DIR/proof.json


Error: Failed to run cairo: cairo1-run failed with error: Error: IO(Os { code: 2, kind: NotFound, message: "No such file or directory" })

➜  cdk git:(cairo-spending-condition) ✗ cd spending_conditions
➜  spending_conditions git:(main) ✗ >....
  --cairo_program target/release/$PROGRAM_NAME.sierra.json \
  --program_input "[650157136941007917207724121471813482783483983289688285320161307177215463403 1655569645808460179723299787189716707852181277595105475126938070374837146371]" \
  --layout all-cairo \
  --output $PROOF_OUTPUT_DIR/proof.json



cairo1-run executed successfully.
Running prover...
Error: Failed to run stone prover: failed to run stone prover with version: V6, status: signal: 6 (SIGABRT), stderr: libc++abi: terminating with uncaught exception of type starkware::StarkwareException: src/starkware/air/cpu/board/memory_segment.h:50: add_mod segme
Stack trace (most recent call last):
#9    Object "cpu_air_prover_v6", at 0x1008fd5d3, in main + 535
#8    Object "cpu_air_prover_v6", at 0x10090a84b, in starkware::ProverMainHelper(starkware::Statement*, starkware::ProverVersion const&) + 171
#7    Object "cpu_air_prover_v6", at 0x100917137, in starkware::ProverMainHelperImpl(starkware::Statement*, starkware::JsonValue const&, starkware::JsonValue const&, starkware::JsonValue const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::al
#6    Object "cpu_air_prover_v6", at 0x100acef83, in starkware::cpu::CpuAirStatement::GetAir() + 655
#5    Object "cpu_air_prover_v6", at 0x100aed2cb, in std::__1::__unique_if<starkware::cpu::CpuAir<starkware::PrimeFieldElement<252, 0>, 9> >::__unique_single std::__1::make_unique[abi:ue170006]<starkware::cpu::CpuAir<starkware::PrimeFieldElement<252, 0>, 9>, unsign
#4    Object "cpu_air_prover_v6", at 0x100aed49b, in starkware::cpu::CpuAir<starkware::PrimeFieldElement<252, 0>, 9>::CpuAir(unsigned long long, std::__1::vector<starkware::cpu::MemoryAccessUnitData<starkware::PrimeFieldElement<252, 0> >, std::__1::allocator<starkw
#3    Object "cpu_air_prover_v6", at 0x1015d9c87, in starkware::cpu::CpuAirDefinition<starkware::PrimeFieldElement<252, 0>, 9>::CpuAirDefinition(unsigned long long, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >,
#2    Object "cpu_air_prover_v6", at 0x100ad535f, in starkware::cpu::GetSegment(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, starkware::cpu::MemorySegment, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, starkware::cpu::MemorySegment> > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 315
#1    Object "cpu_air_prover_v6", at 0x1016fc42f, in starkware::ThrowStarkwareException(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, unsigned long) + 335
#0    Object "cpu_air_prover_v6", at 0x1016fc653, in (anonymous namespace)::PrintStackTrace(std::__1::basic_ostream<char, std::__1::char_traits<char> >*) + 55
@mellowcroc
Copy link
Collaborator

This is actually a known issue in the stone-prover (starkware-libs/stone-prover#38), so stone-cli doesn't support mod_add/mod_mul builtins as of now. I recommend removing the mod_add/mod_mul uses in your code and running again.

@mellowcroc
Copy link
Collaborator

Closing as it's a known issue.

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

No branches or pull requests

2 participants