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

Target pallet-revive instead of pallet-contracts #2356

Merged
merged 138 commits into from
Jan 16, 2025

Conversation

cmichi
Copy link
Collaborator

@cmichi cmichi commented Dec 19, 2024

This PR moves ink! from WebAssembly on pallet-contracts to PolkaVM on pallet-revive. With this PR we are moving towards the next major release of ink!, version 6, which will no longer support Wasm/pallet-contracts.

Compatibility

The PR uses the version of polkadot-sdk (so also pallet-revive) from commit 645878a27115db52e5d63115699b4bbb89034067.

It works with cargo-contract from this branch and this version of substrate-contracts-node:

cargo install --force --git https://github.com/use-ink/cargo-contract.git --branch cmichi-remove-wasm-default-to-revive

cargo install --force --git https://github.com/use-ink/substrate-contracts-node.git --rev fad777f53ba2fcf8a90646a5c516015c63ad24be

Two important notes:

  • You have to use a recent Rust nightly when building the contracts (so cargo +nightly contract). Otherwise you'll get an ICE with the error unknown RISC-V ABI name.
  • If you use cargo-contract, you have to submit the extrinsic revive::mapAccount() in polkadot-js first. So if you e.g. use the arg --suri //Alice you have to call mapAccount() from Alice in polkadot-js first. This is because pallet-revive requires a mapped account.

Next Steps

The PR doesn't leave the code in a perfect state, there are still a lot of todo's in the code. I've disabled some individual tests for now, as they require work in external dependencies first. I'm merging the PR to have a base to work off and synchronize work with others.

The PR contains a lot of breaking changes that will be documented in more verbatim form in the release notes and this migration guide.

@cmichi cmichi force-pushed the cmichi-remove-wasm-default-to-revive branch 6 times, most recently from b8ec94c to 247fec5 Compare December 19, 2024 21:15
Remove `LimitParamsV1` + `pallet-contracts`
Use RISC-V target in CI
Use latest `polkadot-sdk` `master`
Use `H256` instead of `E::Hash`
Remove generic from `ToAddr` and `FromAddr`
Remove support for `no_implicit_prelude`
Remove `Determinism`
This reverts commit 86411fa69b220972eb2194013bd6d7c614fabefb.
@cmichi cmichi force-pushed the cmichi-remove-wasm-default-to-revive branch from 247fec5 to c13398b Compare December 20, 2024 12:42
@cmichi cmichi marked this pull request as ready for review January 16, 2025 08:08
@cmichi cmichi requested a review from ascjones as a code owner January 16, 2025 08:08
@cmichi cmichi merged commit ba77c04 into master Jan 16, 2025
15 checks passed
@cmichi cmichi deleted the cmichi-remove-wasm-default-to-revive branch January 16, 2025 08:14
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

Successfully merging this pull request may close these issues.

1 participant