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

Fail to verify basic flipper contract #8

Open
deuszx opened this issue May 12, 2023 · 3 comments
Open

Fail to verify basic flipper contract #8

deuszx opened this issue May 12, 2023 · 3 comments
Assignees

Comments

@deuszx
Copy link
Contributor

deuszx commented May 12, 2023

I've done the following:

  1. Build the ink-verifier-image locally from main branch.
  2. Create a basic flipper contract cargo contract new flipper
  3. cd flipper and run build-verifiable-ink -t develop .

The result is that it fails to build the package:

  flipper build-verifiable-ink -t develop .
Building package w/ args: ["run", "-i", "-t", "--rm", "--entrypoint", "package-contract", "-v", "/Users/gorskimateusz/projects/aleph/flipper:/build", "ink-verifier:develop"]
mv: failed to preserve ownership for '/build/package/src/Cargo.toml': Permission denied
mv: failed to preserve ownership for '/build/package/src/lib.rs': Permission denied
mv: failed to preserve ownership for '/build/package/src': Permission denied
Build Info

- build_mode: Release
- cargo_contract_version: 2.0.2
- rustc_toolchain: 1.66.1-x86_64-unknown-linux-gnu
- optimization_passes: Z
- keep_debug_symbols: false

In SRC_ROOT
total 20K
drwxr-xr-x 1 501 dialout  128 May 12 08:44 .
drwxr-xr-x 1 501 dialout   96 May 12 08:44 ..
-rwxr-xr-x 1 501 dialout  573 May 12 08:44 Cargo.toml
-rwxr-xr-x 1 501 dialout 5.1K May 12 08:44 lib.rs
error: DEPRECATED: future versions of rustup will require --force-non-host to install a non-host toolchain as the default.
warning: toolchain '1.66.1-x86_64-unknown-linux-gnu' may not be able to run on this system.
warning: If you meant to build software to target that platform, perhaps try `rustup target add x86_64-unknown-linux-gnu` instead?
info: syncing channel updates for '1.66.1-x86_64-unknown-linux-gnu'
warning: Signature verification failed for 'https://static.rust-lang.org/dist/channel-rust-1.66.1.toml'
info: latest update on 2023-01-10, rust version 1.66.1 (90743e729 2023-01-10)
info: downloading component 'cargo'
info: downloading component 'rust-std'
 30.0 MiB /  30.0 MiB (100 %)   3.4 MiB/s in  8s ETA:  0s
info: downloading component 'rustc'
 67.4 MiB /  67.4 MiB (100 %)   4.7 MiB/s in 18s ETA:  0s
info: installing component 'cargo'
info: installing component 'rust-std'
 30.0 MiB /  30.0 MiB (100 %)  20.9 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 67.4 MiB /  67.4 MiB (100 %)  24.5 MiB/s in  2s ETA:  0s

  1.66.1-x86_64-unknown-linux-gnu installed - (error reading rustc version)

info: checking for self-updates
info: downloading self-update
info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
info: installing component 'rust-std' for 'wasm32-unknown-unknown'
info: downloading component 'rust-src'
info: installing component 'rust-src'
    Updating crates.io index
  Downloaded cargo-contract v2.0.2
  Downloaded 1 crate (94.8 KB) in 1.47s
  Installing cargo-contract v2.0.2

// Omitting lines with downloading and installing dependencies for brevity

Downloaded 420 crates (36.2 MB) in 30.81s (largest was `ring` at 5.1 MB)
error: failed to compile `cargo-contract v2.0.2`, intermediate artifacts can be found at `/tmp/cargo-installbjuGr0`

Caused by:
  package `ink_env v4.2.0` cannot be built because it requires rustc 1.68 or newer, while the currently active rustc version is 1.66.1
  Try re-running cargo install with `--locked`

Notice the errors at the beginning.

@deuszx
Copy link
Contributor Author

deuszx commented May 16, 2023

Realted #6

@deuszx
Copy link
Contributor Author

deuszx commented May 17, 2023

Most probably, adding --locked to cargo install ... cargo-contract will solve the issue.

@abhijeetbhagat abhijeetbhagat self-assigned this May 18, 2023
@abhijeetbhagat
Copy link
Contributor

hello @deuszx ! both the problems (#6 and the --locked flag) have been resolved in the latest release, particularly, in this commit: a397b0d

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