substrate icon indicating copy to clipboard operation
substrate copied to clipboard

contracts: Replace `sp-sandbox` and `wasmi-validation` by newest wasmi

Open athei opened this issue 3 years ago • 5 comments

Fixes #11752

WIP

Instead of refactoring sp-sandbox as mentioned in the issue we get rid of it. The abstraction doesn't serve any purpose anymore since we are only using the embedded executor. If we want to use any client resident executor in the future it will be in a completely different form.

cc @Robbepop

Weight comparison: https://weights.tasty.limo/compare?repo=substrate&threshold=10&path_pattern=frame%2F*%2Fsrc%2Fweights.rs&method=guess-worst&ignore_errors=true&unit=weight&old=master&new=at/contracts-wasmi

athei avatar Oct 16 '22 08:10 athei

sp-sandbox can probably be removed completely when it isn't used anymore?

bkchr avatar Oct 18 '22 10:10 bkchr

There is no user within substrate anymore after this PR is merged. But I am not sure if there are any other users of this crate (GEAR?).

athei avatar Oct 18 '22 10:10 athei

/cmd queue -c bench-bot $ pallet dev pallet_contracts

athei avatar Oct 18 '22 12:10 athei

@athei https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1962429 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 22-e1fb4118-8c94-4272-8046-d17065952e87 to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 18 '22 12:10 command-bot[bot]

@athei Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1962429 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1962429/artifacts/download.

command-bot[bot] avatar Oct 18 '22 13:10 command-bot[bot]

/cmd queue -c bench-bot $ pallet dev pallet_contracts

athei avatar Oct 20 '22 15:10 athei

@athei https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1972351 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 27-1848c35f-110f-452a-b25c-41ca40d63b79 to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 20 '22 15:10 command-bot[bot]

@athei Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1972351 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1972351/artifacts/download.

command-bot[bot] avatar Oct 20 '22 17:10 command-bot[bot]

/cmd queue -c bench-bot $ pallet dev pallet_contracts

athei avatar Oct 28 '22 13:10 athei

@athei https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1992751 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 3-93c6c654-2e1c-42c7-8e6c-04028c51bfb1 to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 28 '22 13:10 command-bot[bot]

@athei Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1992751 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1992751/artifacts/download.

command-bot[bot] avatar Oct 28 '22 13:10 command-bot[bot]

/cmd queue -c bench-bot $ pallet dev pallet_contracts

alvicsam avatar Oct 28 '22 15:10 alvicsam

@alvicsam https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1993185 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 4-d29d9e77-6758-48e2-86b8-6e4d08e337af to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 28 '22 15:10 command-bot[bot]

@alvicsam Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1993185 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1993185/artifacts/download.

command-bot[bot] avatar Oct 28 '22 17:10 command-bot[bot]

/cmd queue -c bench-bot $ pallet dev pallet_contracts

athei avatar Oct 31 '22 15:10 athei

@athei https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1999613 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 7-a7ec3550-d1be-4cee-a055-4edabe9437a1 to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 31 '22 15:10 command-bot[bot]

@athei Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1999613 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/1999613/artifacts/download.

command-bot[bot] avatar Oct 31 '22 16:10 command-bot[bot]

/cmd queue -c bench-bot $ pallet dev pallet_contracts

athei avatar Nov 15 '22 15:11 athei

@athei https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2048509 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 38-3665c034-6255-4d97-a3cb-20212a641389 to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Nov 15 '22 15:11 command-bot[bot]

@athei Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2048509 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2048509/artifacts/download.

command-bot[bot] avatar Nov 15 '22 16:11 command-bot[bot]

need to fix here: remove seal_ prefix for the recently added host functions

https://github.com/paritytech/substrate/blob/938901b58235a41de006c4b72fbc27e9e6c92c68/frame/contracts/src/schedule.rs#L668-L669

agryaznov avatar Nov 15 '22 18:11 agryaznov

need to fix here: remove seal_ prefix for the recently added host functions

https://github.com/paritytech/substrate/blob/938901b58235a41de006c4b72fbc27e9e6c92c68/frame/contracts/src/schedule.rs#L668-L669

Yes. The PR was broken in that the benchmarks didn't match what was in weight. I rather added the prefix in the benchmarks to be consistent. Also did some renaming here as the names till weren't consistent.

I addressed all comments.

athei avatar Nov 17 '22 13:11 athei

/cmd queue -c bench-bot $ pallet dev pallet_contracts

athei avatar Nov 17 '22 13:11 athei

@athei "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts (https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2058389) was cancelled in https://github.com/paritytech/substrate/pull/12501#issuecomment-1318665598

command-bot[bot] avatar Nov 17 '22 13:11 command-bot[bot]

/cmd cancel

athei avatar Nov 17 '22 13:11 athei

@athei Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2058389 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2058389/artifacts/download.

command-bot[bot] avatar Nov 17 '22 13:11 command-bot[bot]

/cmd queue -c bench-bot $ pallet dev pallet_contracts

athei avatar Nov 17 '22 14:11 athei

@athei https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2058910 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 58-9e744e83-f2d6-4d98-a78f-a66ee2c43912 to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Nov 17 '22 14:11 command-bot[bot]

@athei Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2058910 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2058910/artifacts/download.

command-bot[bot] avatar Nov 17 '22 16:11 command-bot[bot]

/cmd queue -c bench-bot $ pallet dev pallet_contracts

athei avatar Nov 18 '22 10:11 athei

@athei https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2061018 was started for your command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment /cmd cancel 60-60157002-198e-4109-8ccf-ba7eee58037d to cancel this command or /cmd cancel to cancel all commands in this pull request.

command-bot[bot] avatar Nov 18 '22 10:11 command-bot[bot]

@athei Command "$PIPELINE_SCRIPTS_DIR/bench-bot.sh" pallet dev pallet_contracts has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2061018 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2061018/artifacts/download.

command-bot[bot] avatar Nov 18 '22 12:11 command-bot[bot]

The CI pipeline was cancelled due to failure one of the required jobs. Job name: cargo-check-each-crate Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2083001

paritytech-cicd-pr avatar Nov 24 '22 16:11 paritytech-cicd-pr

Hi, any task to update wasmi for sc-executor ?

yjhmelody avatar Nov 25 '22 09:11 yjhmelody

No plans. We rather remove wasmi from the executor and make it wasmtime only. If you want to discuss this further please open discussion in the polkadot forum.

athei avatar Nov 25 '22 12:11 athei