Skip to main content

The Blockchain Stack Explained — Every Layer Enterprise Architects Must Know

· 9 min read
Prasad Kumkar
Founder & CEO, ChainScore Labs

Blockchain platforms are often presented as monoliths — "Hyperledger Fabric" or "Ethereum" as a single thing. They're not. Every blockchain is a stack of independent layers, each making specific design choices that determine the platform's characteristics.

Understanding these layers — and how different platforms make different choices at each one — is the difference between evaluating blockchain platforms and being sold one.


The 7-Layer Enterprise Blockchain Stack

┌─────────────────────────────────────────────────────────┐
│ 7. APPLICATION LAYER │
│ DApps, dashboards, integrations, external systems │
├─────────────────────────────────────────────────────────┤
│ 6. GOVERNANCE LAYER │
│ Membership, voting, upgrades, policy management │
├─────────────────────────────────────────────────────────┤
│ 5. API LAYER │
│ REST/gRPC, CLI, SDKs, query interfaces │
├─────────────────────────────────────────────────────────┤
│ 4. EXECUTION LAYER │
│ Smart contracts, virtual machines, sandboxes │
├─────────────────────────────────────────────────────────┤
│ 3. DATA LAYER │
│ World state, block storage, indexing, queries │
├─────────────────────────────────────────────────────────┤
│ 2. CONSENSUS LAYER │
│ Consensus algorithm, block production, validation │
├─────────────────────────────────────────────────────────┤
│ 1. NETWORKING LAYER │
│ P2P, TLS/WS, peer discovery, message protocols │
└─────────────────────────────────────────────────────────┘

Layer 1: Networking

What it does: Enables nodes to discover each other, establish secure connections, and propagate blocks and transactions.

Key Design Decisions

DecisionOptionsImpact
TransportWebSocket, gRPC, libp2pWS: simple, browser-friendly. gRPC: binary, efficient. libp2p: modular, complex
TopologyFull mesh, partial mesh, hub-spokeFull: most resilient, O(n²) connections. Hub-spoke: simpler, single point
DiscoveryStatic peers, DNS seeds, DHT (Kademlia)Static: explicit list. DNS: dynamic. DHT: decentralized, complex
SecurityTLS, mTLS, Noise protocolmTLS: mutual auth (used by Fabric). Noise: modern, simpler (used by libp2p)

How Platforms Compare

PlatformTransportTopologySecurity
MiniLedgerWebSocketPartial meshTLS + Ed25519 signing
Hyperledger FabricgRPCHub-spoke (orderer hub)mTLS (X.509 certs)
R3 CordaAMQP/HTTPPoint-to-pointTLS + certificates
Besu/Quorumdevp2p (Ethereum)Partial meshTLS
Azure ACLTLS (CCF)Full meshSGX attestation

Enterprise consideration: WebSocket is simpler to operate and debug than gRPC. Full mesh is maximally resilient but adds connection overhead. For consortiums of 3-15 nodes, WebSocket + partial mesh is the pragmatic choice.


Layer 2: Consensus

What it does: Ensures all nodes agree on the order and content of blocks. The hardest problem in distributed systems.

Key Design Decisions

DecisionOptionsImpact
Fault modelCFT (Raft), BFT (PBFT, IBFT, QBFT)CFT: simpler, faster. BFT: tolerates malicious nodes
Leader modelSingle leader (Raft), Round-robin (IBFT), Leaderless (Tendermint)Leader: simpler, write bottleneck. Round-robin: fairer. Leaderless: most complex
Block productionTimer-based, transaction-count-based, hybridTimer: predictable. Count: efficient. Hybrid: best of both
FinalityImmediate (Raft/BFT), Probabilistic (PoW/PoS)Immediate: certain. Probabilistic: eventually certain, more confirmations needed

How Platforms Compare

PlatformAlgorithmFault ModelLeaderFinality
MiniLedgerRaftCFTSingle leaderImmediate
Fabric (orderer)RaftCFTSingle leaderImmediate
BesuIBFT 2.0 / QBFTBFTRound-robinImmediate
QuorumRaft / IBFTCFT or BFTConfigurableImmediate
CordaNotary-basedCFT (notary)ConfigurableImmediate

Enterprise consideration: For known, legally-bound participants, CFT (Raft) is sufficient. BFT adds complexity for protection you don't need if legal agreements exist. Full consensus comparison →


Layer 3: Data

What it does: Stores the blockchain state and provides query capabilities. The layer most visible to application developers.

Key Design Decisions

DecisionOptionsImpact
State storeSQLite, LevelDB, CouchDB, RocksDB, PostgreSQLDetermines queryability and performance
Query languageSQL, Mango (NoSQL), KV only, custom APISQL: familiar, powerful. KV only: fast, limited
Data modelKey-Value, UTXO, Account-based, SQL/relationalKV: simple, flexible. UTXO: natural for assets
Block storageFlat files, database-backed, object storageFiles: simple. DB: queryable. Object: scalable

How Platforms Compare

PlatformState StoreQuery LanguageData Model
MiniLedgerSQLite (WAL)Full SQL + JSON functionsKey-Value (JSON values)
Fabric (LevelDB)LevelDBKey-range onlyKey-Value
Fabric (CouchDB)CouchDBMango (NoSQL)JSON documents
Amazon QLDBProprietary (AWS)PartiQL (SQL-compatible)Document/Journal
Azure ACLKV StoreKey-value onlyKey-Value
CordaRelational (H2/SQL)JPA / SQLUTXO / relational

Enterprise consideration: SQL queryability is the most underrated feature in blockchain platforms. If your team needs to answer "show me all accounts with balance > 1000 and last active in the past 30 days," choose a platform where that's a SQL query, not an external indexing project.

Full SQLite deep dive →


Layer 4: Execution

What it does: Runs smart contract code in a secure, isolated environment. Produces deterministic state transitions.

Key Design Decisions

DecisionOptionsImpact
LanguageGo, JavaScript, Kotlin/Java, Solidity, RustDetermines who on your team can write contracts
RuntimeDocker container, JS sandbox, EVM, WASM, JVMDocker: strongest isolation, heaviest. Sandbox: lightest, less isolated. EVM: battle-tested
Execution modelOrder-execute (Fabric), Execute-order-validate (Ethereum), Execute-order (Corda)Order-execute: deterministic. EOV: prevents non-determinism. EO: Corda's model
Gas/limitsGas metering (Ethereum), Timeout (MiniLedger), Resource limits (Fabric)Gas: economic. Timeout: simple. Resource limits: configurable

How Platforms Compare

PlatformLanguageRuntimeExecution Model
MiniLedgerJavaScriptnew Function() sandboxExecute in sandbox
FabricGo, Java, Node.jsDocker containerOrder-execute
CordaKotlin, JavaJVM sandboxExecute-order
Besu/QuorumSolidityEVMEOV
QLDBN/A (no contracts)N/AN/A

Enterprise consideration: Match the contract language to your team's skills. If your team is Node.js, don't choose a platform that requires Go or Solidity. The language barrier adds months to your timeline.

Full smart contracts guide →


Layer 5: API

What it does: Exposes the blockchain to applications — submitting transactions, querying state, monitoring events.

Key Design Decisions

DecisionOptionsImpact
ProtocolREST, gRPC, WebSocket, GraphQLREST: universal. gRPC: performant. WS: real-time. GraphQL: flexible
Query interfaceSQL endpoint, KV get/scan, custom query API, GraphQLSQL: powerful, dangerous. KV: safe, limited
Event streamingWebSocket, Server-Sent Events, Kafka, pollingWS: real-time. SSE: simpler. Kafka: enterprise-grade
AuthenticationAPI keys, JWT, mTLS, wallet signaturesmTLS: strongest. JWT: familiar. Wallet: blockchain-native

How Platforms Compare

PlatformProtocolQueryEventsDashboard
MiniLedgerREST + WebSocketSQL endpointWS eventsBuilt-in SPA
FabricgRPC + REST proxyChaincode queriesEvent hubSeparate tool
CordaREST (via Corda RPCOps)Vault queriesObservable flowsSeparate tool
BesuJSON-RPC (Ethereum)eth_call, eth_getLogsFilters + WSSeparate tool (Blockscout)
QLDBAWS SDK (REST)PartiQLJournal exportsAWS Console

Enterprise consideration: A built-in dashboard/block explorer saves months of development. If the platform requires a separate explorer, budget for building or deploying it.


Layer 6: Governance

What it does: Manages consortium membership, policy changes, contract upgrades, and dispute resolution.

Key Design Decisions

DecisionOptionsImpact
Member managementOn-chain (transactions), Off-chain (consortium vote), HybridOn-chain: auditable. Off-chain: flexible
Voting mechanism1-org-1-vote, weighted, token-based, consensus-based1-org-1-vote: fair. Weighted: reflects contribution
Proposal lifecycleSubmit → Vote → Execute, Submit → Discuss → Vote → ExecuteFewer stages: faster. More stages: more deliberation
Upgrade mechanismHard fork, soft fork, contract upgrade, config updateContract upgrade: safest. Hard fork: most disruptive

How Platforms Compare

PlatformMember MgmtVotingContract UpgradesBuilt-in
MiniLedgerOn-chain proposals + votingConfigurable thresholdYes (versioned)Yes
FabricOff-chain (config update tx)Manual coordinationNew chaincode lifecycleNo (manual)
CordaOff-chain (network parameters)ManualNew CorDapp versionNo
BesuOn-chain (validator voting)IBFT/QBFT votingContract re-deployPartial
ACLOn-chain (CCF governance)Consortium voteMember-managedYes

Enterprise consideration: On-chain governance provides an auditable, cryptographically verifiable record of every decision. Off-chain governance (Fabric's model) relies on trust that the process was followed correctly. For regulated industries, on-chain governance is strongly preferred.

Full governance guide →


Layer 7: Application

What it does: The software your users actually interact with — the reason you're building a blockchain in the first place.

Key Design Decisions

DecisionOptionsImpact
Integration patternEmbedded library, separate service, managed serviceEmbedded: tightest integration. Separate: decoupled. Managed: zero ops
FrontendCustom web app, dashboard, mobile, API-onlyDashboard: quick visibility. Custom: tailored UX
Data syncDirect queries, event-driven, ETL pipelineDirect: simplest. Event-driven: reactive. ETL: for analytics
Identity integrationSSO, existing IAM, custom wallet, API keysSSO: familiar. IAM: enterprise. Wallet: blockchain-native

Platform-Specific Stack Choices

Here's how different platforms assemble these layers:

MiniLedger Stack

Application  ← Your Node.js app (import { MiniLedger })
Governance ← On-chain proposals + voting (built-in)
API ← REST + WebSocket + SQL endpoint + built-in dashboard
Execution ← JavaScript sandbox (new Function, 5s timeout)
Data ← SQLite WAL (full SQL, JSON functions)
Consensus ← Raft CFT
Networking ← WebSocket mesh, Ed25519 identity

Hyperledger Fabric Stack

Application  ← Separate application (SDK: Go, Node.js, Java)
Governance ← Off-chain (manual configuration updates)
API ← gRPC (peer) + REST proxy (optional)
Execution ← Docker containers (Go/Java/Node.js chaincode)
Data ← LevelDB (KV) or CouchDB (Mango queries)
Consensus ← Raft CFT (ordering service, separate process)
Networking ← gRPC, mTLS (X.509 PKI), Fabric CA

Ethereum (Besu) Stack

Application  ← dApp (web3.js/ethers.js)
Governance ← Token-based or validator voting
API ← JSON-RPC (Ethereum standard)
Execution ← EVM (Solidity bytecode)
Data ← LevelDB or RocksDB (Patricia Merkle trie)
Consensus ← IBFT 2.0 / QBFT / PoA (for permissioned)
Networking ← devp2p (Ethereum wire protocol)

Choosing Your Stack: The Decision Framework

Rather than comparing platforms as monoliths, compare them layer by layer:

LayerKey QuestionIf Answer Is...Then Look For...
NetworkingHow many nodes? In what topology?3-15 nodesWebSocket or gRPC, partial mesh
ConsensusKnown, legally-bound participants?YesCFT (Raft) — simpler, faster
DataNeed SQL queries on state?YesSQLite or PartiQL, not KV-only
ExecutionWhat's your team's primary language?Node.js/TSJavaScript contracts
APINeed a built-in dashboard?YesPlatforms with built-in explorer
GovernanceNeed auditable governance?YesOn-chain governance, not off-chain

The platform that matches your answers at the most layers is your best fit. If no platform matches, you may be looking for a solution that doesn't exist yet — or you may need to compromise at the layers where the mismatch is least painful.


The Bottom Line

Blockchain platforms aren't magic. They're stacks of well-understood technologies — networking protocols, consensus algorithms, databases, virtual machines, and APIs — assembled in specific ways to solve specific problems.

When a vendor tells you their platform is "better," ask: "At which layer? And by what metric?" If they can't answer that question, they're selling, not informing.

Next: See how platforms compare →


About the Author

Prasad Kumkar is the Founder & CEO of ChainScore Labs. Over the last 5+ years, he has worked with teams building exchanges, DeFi infrastructure, smart contracts, tokenization systems, and protocol-level blockchain products, helping founders make architecture, security, and go-live decisions for production Web3 systems.