Why
Almost every scaling design here takes contention as a given and competes for the block: PBS auctions it, gas prices it, a relayer sequences around it. Linera's premise is that contention is a choice — give each user their own chain and there is nothing to contend for. Worth reading precisely because it rejects the assumption the rest of the catalogue is built on.
How it works
Reading note: the microchain model where each user owns a chain they alone extend, validators run all of them, and cross-chain messages replace shared-state contention. The interesting question the note tracks is not throughput but composability — what happens to an application whose whole point is that many users touch the same state, like an order book.
Related code
"""Linera microchains PoC -- one chain per user, plus a cross-chain message delivery.
Illustrates the core mechanism: independent per-user chains remove contention for a
shared block; interaction between users happens via explicit cross-chain messages.
"""
from dataclasses import dataclass, field
@dataclass
class Microchain:
owner: str
blocks: list[str] = field(default_factory=list)
inbox: list[str] = field(default_factory=list)
def extend(self, operation: str) -> None:
"""Only the owner extends their own chain -- no contention with anyone else."""
self.blocks.append(operation)
def receive(self, message: str) -> None:
self.inbox.append(message)
self.blocks.append(f"applied cross-chain message: {message}")
class Validator:
"""Runs every microchain, and relays messages between them."""
def __init__(self):
self.chains: dict[str, Microchain] = {}
def create_chain(self, owner: str) -> Microchain:
chain = Microchain(owner=owner)
self.chains[owner] = chain
return chain
def send_cross_chain(self, sender: str, recipient: str, message: str) -> None:
self.chains[sender].extend(f"send to {recipient}: {message}")
self.chains[recipient].receive(f"from {sender}: {message}")
if __name__ == "__main__":
validator = Validator()
alice = validator.create_chain("alice")
bob = validator.create_chain("bob")
carol = validator.create_chain("carol")
# Each user extends their own chain independently -- no shared block to contend for.
alice.extend("deposit 10 USDC")
bob.extend("deposit 5 USDC")
carol.extend("deposit 20 USDC")
# One cross-chain message: alice pays bob. This is the only point where chains touch.
validator.send_cross_chain("alice", "bob", "pay 3 USDC")
for name, chain in validator.chains.items():
print(f"\nchain[{name}] blocks:")
for b in chain.blocks:
print(f" - {b}")
docs/code/pocs/linera-microchains.py
Where it lands in Jayverse
- Verex: keep the CLOB on one shared chain rather than assuming it composes under sharding. The order book is exactly the shared-state case this note flags as hard for a per-user microchain model, so if Jayverse ever considers sharding by user, exclude Verex's book from that plan explicitly.
- Devnet: read this as confirmation that Devnet's single shared chain is a deliberate choice. Most Jayverse services (Verex, Token/Bridge) depend on shared state that a per-user chain would fragment, so contention-removal-by-sharding is not a direction to pursue without a specific reason.
Key expressions
| Expression | 뜻 · 쓰이는 자리 |
|---|---|
| take X as a given | X를 당연한 전제로 여기다 · 다른 접근법들이 의심 없이 받아들이는 가정을 지적할 때. "takes contention as a given" |
| compete for | ~을 두고 경쟁하다 · 한정된 자원(블록 공간)을 서로 차지하려 할 때. "compete for the block" |
| reject the assumption | 전제를 거부하다, 근본 가정 자체를 부정하다 · 남들과 다른 출발점을 취할 때. "it rejects the assumption the rest... is built on" |
| extend (a chain) | 체인을 이어나가다, 확장하다 · 사용자가 자기 체인에 블록을 계속 추가할 때. "a chain they alone extend" |
| the whole point | 핵심, 가장 중요한 요지 · 논의에서 진짜 중요한 부분이 무엇인지 짚을 때. "an application whose whole point is that many users touch the same state" |
| contend for | ~을 놓고 다투다, 경합하다 · 공유 자원을 두고 여러 참여자가 겨룰 때. "there is nothing to contend for" |
| PBS | 제안자-빌더 분리(Proposer-Builder Separation) · 블록 생성 권한을 경매로 분리해 컨텐션을 가격 매기는 구조의 예. "PBS auctions it, gas prices it" |