Loading...
Loading...
Midnight transaction lifecycle — proof-based unsigned ledger transactions, transaction pool validation, runtime proof verification, ZSwap and contract operations, and on-chain state commits. Use when explaining how txs differ from standard Substrate signed extrinsics.
npx skill4agent add kali-decoder/midnight-skills midnight-transactionsflowchart TB
Build["Build transaction + ZK proof<br/>(wallet / SDK)"]
Submit["Submit to node RPC / P2P"]
Pool["Transaction pool<br/>well-formedness check"]
Block["Included in block"]
Verify["Runtime verifies embedded proof"]
Execute["Execute state transition"]
Commit["Commit to trie + ledger commitment"]
Build --> Submit --> Pool
Pool -->|Valid structure| Block
Pool -->|Reject| Reject["Dropped from pool"]
Block --> Verify
Verify -->|Invalid proof| Fail["Transaction fails"]
Verify -->|Valid| Execute --> Commit| Traditional chain | Midnight |
|---|---|
| Signature authorizes action | Cryptographic proof attests validity |
| Public signer identity | Sensitive data stays off-chain / in proof |
| Standard extrinsic format | Ledger-specific transaction envelope |
sequenceDiagram
participant Client
participant Pool as Tx pool
participant Block as Block author
participant RT as Runtime (pallet-midnight)
Client->>Pool: Submit unsigned proof tx
Pool->>Pool: Well-formedness validation
alt Invalid
Pool-->>Client: Reject
else Valid
Pool->>Block: Candidate for inclusion
Block->>RT: Execute in block
RT->>RT: Full proof verification
RT->>RT: State transition + commit
endpallet-midnight| Check | Where | What |
|---|---|---|
| Well-formedness | Transaction pool | Structure, basic validity |
| Proof verification | Runtime ( | Full cryptographic validation |
| State transition | Runtime | ZSwap / contract state update |
| Persistence | Storage layer | Trie + ledger commitment |
| Layer | Skill |
|---|---|
| Prove + submit txs | |
| Contract logic | |
| Read results | |
midnight-onchain-logic/pallet-midnightmidnight-storage/midnight-consensus/midnight-rpc/compact/