polkadot-sdk icon indicating copy to clipboard operation
polkadot-sdk copied to clipboard

runtime: remove ttl

Open alindima opened this issue 1 year ago • 14 comments

Stacked on top of https://github.com/paritytech/polkadot-sdk/pull/5423

Resolves https://github.com/paritytech/polkadot-sdk/issues/4776

This will enable proper core-sharing between paras, even if one of them is not producing blocks.

TODO:

  • [x] duplicate first entry in the claim queue if the queue used to be empty
  • [x] don't back anything if at the end of the block there'll be a session change
  • [x] write migration for removing the availability core storage
  • [x] update and write unit tests
  • [x] prdoc

Important note: The ttl and max_availability_timeouts fields of the HostConfiguration are not removed in this PR, due to #64. Adding the workaround with the storage version check for every use of the active HostConfiguration in all runtime APIs would be insane, as it's used in almost all runtime APIs.

So even though the ttl and max_availability_timeouts fields will now be unused, they will remain part of the host configuration.

These will be removed in a separate PR once #64 is fixed.

alindima avatar Aug 26 '24 08:08 alindima

The CI pipeline was cancelled due to failure one of the required jobs. Job name: test-linux-stable 3/3 Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7194174

paritytech-cicd-pr avatar Aug 30 '24 10:08 paritytech-cicd-pr

The CI pipeline was cancelled due to failure one of the required jobs. Job name: test-linux-stable 1/3 Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7194172

paritytech-cicd-pr avatar Aug 30 '24 10:08 paritytech-cicd-pr

The CI pipeline was cancelled due to failure one of the required jobs. Job name: test-linux-stable 2/3 Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7194173

paritytech-cicd-pr avatar Aug 30 '24 10:08 paritytech-cicd-pr

I will remove the configuration module migration from this PR due to #64 . Adding the workaround with the storage version check for every use of the active HostConfiguration in all runtime APIs would be insane, as it's used in almost all runtime APIs

So even though the ttl and max_availability_timeouts fields will now be unused, they will remain part of the host configuration.

I'll open a separate issue after this PR is merged that tracks the removal of these fields, which can be done after #64 is fixed.

alindima avatar Sep 24 '24 13:09 alindima

@sandreim @eskimor @alexggh ready for some approves here 😄

alindima avatar Sep 30 '24 12:09 alindima

bot bench polkadot-pallet --runtime=westend --pallet=runtime_parachains::paras_inherent -v UPSTREAM_MERGE=n

alindima avatar Oct 02 '24 08:10 alindima

@alindima https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7479417 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=westend --target_dir=polkadot --pallet=runtime_parachains::paras_inherent. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 4-aa41ddd9-66db-44e9-9f27-01b546d5c61e to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 02 '24 08:10 command-bot[bot]

@alindima Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=westend --target_dir=polkadot --pallet=runtime_parachains::paras_inherent has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7479417 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7479417/artifacts/download.

command-bot[bot] avatar Oct 02 '24 09:10 command-bot[bot]

bot bench polkadot-pallet --pallet=polkadot_runtime_parachains::paras_inherent --runtime=westend -v UPSTREAM_MERGE=n

alindima avatar Oct 02 '24 09:10 alindima

@alindima https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7480061 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=westend --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 5-fc78d2c0-b964-458a-b8bf-162a46be3c96 to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 02 '24 09:10 command-bot[bot]

@alindima Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=westend --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7480061 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7480061/artifacts/download.

command-bot[bot] avatar Oct 02 '24 14:10 command-bot[bot]

bot bench polkadot-pallet --pallet=polkadot_runtime_parachains::paras_inherent --runtime=rococo -v UPSTREAM_MERGE=n

alindima avatar Oct 02 '24 14:10 alindima

@alindima https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7484427 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=rococo --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 10-b7d19b52-c8df-4bb0-8b56-1395d6dcf087 to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 02 '24 15:10 command-bot[bot]

@alindima Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=rococo --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7484427 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7484427/artifacts/download.

command-bot[bot] avatar Oct 02 '24 20:10 command-bot[bot]

oh this got pretty messed up since it was based on https://github.com/paritytech/polkadot-sdk/pull/5423, which was merged. I'll try to fix it but will probably need to force push it

Later edit: managed to fix it

alindima avatar Oct 07 '24 07:10 alindima

bot bench polkadot-pallet --pallet=polkadot_runtime_parachains::paras_inherent --runtime=westend -v UPSTREAM_MERGE=n

alindima avatar Oct 16 '24 10:10 alindima

@alindima https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7583379 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=westend --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 5-b25cdae9-33d9-460a-b7f1-5e9b90af09d5 to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 16 '24 10:10 command-bot[bot]

@alindima Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=westend --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7583379 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7583379/artifacts/download.

command-bot[bot] avatar Oct 16 '24 15:10 command-bot[bot]

bot bench polkadot-pallet --pallet=polkadot_runtime_parachains::paras_inherent --runtime=westend -v UPSTREAM_MERGE=n

alindima avatar Oct 17 '24 08:10 alindima

@alindima https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7591514 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=westend --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 14-25b27c8e-2ab2-4725-b285-d343fd881212 to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 17 '24 08:10 command-bot[bot]

@alindima Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=westend --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7591514 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7591514/artifacts/download.

command-bot[bot] avatar Oct 17 '24 14:10 command-bot[bot]

bot bench polkadot-pallet --pallet=polkadot_runtime_parachains::paras_inherent --runtime=westend -v UPSTREAM_MERGE=n

alindima avatar Oct 17 '24 14:10 alindima

@alindima https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7595155 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=westend --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 19-557204d2-9955-4c63-ad77-ae8044403d48 to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 17 '24 14:10 command-bot[bot]

@alindima Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=westend --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7595155 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7595155/artifacts/download.

command-bot[bot] avatar Oct 17 '24 19:10 command-bot[bot]

bot bench polkadot-pallet --pallet=polkadot_runtime_parachains::paras_inherent --runtime=rococo -v UPSTREAM_MERGE=n

alindima avatar Oct 21 '24 09:10 alindima

@alindima https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7607482 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=rococo --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent. Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 1-19553a01-d9e9-4e77-8c4c-b745786ff00a to cancel this command or bot cancel to cancel all commands in this pull request.

command-bot[bot] avatar Oct 21 '24 09:10 command-bot[bot]

@alindima Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet --runtime=rococo --target_dir=polkadot --pallet=polkadot_runtime_parachains::paras_inherent has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7607482 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7607482/artifacts/download.

command-bot[bot] avatar Oct 21 '24 14:10 command-bot[bot]