paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.com/
1.89k stars 696 forks source link

Feature: accountless nonce, have few thousand of freely usable nonce. #6489

Open gui1117 opened 1 day ago

gui1117 commented 1 day ago

Currently the nonce is checked by CheckNonce. This nonce is associated to an account. But in some context you could want some nonce but without requiring an account.

We could have a some freely usable nonce (let's say 10_000), people can an index between 0 and 10 000 randomly, then submit a transaction with the nonce for this index. For this to be viable the number of transaction per second should be way smaller than the number of freely usable nonce. Otherwise conflicts make it unusable.

Implementation: