Blockspace: The Product of Polkadot
How to use the slides - Full screen (new tab)
Blockspace
In this lesson, we will cover:
- Blockspace as a concept and historical interpretations
- Blockspace as a product of blockchains
- The importance of efficient allocation of blockspace
- The design space of blockspace allocation mechanisms within Polkadot
Notes:
Deep Dive Article is https://www.rob.tech/polkadot-blockspace-over-blockchains/
Blockspace: Definition
Blockspace is the capacity of a blockchain to finalize and commit operations.
Measuring Blockspace
Blockspace can be measured in a few different ways:
- Size: Bytes used by transactions (e.g. Bitcoin)
- Computation: Gas used by transactions (e.g. Ethereum)
- Data: Size of data required to validate transactions (PoV size in Polkadot)
- Or some combination of the above
Blockspace Markets
Fee markets in blockchains are examples of blockspace markets.
The blockchain sells blockspace on-demand, and users pay fees in order to utilize the blockspace.
Blockspace Markets
Parachain slot auctions are another example of a blockspace market.
Instead of selling blockspace on-demand, blockspace is sold in bulk up-front with an auction mechanism.
Blockspace: Supply and Demand
Blockspace in Ethereum: GasToken
GasToken (https://GasToken.io) was an early Blockspace Futures Market on Ethereum.
Ethereum provides a gas refund for storage slots being cleared in smart contract execution.
By "pre-buying" storage when gas is cheap and getting the refund when gas is expensive, users can perform blockspace arbitrage in Ethereum!
Evaluating Blockspace
3 Properties of Blockspace:
- Quality: How secure is the blockspace? What are the economic guarantees of finality?
- Availability: How much blockspace is available on the market?
- Flexibility: How many applications can the blockspace be used for?
Polkadot's Blockspace: Quality
Polkadot's Execution Sharding guarantees that all blockspace generated by Polkadot is highly secure, with economic guarantees of finality under the 33% BFT assumption.
Polkadot's Blockspace: Availability
With sharding, Polkadot has the capability to produce large amounts of blockspace. This is another lens to view the blockchain scaling problem through: creating more blockspace.
Polkadot's Blockspace: Flexibility
Polkadot provides blockspace in a highly flexible format due to key design choices:
- WebAssembly: This turing-complete language allows all kinds of computation to be done.
- PoV Blobs: Unopinionated about storage formats or access patterns.
- Head-Data blobs: Parachains can use any header format they like and don't even have to be blockchains, strictly speaking.
Substrate: The Blockspace Transformer
Since Polkadot provides highly flexible blockspace, it can be transformed into a variety of different, more specialized blockspace products.
Principles of Blockchain Application Development
- Acquire generalized blockspace (from Polkadot, from validators directly)
- Specialize blockspace for a particular use-case or requirement
- Downstream demand drives upstream demand.
Notes:
By (3) I mean that the amount of demand for (2) should inform the amount to which the application does (1).
Problem: Ghost Chains
It's quite common for chains to produce mostly empty blocks.
This is a problem: chains are buying more blockspace than they need!
They are paying validators to do nothing of value, and this will lead to depreciation of their token.
Solution: Acquire Blockspace on-demand
Blockchains as needing to produce blocks every X seconds or minutes.
Blockchains should only produce blocks when they have a good reason to.
The main reason this is not done is because there are no good primitives for it.
Polkadot's Architecture: Execution Cores
Notes:
Cores, by metaphor, are like CPU cores. Code and data are scheduled onto them by the "Operating System" and then executed.
Polkadot's Architecture: Execution Cores
Long-term vs. on-demand
On-demand are analogous to "spot" instances and slot auctions are analogous to "reserved" instances in cloud computing.
Spot instances may be more expensive if overall demand is high, but help to soothe load.
Coretime
Within Polkadot, we measure the amount of blockspace that an application can use in coretime.
Just like a CPU and OS, there is a scheduler that multiplexes many
different processes onto execution cores.
Coretime is acquired through either primary or secondary marketplaces.
Elastic Scaling (planned upgrade)
What if parachains could acquire not just one execution core at a time, but multiple?
Parachains would then be able to elastically scale during periods of higher demand.
Notes:
This scaling can occur as a result of the property that in Polkadot, parablock state transitions are completely encapsulated and validation of block X+1 can occur in parallel with validation of block X.
However, the parablocks still must be authored sequentially by collators, and for that reason this can only be used to scale up to the maximum throughput of collators authoring blocks.
Reimbursement Layer: Status Quo
Reimbursement Layer: Generalizing
Notes:
User could be a collator itself, or perhaps just someone fulfilling a market need (blockspace arbitrage!)
Reimbursement Layer: Use Cases
- Pay Collators somewhere other than the chain they build upon
- Pay Collators in stablecoins or other tokens
- Tokenless parachain
- Parachain Launch Pad (e.g. pay out of "credits" on some other system)
- Generalized Collator Pool (plug and play, no need to run nodes specific to parachain)
Blockspace and Interoperability
In interoperable blockchain applications, the application is only as good as the weakest chain it relies upon.
It is important not to mix high-quality blockspace with low-quality, due to toxicity risks.
Ephemeral Chains
Is there any reason a blockchain should run forever?
Why not create blockchains that run for a limited period of time, e.g. to run some specific protocol or computation, and then conclude?
Coretime Futures Markets
With the right core-level primitives, it will be possible to transfer claims on future coretime.
Secondary markets can emerge, perhaps using NFTs, on parachains themselves, to facilitate the market for future coretime.
This will create an efficient market and price discovery for coretime via arbitrage.
Future Coretime Allocation Mechanisms
If coretime is the "product" of Polkadot, then allocation mechanisms are the "packaging".
RFC-1 proposes mechanisms for bulk coretime to be sold off, renewed, split up, resold, and transferred.
Blockspace: Conclusions
- Blockspace is an conceptual distillation of blockchain resources
- Blockspace provides new lenses on the scheduling and lifecycle of blockchains
- Polkadot measures blockspace allocation using coretime
- Efficient allocation of blockspace will be critical as Web3 systems scale to serve 8 billion people.
- Polkadot's architecture is blockspace-centric, not blockchain-centric, and provides many options for builders to use its product.