Skip to content

Latest commit

 

History

History
131 lines (100 loc) · 7.2 KB

CONCEPTS.md

File metadata and controls

131 lines (100 loc) · 7.2 KB

Introduction

Hash Time Lock Aggreements

Chaincode Upgrade

Peer State Management

Signing Transactions Offline

Wallets

Composite Keys in Chaincodes

Tokens in Fabric System

Event Listners

Iterators and Chaincodes

Interchaincode invocation

Cross Channel Chaincodes

External Chaincodes

Certificate Authority

System ChainCodes

Offchain Storage

Preventing Key Collisions

Concurrency in Chaincodes

Lifecycle of Chaincode

  • Chaincode setup, gRPC communication, protocol execution, interfacing, configuration, business logic
  • deserialisation (unmarshalling) of the ChaincodeInput instance from the ChaincodeMessage payload;
  • creation of a new instance of the ChaincodeStub and configuration of the transaction context
  • It comprises of channel identifier, transaction identifier, input (i.e. ChaincodeInput) and signed proposal;
  • invocation of the Chaincode.Init(ChaincodeStub) or Chaincode.Invoke(ChaincodeStub) method.

Chaincode and gRPC

  • bidirectional communication stream with the peer

Chaincode and Shim concepts

  • The shim is responsible for starting and coordinating the interaction between the Chaincode implementation and the peer processes.
  • Structs are required to be marshalled to JSON string before putting into chaincode state and unmarshalled after receiving from state.

Defining Anchor Peers

  • Once a peer is defined as an anchor peer for a channel - it automatically is anchor peer for all other channels that it participates in.
  • The anchor tracking is being done at org msp level, even thouh it is defined at channel level.

On Fabric Gateway

  • The Gateway runs as a gRPC server
  • The client credentials are never passed to the Gateway

On Fabric Client

  • Client applications are responsible for managaing their user keys
  • Client applications can use the SDK Wallets for this purpose

On Ledger Snapshot

  • A set of files containing all the necessary information for OSN to join a channel from an arbitrary block.

On Ledger Checkpointing

  • It is the construction of a snapshot of a channel at a particular block height
  • Using this peers can join a channel using snapshot as a starting date
  • This is the ability to bootstrap a peer from latest channel configurations

On Private Data Purge

  • a new operation to purge the private data via chaincode shim that allows the deletion of private data keys from the statedb
  • It also enable purging of all the historical versions of the supplied keys from the private data store permanently.

On Range Queries

  • Range queries supported by fabric chaincode use Merkle trees to optimize storage of a range of keys read in a transaction.

On Locking Mechanisms

  • Hyperledger Fabric uses an Optimistic Locking Model while committing transactions.

On Wallets

  • If you have access to your organization admin's private key and certificate, You can use these to load an identity to a Wallet.
  • You can now use this admin identity to connect to the org CA and request to register and enroll more users as required.
  • An identity object can be created from the credentials supplied to you by your administrator or certificate authority

On Adminstrator Users

  • you have to distinguish a CA administrator from a organization administrator.
  • You first enroll the CA administrator, otherwise you cannot register identities.
  • An organization admin is simply an identity with role admin for the organization.