substrate
substrate copied to clipboard
[contracts] make `debug_message` execution outcome invariant to node debug logging setting
Follow-up to https://github.com/paritytech/substrate/pull/12953
FIFO was not really a good approach to the debug buffer, as it's not very efficient in computational sense. This PR targets to improve it as follows:
- the function just silently drops the message if no space left in the debug buffer, or when the message is not a valid utf-8 string;
- basically we make it indistinguishable from contract side, whether the message got logged or not;
- the gas for the function call is to be charged per byte of the passed message; updated benchmarks;
/cmd queue -c bench $ pallet dev pallet_contracts
@agryaznov Could not find matching configuration bench-bot; available ones are bench, fmt, sample, try-runtime.
/cmd queue -c bench $ pallet dev pallet_contracts
@agryaznov https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2304980 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.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 18-63181388-6e68-4c93-be93-87276668ef87
to cancel this command or /cmd cancel
to cancel all commands in this pull request.
@agryaznov Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_contracts
has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2304980 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2304980/artifacts/download.
/cmd queue -c bench $ pallet dev pallet_contracts
@agryaznov https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2359261 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.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 77-5324a146-ec44-4bac-9581-905052012a8f
to cancel this command or /cmd cancel
to cancel all commands in this pull request.
@agryaznov Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_contracts
has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2359261 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2359261/artifacts/download.
looks like we're waiting for new weights from here: https://github.com/paritytech/substrate/pull/13316
The extra commit I've just pushed is a workaround for this issue: https://github.com/paritytech/substrate/issues/13376
It replaces the dependency on wasmtime
with our own fork with the fix applied (which is trivial). This is only temporary until (hopefully) it's fixed upstream in wasmtime
. (But it should be fine to merge it as-is, assuming the CI will be happy with it.)
bot bench -v PIPELINE_SCRIPTS_REF=bm-fallback $ pallet dev pallet_contracts
@athei https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2391077 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.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 bot cancel 16-57d49f2e-dc9e-4be0-a59d-224dafcb5d44
to cancel this command or bot cancel
to cancel all commands in this pull request.
@athei Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_contracts
has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2391077 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2391077/artifacts/download.
bot bench -v PIPELINE_SCRIPTS_REF=bm-fallback $ pallet dev pallet_contracts
@alvicsam https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2391307 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.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 bot cancel 17-185f8948-0ddb-4f1a-97f2-f73eb40bde6d
to cancel this command or bot cancel
to cancel all commands in this pull request.
@alvicsam Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_contracts
has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2391307 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2391307/artifacts/download.
bot merge
Waiting for commit status.