paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.85k stars 675 forks source link

Bump backing timeout to 2.5s #3565

Closed eskimor closed 4 months ago

eskimor commented 7 months ago

With asynchronous backing it is expected for PoVs to take up to 2 seconds in execution. The backing timeout, which is a hard timeout is currently set to exactly those 2s. Even if in memory validation is faster than block production, this seems too tight to be practical. To ensure good performance with 2s blocks, we should be more lenient with the backing timeout.

Rollout

We should bump the approval and no-show timeout first, then once enough validators have upgraded, backing timeout comes next.

burdges commented 7 months ago

It sounds fine. Do we have information about the actual variance in practice? It's maybe worse than 0.5 s.

eskimor commented 7 months ago

Status on this one?

ordian commented 7 months ago

In the works, hope to publish something next week.

ordian commented 6 months ago

After looking at the code again, it seems that no code changes are required. no_show_duration is computed based on the config param no_show_slots, which is currently set to 3 on Polkadot and Kusama

Screenshot 2024-04-02 at 11 12 35 Screenshot 2024-04-02 at 11 11 44

This translates to 6 * 3 = 18s no-show timeout.

Backing and approval voting timeouts are now configured via runtime (ExecutorParams). I'll prepare a motion for Kusama and then Polkadot to set both in one go.

Here are the calls for Kusama and Polkadot:

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-kusama.luckyfriday.io#/extrinsics/decode/0x332e0c01002000000600c4090000000000000601983a000000000000 ``` > ./target/debug/opengov-cli submit-referendum \ --proposal "0x332e0c01002000000600c4090000000000000601983a000000000000" \ --network "kusama" --track "whitelistedcaller" \ --after "10" Submit the preimage for the Fellowship referendum: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.dwellir.com#/extrinsics/decode/0x2000882c008dd253278e84c77136069ab19102394c845957337a16b35b0c4f5013f84fc1ab Open a Fellowship referendum to whitelist the call: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.dwellir.com#/extrinsics/decode/0x17002b0f02a615cb6a04038fe9e8caabd1f1ecdac064959bad5faef2fee090914ace4cb9cf22000000010a000000 Submit the preimage for the public referendum: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.dwellir.com#/extrinsics/decode/0x2000782c03332e0c01002000000600c4090000000000000601983a000000000000 Open a public referendum to dispatch the call: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.dwellir.com#/extrinsics/decode/0x15002b0d0232524f90d07de47091496576192b9982c5ab6260fe65ba36f59f59289d2a44641e000000010a000000 Batch to submit on Kusama Relay Chain: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.dwellir.com#/extrinsics/decode/0x1804102000882c008dd253278e84c77136069ab19102394c845957337a16b35b0c4f5013f84fc1ab17002b0f02a615cb6a04038fe9e8caabd1f1ecdac064959bad5faef2fee090914ace4cb9cf22000000010a0000002000782c03332e0c01002000000600c4090000000000000601983a00000000000015002b0d0232524f90d07de47091496576192b9982c5ab6260fe65ba36f59f59289d2a44641e000000010a000000 ``` ``` > ./target/debug/opengov-cli submit-referendum \ --proposal "0x332e0c01002000000600c4090000000000000601983a000000000000" \ --network "polkadot" --track "whitelistedcaller" \ --after "10" Submit the preimage for the Fellowship referendum: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-collectives-rpc.polkadot.io#/extrinsics/decode/0x2b00d41f0003010003082f0000060342090a75216f8817008dd253278e84c77136069ab19102394c845957337a16b35b0c4f5013f84fc1ab Open a Fellowship referendum to whitelist the call: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-collectives-rpc.polkadot.io#/extrinsics/decode/0x3d003e02020a2b37d0cd82a3641f32eea03011b3a83a19b5043e9fdf5ad9983d53a7157b7935000000010a000000 Submit the preimage for the public referendum: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-rpc.dwellir.com#/extrinsics/decode/0x0a00781703332e0c01002000000600c4090000000000000601983a000000000000 Open a public referendum to dispatch the call: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-rpc.dwellir.com#/extrinsics/decode/0x1500160d02c044e0d59e62de8f83ba0ba29d601e063b27b8b9d6bd433315c02b04f64954881e000000010a000000 Batch to submit on Polkadot Relay Chain: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-rpc.dwellir.com#/extrinsics/decode/0x1a04080a00781703332e0c01002000000600c4090000000000000601983a0000000000001500160d02c044e0d59e62de8f83ba0ba29d601e063b27b8b9d6bd433315c02b04f64954881e000000010a000000 Batch to submit on Polkadot Collectives Chain: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-collectives-rpc.polkadot.io#/extrinsics/decode/0x2804082b00d41f0003010003082f0000060342090a75216f8817008dd253278e84c77136069ab19102394c845957337a16b35b0c4f5013f84fc1ab3d003e02020a2b37d0cd82a3641f32eea03011b3a83a19b5043e9fdf5ad9983d53a7157b7935000000010a000000 ```