CN113259131A - Block chain node, system and block chain construction method - Google Patents

Block chain node, system and block chain construction method Download PDF

Info

Publication number
CN113259131A
CN113259131A CN202110695905.5A CN202110695905A CN113259131A CN 113259131 A CN113259131 A CN 113259131A CN 202110695905 A CN202110695905 A CN 202110695905A CN 113259131 A CN113259131 A CN 113259131A
Authority
CN
China
Prior art keywords
block chain
node
module
transaction data
consensus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110695905.5A
Other languages
Chinese (zh)
Other versions
CN113259131B (en
Inventor
杨文韬
樊家合
杨珍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Bixin Internet Technology Co ltd
Original Assignee
Beijing Bixin Internet Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Bixin Internet Technology Co ltd filed Critical Beijing Bixin Internet Technology Co ltd
Priority to CN202110695905.5A priority Critical patent/CN113259131B/en
Publication of CN113259131A publication Critical patent/CN113259131A/en
Application granted granted Critical
Publication of CN113259131B publication Critical patent/CN113259131B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • H04L9/3265Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements using certificate chains, trees or paths; Hierarchical trust model
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention provides a block chain node, a system and a block chain construction method, wherein the node comprises: the network layer is connected with the network layers of other block chain nodes in the block chain and is used for acquiring the transaction data to be processed in the block chain; the consensus layer is connected with the network layer and used for determining a consensus result of the transaction data to be processed; the application layer is connected with the common identification layer and comprises a standard module and an extension module; the standard module is used for processing the transaction data to be processed based on the standard service processing logic and the consensus result; the expansion module is used for processing the transaction data to be processed based on the extra service processing logic; the extension module corresponds to the type of the block chain; the additional business processing logic is business processing logic other than the standard business processing logic. The node, the system and the method provided by the invention solve the problem of building the block chains of the same source and different types, reduce the cost of building the block chains and improve the flexibility of building the block chains.

Description

Block chain node, system and block chain construction method
Technical Field
The invention relates to the technical field of computers, in particular to a block chain link point, a block chain link system and a block chain construction method.
Background
The block chain is a distributed shared account book and a database, and has the characteristics of decentralization, no tampering, trace retaining in the whole process, traceability, collective maintenance, openness and transparency and the like. According to the networking mode of the nodes, the block chain can be divided into a public chain and a alliance chain. Public links are blockchain networks in which members can join freely, and node members are unlimited and the number is unlimited. A federation chain is a network of federation chains in which only permitted members can join, the members of the federation chain are fixed and the members are well known to each other.
The existing block chain items are positioned clearly and have single properties. Different types of block chains are realized by adopting special design software and source code engineering, and cannot be converted or transformed mutually.
Therefore, how to construct a block chain so that the same source code can support both a federation chain and a public chain is an urgent issue to be solved in the industry at present.
Disclosure of Invention
The invention provides a block chain node, a block chain system and a block chain construction method, which are used for solving the technical problem of how to construct a block chain in the prior art so that the same source code can simultaneously support a alliance chain and a public chain.
The invention provides a block link point, comprising:
the network layer is connected with the network layers of other block chain nodes in the block chain and is used for acquiring the transaction data to be processed in the block chain;
the consensus layer is connected with the network layer and used for determining a consensus result of the transaction data to be processed;
the application layer is connected with the consensus layer and comprises a standard module and an extension module; the standard module is used for processing the transaction data to be processed based on standard business processing logic and the consensus result; the expansion module is used for processing the transaction data to be processed based on additional business processing logic; the extension module corresponds to the type of the block chain; the additional business processing logic is business processing logic other than the standard business processing logic.
According to the blockchain node provided by the invention, the standard service processing logic comprises the steps of verifying and executing the transaction data to be processed based on the consensus result, and updating the state of the blockchain.
According to the block chain node provided by the invention, the application layer adopts a finite-state machine model.
According to the block chain node provided by the invention, the application layer also performs validity check on the transaction data to be processed based on the current state of the block chain node, and the transaction data to be processed is stored in a transaction queue pool.
According to the block chain node provided by the invention, the expansion module comprises at least one of a certification module, a cost module and a node authorization module.
According to the block chain node provided by the present invention, the node authorization module is configured to:
determining an authorization result of each node in the block chain based on an authorized node list;
the authorized node list stores authorized nodes and connection information between the authorized nodes in a binary tree mapping data structure.
According to the blockchain node provided by the invention, the network layer is realized based on the LibP2P and is further used for realizing message broadcasting, event subscription publishing and node self-discovery in the blockchain.
According to the block chain node provided by the invention, the consensus layer is further used for generating a block corresponding to the transaction data to be processed based on the transaction data to be processed.
The invention also provides a block chain system, which comprises a plurality of block chain nodes; the type of the block chain system is a public chain or a alliance chain.
The invention also provides a block chain construction method, which is applied to the block chain link points and comprises the following steps:
determining the type of a block chain to be constructed;
determining an expansion module in a block chain node application layer based on the type of the block chain to be constructed;
determining the block chain node based on the extension module, the standard module, the network layer and the consensus layer;
and determining the block chain to be constructed based on a plurality of block chain nodes.
The invention provides a block chain node, a block chain system and a block chain construction method, which comprise a network layer, a consensus layer and an application layer, wherein the network layer is used for acquiring to-be-processed transaction data in a block chain, the consensus layer is used for determining a consensus result of the to-be-processed transaction data, the application layer is used for processing the consensus result, determining the state of the block chain and processing the to-be-processed transaction data, and an extension module in the application layer is determined by the type of the block chain.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a block chain node provided in the present invention;
FIG. 2 is a schematic diagram of a homologous amphibious block chain node provided by the present invention;
fig. 3 is a flowchart illustrating a block chain construction method according to the present invention.
Reference numerals:
100: a block chain node; 110: a network layer; 120: a consensus layer; 130: an application layer;
131: a standard module; 132: and an expansion module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the public chain, the nodes can freely join and leave the block chain network, the nodes can join in consensus, data in the whole network can be read, and transactions can be sent without limitation. A federation chain is a block chain network that verifies and authorizes admission of nodes. The alliance chain block chain network is a distributed ledger node network which has known node identities and authenticates and authorizes the node identities. The technology of the alliance chain has its own specialized software design and source code engineering implementation. The mainstream alliance chain items include super book Fabric, R3 Corda, Qurom, BCOS and other items, which use different architectural designs, system models, component models and programming languages, including Go language, C + + language and Kotlin language under the Java system. The mainstream public link items include Bitcoin, Ethereum and the like, and the Account models are different, wherein Bitcoin is a UXTO Account model, Ethereum is an Account Account model, programming languages are different, Bitcoin is developed in a C + + language, and Ethereum is developed in a Go language. If the project of the public chain is to be transformed into the alliance chain, a great deal of effort is required. The same problem exists in the process of modifying the existing mainstream alliance chain into the alliance chain project. The same code is used to meet the requirements of the public chain and the alliance chain project at the same time, and the technical problem to be solved is urgent.
In view of the deficiency of the prior art, fig. 1 is a schematic structural diagram of a block chain node provided in the present invention, and as shown in fig. 1, a block chain node 100 includes:
the network layer 110 is connected with network layers of other block chain nodes in the block chain and used for acquiring to-be-processed transaction data in the block chain;
the consensus layer 120 is connected with the network layer 110 and used for determining a consensus result of the transaction data to be processed;
an application layer 130 connected with the consensus layer 120 and including a standard module 131 and an extension module 132; the standard module 131 is configured to process the transaction data to be processed based on the standard service processing logic and the consensus result; the expansion module 132 is configured to process the transaction data to be processed based on the extra service processing logic; the extension module 132 corresponds to the type of blockchain; the additional business processing logic is business processing logic other than the standard business processing logic.
Specifically, the nodes of the public chain and the federation chain can be analyzed, the common part of the nodes is realized by using a universal module, and the difference part of the nodes is completed by using independent modules. Different modules are called according to the type of blockchain. Therefore, the blockchain node 100 can be functionally decoupled and then divided into three layers, namely a network layer 110, a consensus layer 120 and an application layer 130. And the layers are connected by adopting an interface protocol.
The network layers 110 of the nodes in the blockchain are interconnected to obtain the transaction data to be processed in the blockchain. The transaction data to be processed is the transaction data submitted by the user through the terminal, the transaction data to be processed needs to be packaged into blocks, and after consensus, a block chain is generated. The business type corresponding to the transaction data to be processed can be commodity transaction, energy transaction, financial transaction and the like. The embodiment of the present invention does not specifically limit the service type of the transaction data to be processed. For example, when the service type corresponding to the transaction data to be processed is an energy transaction, the transaction data to be processed may include a transaction id (identity document), seller personal information, buyer personal information, an energy type, seller energy storage amount, energy transaction amount, bidding times, bidding duration, bargaining price, transaction amount, transaction time, and the like.
The consensus layer 120 is coupled to the network layer 110 for determining a consensus result for the pending transaction data. Consensus refers to the process by which blockchain nodes 100 in a blockchain validate and validate submitted transaction data to be processed to allow the generation of new blocks. The consensus method comprises agent consensus and whole member consensus. The agent consensus is to select a plurality of nodes from all nodes in the blockchain network as agent nodes, so that all nodes in the agent network agree on the block. The global consensus is performed for all nodes in the blockchain network to agree on the block. The consensus algorithm adopted by the consensus layer includes pow (Proof Of work), pos (Proof Of stamp), dpos (delayed Proof Of stamp), BFT (Byzantine Fault Tolerance), and the like.
The traffic processing logic in the blockchain may include standard traffic processing logic and additional traffic processing logic. The application layer 130 is connected to the consensus layer 120, and adopts a modular architecture, which is composed of standard modules 131 and extension modules 132. The application layer 130 processes the consensus result through the standard module 131 to determine the state of the blockchain. If the transaction data to be processed passes the consensus, the standard module 131 adds the block generated by the transaction data to be processed into the block chain according to the consensus result and the standard service processing logic, and updates the state of the block chain. The state of the block chain specifically refers to the state of each node. When a node in the blockchain performs a transaction, the state of the node changes. For example, consensus algorithms require a node to achieve consensus at intervals, which is a state at intervals from the perspective of a state machine. For another example, when a block appears in the block chain, after each node recognizes the block, and processes the transaction data corresponding to the block, a block is newly added to the node, so as to update the state. For another example, the blockchain is an energy trading market, and the state changes once after each energy trading is finished, and is an ongoing reinforcement learning process of "state-action-reward", wherein the state is a market environment, the action is a trade, and the reward is a utility obtained by two trading parties.
The application layer 130 processes the pending transaction data via the extension module 132, such as settling transaction fees based on the pending transaction data, and the like.
The number of the extension modules 132 may be plural, and the configuration may be selected according to the type of the block chain. Types of blockchains include public chains and federation chains. For example, if the blockchain is a public chain, the extension module 132 may include a certification module and a cost module, and if the blockchain is a federation chain, the extension module 132 may include a node authorization module.
The standard module 131 in the network layer 110, the consensus layer 120, and the application layer 130 provides a standardized basic template for building the blockchain, and is a basic standard framework for blockchain development, the specific characteristics of the blockchain are determined by the extension module 132 in the application layer 130, and the built blockchain can be used for both a federation chain and a public chain by adding and deleting the third-party extension module 132.
The block chain node provided by the embodiment of the invention comprises a network layer, a consensus layer and an application layer, wherein the network layer is used for acquiring to-be-processed transaction data in a block chain, the consensus layer is used for determining a consensus result of the to-be-processed transaction data, the application layer is used for processing the consensus result, determining the state of the block chain and processing the to-be-processed transaction data, and an extension module in the application layer is determined by the type of the block chain.
Based on the above embodiment, the standard business processing logic includes validating and executing the transaction data to be processed based on the consensus result, and updating the state of the blockchain.
Specifically, the standard module 131 is configured to verify and execute the transaction data to be processed based on the consensus result, and determine the state of the blockchain; the expansion module 132 is configured to process the transaction data to be processed based on the additional business processing logic.
The state of the block chain specifically refers to the state of each node. When a node in the blockchain performs a transaction, the state of the node changes. The standard module 131 is mainly used for verifying and executing the transaction data to be processed according to the consensus result, and determining the state of the block chain.
The expansion module 132 is mainly used for processing transaction data to be processed based on additional business processing logic. The extra business processing logic is used for expressing a processing method or a processing mode of the transaction data to be processed, and is a supplement to the standard business processing logic. Since the service types of the transaction data to be processed are different for different types of blockchains, the type of the extension module 132 is different according to the type of blockchain.
Based on any of the above embodiments, the application layer uses a finite state machine model.
In particular, a finite state machine is a tool used for modeling the behavior of an object, and the role of the finite state machine is mainly to describe the state sequence that the object experiences in the life cycle of the object and how to respond to various events from the outside world. In the block chain, each node can be regarded as a state machine, the whole network is changed dynamically, and the dynamic state of the whole network can be grasped through the state machine. The nodes may be used to generate the tiles and may also perform various actions based on the tiles, such as transactions, verifications, broadcasts, and so on. Each node has a different state and the network node part of the block chain can be described explicitly by a state machine.
The state data in the state machine describes the current state of the blockchain system. The transactions of the blockchain are propagated and identified through the network, and then the execution of a state transfer function in the state machine is triggered, so that the state of the blockchain is changed. Through a consensus mechanism, each blockchain node executes the same transaction sequence from the same initial state to achieve the same final state.
Based on any of the above embodiments, the application layer 130 further performs validity check on the transaction data to be processed based on the current state of the blockchain node 100, and the transaction data to be processed is stored in the transaction queue pool.
Specifically, the user may store the pending transaction data in the transaction queue pool according to an RPC (Remote Procedure Call) service through the client. The implementation can be realized by adopting a queue and a buffer.
The application layer 130 checks the validity of the transaction data to be processed according to the current state of the block chain node 100, identifies valid transactions and invalid transactions, the consensus layer 120 receives the valid transactions, packs the valid transactions into blocks, performs consensus by using a BFT algorithm, and then triggers the application layer 130 to change the current state of the block chain.
The expansion module 132 includes at least one of a certification module, a fee module, and a node authorization module according to any of the above embodiments.
Specifically, the certification module, the cost module, and the node authorization module may be determined according to the type of the blockchain.
The evidence-passing module is used for confirming whether the transaction has native evidence. A pass is a digital form of a rights voucher that represents an inherent and inherent value. The authenticity, tamper resistance, privacy protection and other capabilities of the certificate are guaranteed by cryptography. The certificate must be able to flow in a network so that it can be verified anytime and anywhere.
The fee module is used for settling fees in the transaction process. For example, the fee module may be used to settle transaction fees when transaction processing requires a fee to be made by a procedure.
For public links, node authorization is not required as nodes can freely join and leave the blockchain network. And for the alliance chain, the admission of the node can be verified and authorized through the node authorization module. Therefore, when building a blockchain, if the type of the blockchain is a federation chain, a node authorization module needs to be added.
Based on any of the above embodiments, the node authorization module is configured to:
determining an authorization result of each node in the block chain based on the authorization node list;
the authorized node list stores authorized nodes and connection information between the authorized nodes in a binary tree mapping data structure.
In particular, the node authorization module may determine the authorization result of each node in the blockchain according to the authorized node list. The authorized node list includes authorized nodes and connection information between the authorized nodes, and the connection information can be stored in the blockchain node as a configuration file. The storage may be in the form of a binary tree mapping data structure.
The use method of the node authorization module comprises the following steps:
firstly, adding an authorized node list capable of participating in a network node of a alliance chain, and using the authorized node list as a configuration file;
and secondly, reading the configured authorized node list in the node starting process, wherein the node connection information comprises an address and a public key, and storing the connection node list by using binary tree mapping. The network node list provided in the configuration file is an initial value of the binary tree mapping;
thirdly, an administrator account exists in the alliance chain network, the new node is dynamically added into the binary tree mapping data structure by sending the node adding message type, and the new node is synchronized to other trusted nodes;
and fourthly, adding a function for judging whether the nodes allow connection or not according to the node connection list. And if the node is in the node authorization list, allowing the node to connect and join the block chain network to form the point-to-point communication network. And if the node identity is not in the authorization list of the node participating in the alliance chain, refusing the connection, joining and synchronization of illegal nodes.
Based on any of the above embodiments, the network layer 110 is implemented based on LibP2P, and is further configured to implement message broadcasting, event subscription publishing, and node self-discovery in a blockchain.
In particular, LibP2P is a modular network stack that allows developers to easily build large, robust P2P networks by combining various transport and P2P protocols.
Through the build network layer 110 of LibP2P, message broadcasting, event subscription publishing, and node self-discovery may be implemented in a blockchain. The architecture of LibP2P includes a node routing module, a connection processing module, a distributed record storage module, and a discovery module. Wherein the node routing module is configured to determine which nodes to use for routing the specified message. This routing mechanism can be done recursively even in broadcast/multicast mode. The connection processing module is responsible for the creation, maintenance and destruction of the connection between the management nodes, including protocol multiplexing, stream multiplexing and connection relaying, and performs multiplexing transmission at the same time. The distributed record storage module is used for recording various information related to the nodes, and is convenient for connection management and content addressing. The discovery module is used to discover and identify other nodes in the network.
Libp2p integrates various transport protocols and point-to-point protocols, and its main role is to discover nodes and contents and to enable different network protocols to smoothly transfer data between each other.
Based on any of the above embodiments, the consensus layer 120 is further configured to generate a block corresponding to the pending transaction data based on the pending transaction data.
Specifically, the user may initiate a transaction request to the blockchain node 100 in the blockchain network through the terminal, and submit the pending transaction data. The consensus layer 120 in the block chain node 100 performs corresponding data processing according to the transaction data to be processed, for example, requests other block chain link points to perform consensus processing on the transaction data to be processed, so as to generate a block corresponding to the transaction data to be processed.
Based on any of the above embodiments, an embodiment of the present invention provides a blockchain system, which includes a plurality of blockchain nodes, and the type of the blockchain system is a public chain or a federation chain.
Specifically, the embodiment of the present invention provides a blockchain system that supports both public and alliance chains. The block chain system achieves the purpose of simultaneously supporting the alliance chain and the public chain in a low-cost and high-flexibility mode by adding and deleting third-party extension modules on the basis of the same code base according to the design concept of a layering and decoupling framework.
Fig. 2 is a schematic diagram of a homologous amphibious blockchain node provided in the present invention, and as shown in fig. 2, the node is a basic unit of a blockchain distributed network networking. The nodes of the homologous amphibious block chain are composed of a basic service part and an extended service part, wherein the basic service part comprises a network service part and a consensus service part, the extended service part is a state machine application part, is a modular framework and is composed of a standard module and an extended module.
The basic service provides uniform standardized service for the state machine application, and the state machine application is subjected to function expansion by adding or deleting a third-party module by an expansion module.
The network layer for providing basic service is realized by engineering provided by LibP2P, provides functions of interconnection among nodes, message broadcasting, message receiving and sending, event subscription and publishing, node self-discovery and the like, is responsible for data communication in the whole block chain network, and provides basic network service for the consensus layer. The consensus layer is a consensus engine, is realized by adopting a BFT consensus algorithm, and is responsible for consensus on messages, transactions and votes and packaging blocks. The consensus engine provides certainty for the transaction, and enables the state machine to execute the same transaction sequence from the same initial state through the interface protocol, and the same final state is achieved. The consensus engine mainly handles two types of tasks: the system comprises consensus logic and network logic, wherein the consensus logic provides support for state machine application, and the network logic relies on a network layer to process consensus and external services.
The state machine application providing extended services provides validation, execution and state updating of transactions by the standard module, and additional business logic processing by the extended module.
The network layer, the consensus layer and the state machine application carry out layered decoupling and contract constraint through an interface protocol. The interface protocol is a universal interface, is connected with a consensus engine and a state machine, and adopts a message request and response mode of a client and a server to maintain a deterministic finite state machine.
The external client submits the transaction to a transaction queue pool through the RPC service, and the transaction queue pool receives a message sent by the client, wherein the message contains the transaction which is unprocessed and unconfirmed. The realization mode of the transaction queue pool comprises a queue and a buffer, and a memory is used as a main storage mode from the perspective of transaction performance. And the state machine checks the validity of the transactions in the transaction queue pool through the state data, identifies valid transactions and invalid transactions, receives the valid transactions by the consensus layer, packs the valid transactions into blocks to perform BFT consensus and then triggers the state change of the state machine.
The network layer, the consensus layer, the state machine application and the standard module thereof provide a standardized basic template for the building of the block chain, the basic standard framework is developed for the block chain, and the specific characteristics of the block chain are determined by the expansion module.
Control of the nodes is the key and primary basis for distinguishing public and federation chains. Differences between the federation chain and the public chain include node joining control and authority, whether there is a commission for transaction processing, the transaction cost is required, and whether there is a native pass.
The common part of the alliance chain and the public chain is realized by a general network layer, a common identification layer, a state machine application and a standard module, and the different part is completed by an additional independent module. The two functions of transaction commission and native currency evidence in the public chain use independent modules for source code development, and belong to the part of an extension module.
In the public chain, a node authorization module is not needed, and when the homologous codes are used as the alliance chain, the limitation that the node authorization module is added to increase the nodes is needed. The node authorization module is realized by two methods: CA (digital certificate) mechanism and authorized node list mechanism. The authorized node list mechanism has been set forth in the foregoing embodiments. Here, the CA mechanism is explained.
The CA mechanism implementation method comprises the following steps:
constructing a CA root certificate service; when a node joins, a digital certificate is required to be applied to a CA, and the digital certificate is used as the node identity; the existing nodes in the network verify the authenticity and validity of the digital certificates of the existing nodes through the root certificates and decide whether to accept or reject the connection.
Based on any of the above embodiments, fig. 3 is a schematic flow chart of the block chain construction method provided by the present invention, and as shown in fig. 3, the method is applied to a block chain node, and includes:
step 310, determining the type of the block chain to be constructed.
Specifically, the types of blockchains to be constructed may be classified into public chains and federation chains.
And step 320, determining an expansion module in the application layer of the block chain node based on the type of the block chain to be constructed.
Specifically, for example, if the type of the block chain to be constructed is a public chain, it may be determined that the expansion module in the block chain link point application layer includes a certification module and a cost module; if the type of the block chain to be constructed is a federation chain, it can be determined that the expansion module in the block chain link point application layer includes a certification module, a cost module and a node authorization module.
Step 330, determining the block chain node based on the expansion module, the standard module, the network layer and the consensus layer.
Specifically, an application layer of the blockchain node can be determined according to the extension module and the standard module, and then the structure of the blockchain node can be determined according to the network layer and the consensus layer.
Step 340, determining a block chain to be constructed based on a plurality of block chain nodes.
Specifically, a plurality of block chain nodes are connected to obtain a block chain to be constructed.
The standard modules in the network layer, the consensus layer and the application layer provide a standardized basic template for building the block chain, the standard template is a basic standard framework developed for the block chain, and the specific characteristics of the block chain are determined by the expansion module in the application layer.
According to the block chain construction method provided by the embodiment of the invention, the expansion module in the block chain node application layer is determined according to the type of the block chain to be constructed, and then the block chain node is determined according to the expansion module, the standard module, the network layer and the consensus layer, so that the block chain is constructed.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes commands for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A block link point, comprising:
the network layer is connected with the network layers of other block chain nodes in the block chain and is used for acquiring the transaction data to be processed in the block chain;
the consensus layer is connected with the network layer and used for determining a consensus result of the transaction data to be processed;
the application layer is connected with the consensus layer and comprises a standard module and an extension module; the standard module is used for processing the transaction data to be processed based on standard business processing logic and the consensus result; the expansion module is used for processing the transaction data to be processed based on additional business processing logic; the extension module corresponds to the type of the block chain; the additional business processing logic is business processing logic other than the standard business processing logic.
2. The block chain node of claim 1, wherein the standard business processing logic comprises validating and executing the pending transaction data and updating the state of the block chain based on the consensus result.
3. A block link point as in claim 1, wherein the application layer employs a finite state machine model.
4. The blockchain node of claim 1, wherein the application layer further performs a validity check on the pending transaction data based on a current state of the blockchain node, the pending transaction data being stored in a transaction queue pool.
5. A block link point as in claim 1, wherein the expansion module comprises at least one of a credential module, a cost module, and a node authorization module.
6. The blockchain node of claim 5, wherein the node authorization module is configured to:
determining an authorization result of each node in the block chain based on an authorized node list;
the authorized node list stores authorized nodes and connection information between the authorized nodes in a binary tree mapping data structure.
7. The block link point of claim 1, wherein the network layer is implemented based on LibP2P, and is further configured to implement message broadcasting, event subscription publishing, and node self discovery in the block chain.
8. The block link point of claim 1, wherein the consensus layer is further configured to generate a block corresponding to the pending transaction data based on the pending transaction data.
9. A blockchain system comprising a plurality of blockchain link points according to any one of claims 1 to 8; the type of the block chain system is a public chain or a alliance chain.
10. A block chain construction method applied to the block link point of any one of claims 1 to 8, comprising:
determining the type of a block chain to be constructed;
determining an expansion module in a block chain node application layer based on the type of the block chain to be constructed;
determining the block chain node based on the extension module, the standard module, the network layer and the consensus layer;
and determining the block chain to be constructed based on a plurality of block chain nodes.
CN202110695905.5A 2021-06-23 2021-06-23 Block chain node, system and block chain construction method Active CN113259131B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110695905.5A CN113259131B (en) 2021-06-23 2021-06-23 Block chain node, system and block chain construction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110695905.5A CN113259131B (en) 2021-06-23 2021-06-23 Block chain node, system and block chain construction method

Publications (2)

Publication Number Publication Date
CN113259131A true CN113259131A (en) 2021-08-13
CN113259131B CN113259131B (en) 2021-10-08

Family

ID=77189275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110695905.5A Active CN113259131B (en) 2021-06-23 2021-06-23 Block chain node, system and block chain construction method

Country Status (1)

Country Link
CN (1) CN113259131B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360238A (en) * 2017-07-25 2017-11-17 光载无限(北京)科技有限公司 Intelligent contract gateway based on block chain CPOW common recognition algorithms
CN108076148A (en) * 2017-12-15 2018-05-25 成都链网络科技有限公司 Storage system based on block chain
CN108881428A (en) * 2018-06-13 2018-11-23 明阳智慧能源集团股份公司 A kind of block catenary system with oversight mechanism
CN108876561A (en) * 2018-07-25 2018-11-23 明阳智慧能源集团股份公司 A kind of energy transaction system based on block chain technology
CN108989019A (en) * 2018-06-27 2018-12-11 天闻数媒科技(湖南)有限公司 Content resource safety system based on block chain technology
US20190289068A1 (en) * 2017-06-07 2019-09-19 Zhongan Information Technology Service Co., Ltd. Method, apparatus and system for realizing communication between blockchains
CN111260470A (en) * 2020-01-15 2020-06-09 李俊山 Mixed block chain architecture system and processing method
US10693630B1 (en) * 2018-04-03 2020-06-23 Alibaba Group Holding Limited Cross-blockchain interaction method, apparatus, system, and electronic device
US20200228321A1 (en) * 2017-02-01 2020-07-16 Equifax Inc. Verifying an identity based on multiple distributed data sources using a blockchain to safeguard the identity
CN112153085A (en) * 2019-06-26 2020-12-29 华为技术有限公司 Data processing method, node and block chain system
CN112182618A (en) * 2020-09-29 2021-01-05 苏州市星际云通区块链科技有限公司 Mixed block chain architecture extension system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200228321A1 (en) * 2017-02-01 2020-07-16 Equifax Inc. Verifying an identity based on multiple distributed data sources using a blockchain to safeguard the identity
US20190289068A1 (en) * 2017-06-07 2019-09-19 Zhongan Information Technology Service Co., Ltd. Method, apparatus and system for realizing communication between blockchains
CN107360238A (en) * 2017-07-25 2017-11-17 光载无限(北京)科技有限公司 Intelligent contract gateway based on block chain CPOW common recognition algorithms
CN108076148A (en) * 2017-12-15 2018-05-25 成都链网络科技有限公司 Storage system based on block chain
US10693630B1 (en) * 2018-04-03 2020-06-23 Alibaba Group Holding Limited Cross-blockchain interaction method, apparatus, system, and electronic device
CN108881428A (en) * 2018-06-13 2018-11-23 明阳智慧能源集团股份公司 A kind of block catenary system with oversight mechanism
CN108989019A (en) * 2018-06-27 2018-12-11 天闻数媒科技(湖南)有限公司 Content resource safety system based on block chain technology
CN108876561A (en) * 2018-07-25 2018-11-23 明阳智慧能源集团股份公司 A kind of energy transaction system based on block chain technology
CN112153085A (en) * 2019-06-26 2020-12-29 华为技术有限公司 Data processing method, node and block chain system
CN111260470A (en) * 2020-01-15 2020-06-09 李俊山 Mixed block chain architecture system and processing method
CN112182618A (en) * 2020-09-29 2021-01-05 苏州市星际云通区块链科技有限公司 Mixed block chain architecture extension system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
魏昂: "一种改进的区块链跨链技术", 《网络空间安全》 *

Also Published As

Publication number Publication date
CN113259131B (en) 2021-10-08

Similar Documents

Publication Publication Date Title
US11182379B2 (en) DAG based methods and systems of transaction processing in a distributed ledger
US20220067035A1 (en) System and method for providing an interface for a blockchain cloud service
Yang et al. Smart-toy-edge-computing-oriented data exchange based on blockchain
CN109151013B (en) Logistics industry information platform based on alliance block chain
CN110442652B (en) Cross-chain data processing method and device based on block chain
Song et al. Research advances on blockchain-as-a-service: Architectures, applications and challenges
CN110599213B (en) Article management method and device based on blockchain network and electronic equipment
Khan et al. Towards interoperable blockchains: A survey on the role of smart contracts in blockchain interoperability
TWI717927B (en) Hybrid blockchain architecture with computing pool
Pillai et al. Cross-blockchain technology: integration framework and security assumptions
EP4216077A1 (en) Blockchain network-based method and apparatus for data processing, and computer device
CN106991612A (en) Method, device and the electronic equipment shared for finance data
CN110098938B (en) Trusted committee under-chain acceleration solution method and system
TW202139127A (en) Compute services for a platform of services associated with a blockchain
CN113344535A (en) Software development outsourcing control system based on block chain and implementation method
Yang et al. Generic-NFT: A generic non-fungible token architecture for flexible value transfer in web3
Yiu Decentralizing supply chain anti-counterfeiting systems using blockchain technology
Zhu et al. A study on the challenges and solutions of blockchain interoperability
Fujimoto et al. Secure blockchain interworking using extended smart contract
CN113259131B (en) Block chain node, system and block chain construction method
CN116975901A (en) Identity verification method, device, equipment, medium and product based on block chain
CN115701078B (en) Cross-chain transaction processing method, device, electronic equipment and storage medium
CN115913734A (en) User authority management method, device and equipment applied to alliance chain
CN115941282A (en) NFT-based block chain cross-chain interaction system and method
Zhao et al. A study on protocols of cross-chain data synchronization for permission blockchain for construction management

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant