Demystifying JAM - Presentation
Demystifying
Note:
blog.kianenigma.com/posts/tech/demystifying-jam/
Polkadot 1
- Social
- OpenGov
- DOT Token → Security
- Fellowship
- Technological
- Heterogeneous Execution Sharding, with Shared Security
Note:
Sharding and heterogeneity enabled by the use of WASM.
Heterogeneous Execution Sharding, with Shared Security
Let's break it down:
- Execution Sharding
- With Shared Security
- Heterogeneous
--
Sequential Blockchain
- Opposite of execution sharding.
- How blockchains usually work
--
Poorly Execution Sharded
- Sharding the validator set: less security
--
Execution Sharded with Shared Security
- Original vision of ETH 2 was to be this, with 64 shards.
- ELVES
--
Heterogeneous
- WASM bytecode
--
Evolution of Polkadot
... is all about flexible usage of cores
- You need more to get more out of your core? Async Backing!
- You need more cores? Elastic scaling!
- You don't want to commit to 6m? Agile-coretime!
- You need less than one core? On-demand coretime!
- You want to do something other than a parachain in your core? JAM!
Path of a Parachain Block
--
Path of a Parachain Block
--
Path of a Parachain Block
--
Path of a Parachain Block
--
Path of a Parachain ::: block
Notes:
- Execution by core validators + made available for further auditing
- State root updated by all Polkadot validators
--
On-chain vs. In-core
- In-core
- Executed by a subset of validators + made available for further auditing
- On-chain
- Executed by all validators: state root update.
In-core, on-chain dualism in execution sharding.
--
Data Availability
Polkadot validators already attest to keeping some data available for a long (few weeks) period of time
JAM
Now you know everything to understand JAM.
--
JAM (0)
Gutting of Polkadot such that the following are directly exposed to developers.
- What happens In-core
- What happens On-chain
- What is placed in Data Availability
Note:
A parachain can only control what happens in-core. It cannot really control what happens on-chain. It also cannot readily add any data to the Data availability layer (well, it can, using remarks
, which is a hack)
--
JAM (1)
- ..and removes a lot of blockchain/parachain-centric opinions.
--
JAM (2)
- ..and is therefore an evolution for the Polkadot Relay Chain (Cloud).
- Parachains, Governance, Staking, AH and everything else remains intact.
Removing Opinions
- JAM is programmable via a Service.
- PVM Bytecode.
- Invocation of a service are called a Work Item[1].
- A group of work Items are called Work Package.
Note:
--
In-core and On-chain
- A Service is:
fn refine()
: What happens in-corefn accumulate()
: What happens on-chainfn on_transfer()
: Send messages to other services post accumulate
--
Refine
- Massive amounts of gas available.
- Access to data availability (~28 day persistence)
- No direct access to the JAM state (stateless)
--
Accumulate
- Direct access to the JAM state (stateful)
- Less gas available
- Fully synchronous: Access the refine results of all other services, from possibly all other cores at once.
--
JAM (Recap)
Allowing Services to program exactly how they want to use:
- In-core execution
- On-chain execution
- Data availability
Path of a JAM Work Package
--