-
Notifications
You must be signed in to change notification settings - Fork 1k
Fabric Next
Status: Draft (not ready for review; not yet prioritized)
This page contains a list of high-level items proposed for development of the next generation Fabric. It includes both existing feature enhancements and new features.
The key motivation for the next generation is modularization to achieve plug-ability and concurrency. As outlined in the next consensus architecture and the next ledger structure, we want to enable different implementations to plug in at different points, including consensus, storage, and membership services. We can achieve concurrency at endorsers and consenters based on the transaction endorsement policy, which allows driving multiple channels of consensus as a service.
The new architecture offers great flexibility in deployments. As the current generation, the simple 1 peer development environment, where a developer may quickly iterate over edit-compile-debug of the fabric code or a chaincode, is still intact. What change are the varieties of network deployment options, from a simple network of a few peers to a complex hundred of peers with different configurations possible.
Conceptually a peer may perform all the functions (submitting, endorsing, ordering, and committing transactions); this is called full peer, or peer. A partial or light peer may perform a specific task like consensus (ordering transactions) or a combination of submitting, endorsing, and committing transactions. A member of a network generally owes a peer and/or some light peers. For high availability, a member may deploy multiple peers but 1 endorsement vote. Currently we have 2 types of peers: Validating peer (VP) and none-validating peer (NVP). We may roughly think of VP as a full peer and NVP as a light peer with submitting and committing tasks.
A simple network could be made up of several full peers, where each peer owed by a member with unique enrollment identity in a permissioned network. Building on this, a member may add more peers to increase availability and to support fail-over; however, these single-member peers must operate as a cluster with 1 vote on endorsement. A cluster of peers could be achieved by a shared ledger and a proxy to dispatch messages to the member peers, or a leader-followers pattern.
Consenters may independently operate to form a consensus network, isolating from the other peer functions (submitting, endorsing and committing transactions). This capability allows the members to set up a consensus network such that it can serve multiple blockchains, which only need to deploy light peers (without consenter enabled). The consensus network can be agnostic to the transactions enabling data isolation such that submitters may replace the transaction payload with its hash.
Currently we have 2 types of chaincodes: System and user chaincodes. System chaincode is built with the peer code and initialized during peer startup, whereas, user chaincode is built during deploy transaction and runs in a sandbox (default to Docker container).
System chaincode concept allows us to reorganize the peer chaincode services into system chaincodes. For example, chaincode life-cycle (deploy, upgrade, terminate), chaincode naming, key management, etc can be implemented as system chaincodes since these are "trusted" operations which require access to the peer.
-
Life-cycle management issue 1127: A chaincode begins life at deployment and ends at termination (out of service). Along this timeline, there might be several upgrades either to fix bugs or to amend functions. We have implemented deployment (via
Deploy
transaction) but have not done (completed) upgrade and terminate. Upgrading of a chaincode is not only involved code changes but also data (and potentially security) migration. We can implement chaincode life-cycle in a system chaincode, named "uber-chaincode", such that, to deploy a chaincode, we would send anInvoke
transaction to the uber chaincode; similarly for update and terminate. This means that, our transaction types now would only consist ofInvoke
andQuery
. AndDeploy
transaction is no longer needed. -
Naming services:
-
Calling another chaincode with security
-
Access control: Enable access control on chaincode deployment, function invocation
- TCert attributes:
- Decentralization:
- Key rotation
- HSM support
- Auditability
- Decouple consensus from peer:
- Dynamic membership: Allowing peers to come and go
- Refactoring (submitter, endorser, committer)
- Consensus channels
- Transaction read/write-set
- Enhance API to enable pluggable data store
- Simulate transaction execution
- Data store reference implementation (file-base)
- World state cache
- Ability to archive/prune "spent" transactions
- SQL-like queries (point in time, filter)
- Enhance message structures: Remove unused or duplicated fields; version number
- Status codes and messages
- Error handling
- Extensions
- Nodejs: Event handling, REST API
- Java
- Go
- No protocol changes
- Protocol changes
- Ledger migration?