当前位置:网站首页>Hyperledger Fabric2. Some basic concepts of X (1)
Hyperledger Fabric2. Some basic concepts of X (1)
2022-07-06 04:59:00 【JasonCeng_】
▲ Click on 101 Chain horizon , Pay attention not to lose
Hello everyone , I'm a Chuang , This is my number 30 Original articles .
I prefer reading ,2021 My reading volume in the whole year is about 20+ This book , Covering law 、 philosophy 、 technology 、 The humanities .
But the reading volume will feel , Simply reading is actually avoiding , So I decided to sort out my reading and thinking , Write something helpful for everyone .
Recently, I have been thinking about my core competitiveness , I found that we still need to focus on the field of Technology , After a period of groping , Decide to focus on in the near future Fabric Source code , Write a series of articles .
Although there are many interpretations on the Internet Fabric Source blog , But I hope to write something different . I once listened to teacher Zhang Yu's class , He introduced Mr. Hua Luogeng Once said a sentence :“ Count without intuition , It's hard to be subtle when there are few forms .”
I agree with this sentence very much , Therefore, I also want to dare to use charts and words to express my thoughts , Hope for you , It helps me .
This series will use Hyperledger Fabric2.x Analysis based on series .
Fabric The first article of source code interpretation , Titled :《Hyperledger Fabric2.x One of some basic concepts of ( One )》, This paper mainly introduces transaction 、 block Two concepts .
transaction (Transaction, Or transaction ) yes Fabric Core concept of , It usually refers to calling chain code ( Intelligent contract ) An operation to change the ledger status data .
The change of ledger status is described by the transaction result read-write set , Gather transactions through Orderer The nodes are sorted and packed into blocks according to rules .
(1) Ordinary transaction messages encapsulate the execution transaction results of changing the ledger status , It needs to be sorted and packaged into blocks .
(2) The configuration transaction message is used to create a new application channel or update the channel configuration , It is usually packaged into blocks after sorting , At the same time, update the latest configured block number to the latest block metadata to facilitate index search .
block (Block) Refers to a collection of transactions that occur over a period of time , After sorting, package according to rules and add signatures 、 Hash value 、 Data structure composed of timestamp and other metadata .
Blockchain is a chained data structure based on blocks and connected in chronological order .
Fabric Block structure in (Block type ) Including the block head Header、 Transaction data set Data And block metadata Metadata Three parts .
(1) Block head Header Encapsulated block number 、 Hash value of the previous block 、 Hash value of current block
(2) Transaction data set Data Encapsulates the packaged transaction set
(3) Block metadata Metadata Encapsulated as follows 4 Metadata index entries :
BlockMetadataIndex_SIGNATURES: Block signature ;
BlockMetadataIndex_LAST_CONFIG: Block number of the latest configured block ;
BlockMetadataIndex_TRANSACTIONS_FILTER: Latest transaction filter , Encapsulates the transaction data set Data Transaction verification code corresponding to all transactions in , Identify the validity of their transactions .
BlockMetadataIndex_ORDERER:Orderer Configuration information , Such as Kafka Initialization parameters of consensus component .
actually , The real block data structure is much more complex than the above figure , The right of this article should be a good introduction , Lay the foundation for the in-depth introduction later .
Release here Fabric Code of block data structure :github.com/hyperledger/fabric-protos-go/common/common.pb.go
// This is finalized block structure to be shared among the orderer and peer
// Note that the BlockHeader chains to the previous BlockHeader, and the BlockData hash is embedded
// in the BlockHeader. This makes it natural and obvious that the Data is included in the hash, but
// the Metadata is not.
type Block struct {
Header *BlockHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
Data *BlockData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Metadata *BlockMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
We look forward to working together in the future fabric In depth analysis of block data structure , It's like peeling an onion , Step by step , from the shallower to the deeper
If you think it's well written
Please give me a compliment ~
Pay attention to me , Take you to the blockchain industry
Recommended reading :
1、 A useful multi-party privacy intersection algorithm library MultipartyPSI-Pro
4、Web3 What does it mean for us ordinary people ?
5、 What is the latest hot digital collection ?
6、《 Blockchain is a trusted infrastructure for building industrial Internet 》
7、《 Thinking about the layout of privacy Computing 》
8、 read |《 Data asset theory 》: How to capitalize data ?
People who see the future in advance ,
And spend a lifetime can't see clearly ,
Destine is a very different fate .
Click on the card below to follow 101 Chain horizon ******, and 1000+ readers Together **
Insight into the nature of Technology
101 Chain horizon
Blockchain 、 Professional knowledge sharing in the field of privacy computing and fintech .
29 Original content
official account
▲ Click on the card above to follow 101 Chain horizon , Insight into the nature of Technology
Technical communication | Industry Research Report | Frontier insight | Reprint Kaibai | Join the community
Please reply in official account. cooperation
Welcome to share the article to the circle of friends
边栏推荐
- 集合详解之 Map + 面试题
- 2021 robocom world robot developer competition - undergraduate group (semi-finals)
- 团队协作出了问题,项目经理怎么办?
- Simple understanding of interpreters and compilers
- Platformio create libopencm3 + FreeRTOS project
- acwing周赛58
- Ad20 is set with through-hole direct connection copper sheet, and the bonding pad is cross connected
- 驱动开发——HelloWDM驱动
- Uva1592 Database
- Fiddler installed the certificate, or prompted that the certificate is invalid
猜你喜欢
图论的扩展
[FreeRTOS interrupt experiment]
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
[05-1, 05-02, 05-03] network protocol
Programmers' position in the Internet industry | daily anecdotes
yolov5 tensorrt加速
[数学建模] 微分方程--捕鱼业的持续发展
Delete subsequence < daily question >
Compilation et connexion de shader dans games202 - webgl (comprendre la direction)
Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
随机推荐
驱动开发——HelloWDM驱动
MySQL time processing
Postman测试报告
Zynq learning notes (3) - partial reconfiguration
Introduction of several RS485 isolated communication schemes
SQL injection vulnerability (MSSQL injection)
RT thread analysis - object container implementation and function
麦斯克电子IPO被终止:曾拟募资8亿 河南资产是股东
idea一键导包
win10电脑系统里的视频不显示缩略图
The video in win10 computer system does not display thumbnails
Simple understanding of interpreters and compilers
Fuzzy -- basic application method of AFL
Visio draws Tai Chi
【LGR-109】洛谷 5 月月赛 II & Windy Round 6
On the solution of es8316's audio burst
Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
Project manager, can you draw prototypes? Does the project manager need to do product design?
[noip2008 improvement group] stupid monkey
Programmers' position in the Internet industry | daily anecdotes