-
Notifications
You must be signed in to change notification settings - Fork 700
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
pallet_revive
launch tracking issue
#5308
Comments
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 23, 2024
This is a heavily modified and stripped down version of `pallet_contracts`. We decided to fork instead of extend the old pallet. Reasons for that are: - There is no benefit of supporting both on the same pallet as the intended payload for the new pallet (recompiled YUL) will be using a different ABI. - It is much easier since it allows us to remove all the code that was necessary to support Wasm and focus fully on running cross compiled YUL contracts. **The code is reviewable but can't be merged because it depends on an unreleased version of PolkaVM via git.** ## Current state All tests are passing and the code is not quick and dirty but written to last. The work is not finished, though. It is included in the `kitchensink-runtime` and a node can be built. However, we merge early in order to be able to start testing other components as early as possible. Outstanding changes are tracked here and will be merged separately: #5308 ## Syscall Interface The syscall interface is best explored by generating the docs of this crate and looking at the `SyscallDoc` trait. Arguments are passed in registers a0-a5 in the order they are listed. If there are more than 6 arguments (call, instantiate) a pointer to a packed struct of the arguments is expected as the only argument. I plan to create variants of those syscalls with less arguments specifically for YUL. Functions are just referenced by their name as ASCII within the PolkaVM container. Rather than by a syscall number as it was the case in the last implementation. ## Changes vs. `pallet_contracts` The changes are too numerous to list them all here. This is an incomplete list: - Use PolkaVM instead of wasmi to execute contracts - Made Runtime generic over a new `Memory` trait as we can't map memory directly on PolkaVM anymore - No static verification on code upload. Everything is a determinstic runtime failure - Removed all migrations and reset the pallet version - Removed the nonce storage item and instead use the deployers account nonce to generate a unique trie - We now bump the deployers account nonce on contract instantiation to they are bumped even within a batch transaction - Removed the instantiation nonce host function: We should add a new `instantiate` variant as a replacement for thos - ContractInfoOf of uses the indentity hasher now - Remove the determinism feature: User of that feature should switch to soft floats - The `unstable` attribute has been replaced by a `api_version` attribute to declare at which version an API became available - leaving out that attribute makes the API effectively unstable - a new `api_version` field on the CodeInfo makes sure that old contracts can't access new APIs (necessary due to lack of static verification. - Added a `behaviour_version` field to CodeInfo that can used if we need to introduce breaking changes and keep the old behaviour for existing contracts - Unified storage vs. transient and fixed vs. variable sized keys all into one set of multiplexing host functions - Removed all contract observeable limits from the `Config` trait and instead hardcode them - Removed the Schedule - Removed all deprecated host functions - Simplify chain extension as preperation for making it a pre-compile --------- Co-authored-by: command-bot <>
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue tracks all the open changes that we need to make to
pallet_revive
so it can YUL contracts. This is only the minimal feature set for the deployment and does not include features that need to be delivered later (JIT). It also only includes changes to the pallet and not other components.I ordered them by urgency.
Tasks
sized
andinstruction
benchmarks. Those are bogus right now because they need an PolkaVM assembler to be written properly #6157call
andinstantiate
functions for yul #5578The text was updated successfully, but these errors were encountered: