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

Application contracts don't load with Rust 1.82 or later #3196

Open
jvff opened this issue Jan 29, 2025 · 0 comments
Open

Application contracts don't load with Rust 1.82 or later #3196

jvff opened this issue Jan 29, 2025 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@jvff
Copy link
Contributor

jvff commented Jan 29, 2025

Description

When using Rust 1.82 or newer, application contracts fail to load to be executed. The error that appears is:

thread 'simple_test' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linera-sdk-0.13.1/src/test/chain.rs:93:14:
Failed to execute block.: Execution error: Failed to load contract Wasm module: Invalid table reference (128) during Operation(0)

Steps to Reproduce

cargo install linera-service
linera project new letest
cd letest
sed -i -e '/channel/s/"[^"]*"/"1.82.0"/' rust-toolchain.toml

cat >> Cargo.toml << EOF

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
anyhow = "*"
tokio = "*"
linera-sdk = { version = "0.13.1", features = ["test", "wasmer"] }
EOF

mkdir tests
cat >> tests/simple.rs << EOF
use letest::LetestAbi;
use linera_sdk::test::TestValidator;

#[tokio::test]
async fn simple_test() -> anyhow::Result<()> {
    let _ = TestValidator::with_current_application::<LetestAbi, _, _>((), ()).await;
    Ok(())
}
EOF

cargo test
@jvff jvff added the bug Something isn't working label Jan 29, 2025
@jvff jvff added this to the Testnet #2 milestone Jan 29, 2025
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
Status: No status
Development

No branches or pull requests

1 participant