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

Make parachain template great again (and async backing ready) #4295

Merged

Conversation

s0me0ne-unkn0wn
Copy link
Contributor

Closes #4272.

It turned out that not only the node part but also the runtime wasn't async backing ready. Now, both of them are using proper APIs and producing 6-second blocks out of the box.

@s0me0ne-unkn0wn s0me0ne-unkn0wn added the T9-cumulus This PR/Issue is related to cumulus. label Apr 25, 2024
// Very limited proposal time.
authoring_duration: Duration::from_millis(500),
collation_request_receiver: None,
authoring_duration: Duration::from_millis(1500),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we go ahead and bump it to 2000? All the mainnets and Rococo are already using 2.5 sec backing timeout. It's still 2 seconds for Westend.

Copy link
Member

Choose a reason for hiding this comment

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

Yes.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am wondering if we should even increase it to 2.5s.

If I see it correctly we are subtracting 1/3 of the time specified here for "evaluation and block finalization": https://github.com/paritytech/polkadot-sdk/blob/master/substrate/client/basic-authorship/src/basic_authorship.rs#L291

So that means of the 2s we will hit the timeout for extrinsic application after ~1.3s. However the runtime specified a ref time weight of 2s. So even with a correctly benchmarked runtime we could hit this limit easily, assuming reference hardware. Probably this works well in reality because our reference hardware is not super fast and most collators outperform it?

For backing a higher authoring should not be problem, because the ref_time will still limit the execution time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am wondering if we should even increase it to 2.5s.

We're still trying to keep a gap between backing timeout and authoring duration as the backing has bigger overhead, and that's why we bumped the backing timeout in the first place -- with both being 2 sec, backers were timing out on Versi sometimes.

Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

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

Would love to see the polkadot-launch stuff replaced here with Zombienet, but please coordinate with @gupnik if he's already working on it.

@pepoviola
Copy link
Contributor

Would love to see the polkadot-launch stuff replaced here with Zombienet, but please coordinate with @gupnik if he's already working on it.

@gupnik ping me if you need help to setup zombienet. Would be good to add examples for using both v1/v2.
Thx!

// Very limited proposal time.
authoring_duration: Duration::from_millis(500),
collation_request_receiver: None,
authoring_duration: Duration::from_millis(1500),
Copy link
Member

Choose a reason for hiding this comment

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

Yes.

@s0me0ne-unkn0wn s0me0ne-unkn0wn added this pull request to the merge queue May 2, 2024
Merged via the queue into master with commit 16d8205 May 2, 2024
137 of 139 checks passed
@s0me0ne-unkn0wn s0me0ne-unkn0wn deleted the s0me0ne/async-backing-ready-parachain-template branch May 2, 2024 09:51
dcolley added a commit to metaspan/polkadot-sdk that referenced this pull request May 6, 2024
* 'master' of https://github.com/metaspan/polkadot-sdk: (65 commits)
  Introduces `TypeWithDefault<T, D: Get<T>>` (paritytech#4034)
  Publish `polkadot-sdk-frame`  crate (paritytech#4370)
  Add validate field to prdoc (paritytech#4368)
  State trie migration on asset-hub westend and collectives westend (paritytech#4185)
  Fix: dust unbonded for zero existential deposit (paritytech#4364)
  Bridge: added subcommand to relay single parachain header (paritytech#4365)
  Bridge: fix zombienet tests (paritytech#4367)
  [WIP][CI] Add more GHA jobs (paritytech#4270)
  Allow for 0 existential deposit in benchmarks for `pallet_staking`, `pallet_session`, and `pallet_balances` (paritytech#4346)
  Deprecate `NativeElseWasmExecutor` (paritytech#4329)
  More `xcm::v4` cleanup and `xcm_fee_payment_runtime_api::XcmPaymentApi` nits (paritytech#4355)
  sc-tracing: enable env-filter feature (paritytech#4357)
  deps: update jsonrpsee to v0.22.5 (paritytech#4330)
  Add PoV-reclaim enablement guide to polkadot-sdk-docs (paritytech#4244)
  cargo: Update experimental litep2p to latest version (paritytech#4344)
  Bridge: ignore client errors when calling recently added `*_free_headers_interval` methods (paritytech#4350)
  Make parachain template great again (and async backing ready) (paritytech#4295)
  [Backport] Version bumps and reorg prdocs from 1.11.0 (paritytech#4336)
  HRMP - set `DefaultChannelSizeAndCapacityWithSystem` with dynamic values according to the `ActiveConfig` (paritytech#4332)
  Statement Distribution Per Peer Rate Limit (paritytech#3444)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T9-cumulus This PR/Issue is related to cumulus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix parachain node template to make it async backing ready
6 participants