#1 Fluffy Labs Meetup
Wrocław, 12 Dec 2024
#1 Fluffy Labs Meetup
Wrocław, 12 Dec 2024
2 Piętro (Klub Proza)
Agenda
-
Od Polkadot do JAM - high level to nitty gritty
Tomek Drwięga -
Polka Virtual Machine - co z tym zrobić?
Mateusz Sikora
Sponsor
Polkadot to JAM
high level overview to nitty gritty details
Tomek Drwięga
@tomusdrw
Core Developer
Historical view
Ethereum
Polkadot
Gavin Wood
2014 - 2016
2016 - 2017
2017 -
Ethereum 2016
- Sequential execution of ALL transactions
- Slow, custom VM (EVM), lack of dev tooling
- + additional factors (slow state)
- = high congestion & fees
Polkadot 2017
- SHARDED blockchain but SHARED security
- Shard (aka Parachain) - independent blockchain
- Shard EXECUTION is VERIFIED on Relay Chain (L0/L1)
- Checking STF by randomized set of Validators
- Verification data distributed for auditability (DA)
Polkadot 2017
- Each SHARD/Rollup is programmable
- Every SHARD can be a different blockchain
(HETEROgeneous vs HOMOgeneous) -
Polkadot-SDK framework compiles
State Transition Function to WebAssembly - Decentralized Sequencers
- XCMP messaging
more cool stuff
Ethereum 2019-...
- Ethereum (L1) has heterogeneous Rollups (L2)
- No hard requirements on what constitutes a rollup:
- Is it possible to verify STF?
- Is there enough data?
- Finality?
- Fraud proofs?
Do shards / rollups work?
BUT, shards have their own issues...
- Sync both SHARD (L2) and the RELAY CHAIN (L1)
to know the latest state -
In-SHARD communication = easy
- Smart contracts speaking to each other
-
Cross-SHARD comms = hard!
- What's the state of other shard?
- Asynchronous communication
-
XCM is there in Polkadot, but async
is not "familiar paradigm" for devs
🤖 Too much NERD STUFF!!!!
Bitcoin
SOFTWARE to transfer FUNDS
from Alice to Bob
Ethereum
PLATFORM to run Smart Contracts (programmable money)
+ rollups Data Availability & settlement*
Polkadot
- A self-governed DAO
-
Offering Services like:
Staking, Governance, Treasury, Tokens - Smart Contracts Platform (soon on AH)
- Blockchain hosting platform
Cloud
- Blockchain Hosting Platform
- Build with Polkadot-SDK
- Deploy to Polkadot Cloud
-
AWS for Web3
- Secure execution
- Economical Finality
- Data Availability
- Object Storage
Hub
- Running on Polkadot Cloud
it's first blockchain app! -
Polkadot Ecosystem
- Community,
- Collectives,
- DOT token,
- Governance
- Directed for end-users
Polkadot
Next generation of Polkadot Cloud
Polkadot Hub stays exactly the same
(so do other apps running on the Cloud)
- Run not only blockchains but arbitrary Web3 Services
- no transactions
-
Blurring the line between:
- Building and deploying a "traditional" application
- database + server + long-running execution
- Building and deploying a blockchain
- state trie + transactions + per-block execution
- Building and deploying a "traditional" application
-
PolkaVM (PVM)
state of the art Virtual Machine, much faster than WASM
JAM What?
- More generic definitions of execution primitives
-
In-Core execution
- controlled by parachain block (programmable)
-
On-Chain execution
- prev. done at RC (NOW: programmable)
-
Data Availability
- prev. distributing block data (NOW: programmable)
-
In-Core execution
JAM What?
Details please!
Details please!
- JAM supports services (PVM bytecode), with entry points
- refine - in-core execution
- accumulate - on-chain execution
- on_transfer - incoming transfer from a service
- Service can be invoked via WorkPackage (1 to 4 WorkItems)
- WorkPackage is distributed in the Data Lake for availability
-
Validators execute in-core portion of the
WorkPackage and produce WorkResult (refinement) - WorkResults are aggregated into blocks and accumulated there (on-chain execution).
JAM "hardware" Spec
-
1023 Validators
supporting 1.6PB=1.6mil GB (~ 1.5TB per validator) of data in the DA layer (Data Lake) -
341 available cores
3 validators per core; throughput: potentially 682MB/s (2MB/s per core) -
On-chain Reactor
synchronous execution; throughput: 2-6MB/s
(that's the only thing most blockchains have currently)
JAM Service
-
refine (in-core)
- parallel - currently rollup blocks
-
accumulate (on-chain)
- synchronous - currently relay chain
refine phase (in-core)
- state-less
(but can read&write to data availability layer) -
quite a lot of gas available
(long execution time) -
parallel execution across cores
(no info about other cores though)
accumulate phase (on-chain)
- direct access to the on-chain state
- less gas available (constrained)
-
fully synchronous access to WorkResults
(all services; possibly from all cores at once)
What does it all mean?
🔥 Hot take: JAM is a simpler protocol than Polkadot
CoreChains Service
- Running Polkadot Hub
- Running all existing shards (parachains)
- Backward compatibility with Polkadot Cloud
CoreVM Service
- Compile regular program (Rust, C++) to PVM
- Execute like blockchain "Virtual Machine" (in-core)
- Pause and resume between blocks
CorePlay Service
- Smart Contracts hosting platform
- Multi-core scalability
- Execute Solidity and ink!
- Open and Permissionless
Tomek Drwięga
@tomusdrw
Core Developer
#1 Fluffy Labs Meetup Wrocław
By Tomasz Drwięga
#1 Fluffy Labs Meetup Wrocław
- 13