-
Notifications
You must be signed in to change notification settings - Fork 159
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
Contract compiled with Rust 1.70.0 not working #2009
Comments
This usually indicates that the contract defined that it requires host functions that are not going to be provided or has illegal/unsupported operation. We will need to involve nearcore team to help to diagnose it. P.S. Here are some relevant issues: near/nearcore#7223, near/nearcore#8502 |
It has been already investigated: near/nearcore#9140 (comment) Here is where solution is being discussed: https://near.zulipchat.com/#narrow/stream/295306-pagoda.2Fcontract-runtime/topic/sign-ext.20support.20and.20rust.201.2E70.2B |
Unfortunately, without a protocol upgrade, the best workaround is to use rustc <=1.69. |
Hey, I've just ran into this. I'm wondering if we should add a
Happy to provide a PR. |
With 1.70 toolchain, the contracts are by default compiled in a way which requires updates to wasmer 2.4.1 as well. I looked also into replacing usage of once_cell crate but sadly std::sync::OnceLock doesn’t implement wait method. Co-authored-by: Jakob Meier <mail@jakobmeier.ch> Co-authored-by: Simonas Kazlauskas <git@kazlauskas.me> Issue: near/create-near-app#2009 Issue: #9143
@agostbiro let’s do what you suggested as a quick temporary fix |
As contracts compiled with Rust 1.70 are not working currently this commit ensures that users who use rustup aren't experiencing errors. Resolves near#2009
As contracts compiled with Rust 1.70 are not working currently, this commit ensures that users who use rustup aren't experiencing errors. Related: near/create-near-app#2009
Problem
After creating a new Rust contract with
create-near-app
with latest Rust version 1.70.0, and following the steps to deploy contract, developer failed to view function withnear view <dev-account> get_greeting
.This issue is reported by developers in community who are learning how to build on NEAR today.
How to Reproduce
(1) Install the latest Rust version 1.70.0. For example,
(2) Create a new project with
create-near-app
command(3) Deploy contract to testnet
cd ./my-project npm i npm run deploy
(4) View call function
get_greeting
View call failed and you'll encounter the error as below.
Notes
This is probably a compatibility issue of Rust SDK 4.0.0 with Rust 1.70.0.
The text was updated successfully, but these errors were encountered: