Polkadot’s scalability model inherently supports horizontal scaling by adding more parachains. While this reduces the immediate need for TPS improvements on individual chains, optimizing the scalability of individual networks within Polkadot’s ecosystem remains important, given their independent state structures.
Currently, to execute a block, every transaction within the block undergoes a validation and preparation process through TransactionExtension
s. This validation phase can be categorized into two types:
- On-chain state-dependent validation: Requires access to the state.
- Stateless (or context-free) validation: Does not depend on the state.
A prime example of stateless validation is signature verification, which relies solely on the message and digital signature embedded within the transaction. As this verification is independent of transaction correctness and order, it is inherently suitable for parallel processing.
Proposed Solution
I propose introducing a stateless validation API (to perform validation in a stateless context) or a flag (to mark entire extension validation as stateless) within TransactionExtension
. Stateless extensions could be pre-validated in a separate process, and a block passing pre-validation would transition into a CheckedBlock
or PreValidatedBlock
, bypassing redundant checks during block execution. This would optimize the execution process and potentially improve TPS.
Next Steps
If the community finds this proposal valuable, I would be glad to contribute to its implementation and help design the necessary changes within Polkadot SDK.
I welcome your feedback and look forward to discussing this further!