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

testnet3 leo version, compile leo contract does not pass #2010

Closed
tanqiangyes opened this issue Aug 10, 2022 · 2 comments
Closed

testnet3 leo version, compile leo contract does not pass #2010

tanqiangyes opened this issue Aug 10, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@tanqiangyes
Copy link

tanqiangyes commented Aug 10, 2022

🐛 Bug Report

testnet3 leo version, compile leo contract does not pass

Steps to Reproduce

Code snippet to reproduce

// The 'chatroom' main function.
@program
function main(a: u32, b: u32) -> u32 {
    let c: u32 = a + b;
    return c;
}

input

// The program input for chatroom/src/main.leo
[main]
a: u32 = 1u32;
b: u32 = 2u32;

[registers]
res: u32 = 2u32;

Stack trace & error message

ATTENTION - "combine.prover.c001353" does not exist, downloading this file remotely and storing it locally. Please ensure "combine.prover.c001353" is stored in "/root/.aleo/resources/combine.prover.c001353".

snarkvm_parameters::testnet3 - Downloading parameters...
snarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (197 MB totasnarkvm_parameters::testnet3 - 5.17% complete (19snarkvm_parameters::testnet3snarkvm_parameters::testnet3 - 5.17% complete (197 MB total)

snarkvm_parameters::testnet3 - thread `main` panicked at 'Failed to load proving key: Crate("curl::error", "Error { description: \"Transferred a partial file\", code: 18, extra: Some(\"transfer closed with 172887710 bytes remaining to read\") }")', /root/.cargo/git/checkouts/snarkvm-f1160780ffe17de8/5770366/parameters/src/testnet3/mod.rs:93:9
stack backtrace:
   0: leo::set_panic_hook::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:702:17
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:588:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:138:18
   4: rust_begin_unwind
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5
   5: core::panicking::panic_fmt
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14
   6: core::result::unwrap_failed
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/result.rs:1785:5
   7: std::sync::once::Once::call_once::{{closure}}
   8: std::sync::once::Once::call_inner
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sync/once.rs:434:21
   9: <snarkvm_parameters::testnet3::TESTNET3_CREDITS_PROGRAM as core::ops::deref::Deref>::deref
  10: snarkvm::package::Package<N>::get_process
  11: aleo::commands::build::Build::build
  12: aleo::commands::build::Build::parse
  13: <leo::commands::build::Build as leo::commands::Command>::apply
  14: leo::commands::Command::execute
  15: leo::commands::Command::try_execute
  16: leo::run_with_args
  17: scoped_tls::ScopedKey<T>::set
  18: leo::main
  19: std::sys_common::backtrace::__rust_begin_short_backtrace
  20: std::rt::lang_start::{{closure}}
  21: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/ops/function.rs:280:13
      std::panicking::try::do_call
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:492:40
      std::panicking::try
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:456:19
      std::panic::catch_unwind
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panic.rs:137:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/rt.rs:128:48
      std::panicking::try::do_call
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:492:40
      std::panicking::try
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:456:19
      std::panic::catch_unwind
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panic.rs:137:14
      std::rt::lang_start_internal
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/rt.rs:128:20
  22: main
  23: __libc_start_main
  24: _start

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/AleoHQ/leo/issues/new?labels=bug,panic&template=bug.md&title=[Bug]

note: leo-lang 1.5.3 running on Linux 5.4.72-microsoft-standard-WSL2

note: compiler args: leo run

note: compiler flags: CLI { debug: false, quiet: false, command: Run { command: Run { name: "main", skip_key_check: false, compiler_options: BuildOptions { offline: false, enable_spans: false, enable_all_ast_snapshots: false, enable_initial_input_ast_snapshot: false, enable_initial_ast_snapshot: false, enable_unrolled_ast_snapshot: false, enable_ssa_ast_snapshot: false, enable_code_generation: false } } }, api: None, path: None }

Expected Behavior

compile success

(Write what you expected to happen here)

Your Environment

  • testnet3
  • rustc 1.62.1 (e092d0b6b 2022-07-16)
  • Linux DESKTOP-LE5NAL6 5.4.72-microsoft-standard-WSL2 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
@tanqiangyes tanqiangyes added the bug Something isn't working label Aug 10, 2022
@tanqiangyes
Copy link
Author

Is it because of some missing dependency? I have a bug with leo run command, but no problem with leo build? Is it because leo run does not try to compile the program?

@tanqiangyes
Copy link
Author

After I went over the wall, I found that it could be compiled successfully, it seems that the network caused curl to download the parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant