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

Bump PolkaVM version #6533

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

jarkkojs
Copy link

@jarkkojs jarkkojs commented Nov 18, 2024

The goal is to bump the PolkaVM version for https://github.com/paritytech/polkadot-sdk/tree/master/substrate/client/executor/polkavm, and thus get rid of Parity's toolchain. NOTE: This pull request is still draft, i.e. being updated and not ready for review (yet).

CallArgs

WIP

StateArgs

Solved with:

		// Make sure the memory is cleared...
		self.0.reset_memory().unwrap();

		// ...and allocate space for the input payload.
		self.0.sbrk(raw_data_length).unwrap();

Unsorted

@jarkkojs jarkkojs self-assigned this Nov 18, 2024
@jarkkojs jarkkojs added the T0-node This PR/Issue is related to the topic “node”. label Nov 18, 2024
@jarkkojs jarkkojs force-pushed the bump-polkavm-version branch 7 times, most recently from 3e5bb53 to 626ada2 Compare November 19, 2024 09:49
@jarkkojs jarkkojs force-pushed the bump-polkavm-version branch 11 times, most recently from 80a60ee to 39c80c9 Compare November 19, 2024 23:21
Signed-off-by: Jarkko Sakkinen <[email protected]>
@jarkkojs jarkkojs marked this pull request as ready for review November 20, 2024 03:58
@jarkkojs jarkkojs requested a review from koute as a code owner November 20, 2024 03:58
@jarkkojs jarkkojs requested a review from athei November 20, 2024 04:00
Signed-off-by: Jarkko Sakkinen <[email protected]>
@jarkkojs
Copy link
Author

BTW, please help me to interpret the CI errors...

Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
polkadot/primitives/src/v8/mod.rs Outdated Show resolved Hide resolved
substrate/client/executor/common/src/error.rs Outdated Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
@jarkkojs jarkkojs requested a review from koute November 21, 2024 21:04
@jarkkojs
Copy link
Author

I'm sure I missed something but did my best ;-)

@jarkkojs
Copy link
Author

2x oldlinux tests failing

polkadot/primitives/src/v8/mod.rs Outdated Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
@jarkkojs jarkkojs requested a review from athei November 22, 2024 22:23
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
Comment on lines -46 to -51
let Some(method_index) = self.0.module().lookup_export(name) else {
return (
Err(format!("cannot call into the runtime: export not found: '{name}'").into()),
None,
);
};
Copy link
Contributor

@koute koute Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still missing this piece of code.

([edit]Alex told you to get rid of the snippet with find, but that's actually the preferable way of doing this, so please restore it.[/edit])

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK so then probably something else must be used than call_typed. Can you give advice on that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other issues resolved except this as I'm not sure how to sort this out. Should prepare_call_untyped() be used?

substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
substrate/client/executor/polkavm/src/lib.rs Outdated Show resolved Hide resolved
Fixes based on Jan's review comment except method_index back because we
don't know how to do it and what would be the use for it. Issue comments
related to this are linked below.

Link: paritytech#6533 (comment)
Link: paritytech#6533 (comment)
Reported-by: Jan Bujak <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
@jarkkojs jarkkojs requested a review from koute November 30, 2024 08:39
@jarkkojs
Copy link
Author

@athei ready for re-review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants