CN116668313A - Scalable blockchain network model based on slicing - Google Patents

Scalable blockchain network model based on slicing Download PDF

Info

Publication number
CN116668313A
CN116668313A CN202310704460.1A CN202310704460A CN116668313A CN 116668313 A CN116668313 A CN 116668313A CN 202310704460 A CN202310704460 A CN 202310704460A CN 116668313 A CN116668313 A CN 116668313A
Authority
CN
China
Prior art keywords
transaction
module
consensus
node
slice
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.)
Pending
Application number
CN202310704460.1A
Other languages
Chinese (zh)
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.)
Shijiazhuang Tiedao University
Original Assignee
Shijiazhuang Tiedao University
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 Shijiazhuang Tiedao University filed Critical Shijiazhuang Tiedao University
Priority to CN202310704460.1A priority Critical patent/CN116668313A/en
Publication of CN116668313A publication Critical patent/CN116668313A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • 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/3218Cryptographic 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 using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs
    • 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/3297Cryptographic 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 time stamps, e.g. generation of time stamps
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Algebra (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a scalable blockchain network model based on slicing, and relates to the technical field of blockchains. The system comprises a data layer, a consensus layer and an application layer; the consensus layer comprises an intra-chip consensus module and an inter-chip consensus module, wherein the intra-chip consensus module comprises a merck tree, an elliptic curve module, a PoW consensus module, a zk-SNARK module, an excitation mechanism module, an Account module and a transaction Txs module; the inter-slice consensus module comprises a directed acyclic graph DAG module, a PBFT consensus module, a parallel promise module, a naming space module, an improved cuckoo principle module and a trusted execution environment TEE module; the system can dynamically adjust the fluctuation range of the block chain network and realize node distribution balance as much as possible.

Description

Scalable blockchain network model based on slicing
Technical Field
The invention relates to the technical field of blockchains, in particular to a scalable blockchain network model based on slicing.
Background
Whether public or federated, low throughput severely hampers the expansibility and usability of blockchain systems in increasing the number of users and transactions. Blockchain systems require that each node be required to replicate and save information such as communications, storage, and state representations of the entire network. In the federation chain PBFT protocol, the message complexity of the node broadcast is O (n 2 ) That is, if there are 100 nodes in the PBFT network, the user wants all other nodes to receive the messages broadcast by the user, and the number of the messages to be propagated in the whole network needs at least 10000. Therefore, simply increasing the number of nodes cannot linearly improve the throughput of the system, but when the number of nodes reaches a certain number, the number of Transactions Per Second (TPS) of the PBFT network increases exponentially, so that the performance efficiency of the system drops sharply. Even if high throughput is realized through the improvement of network bandwidth and hardware performance, the required synchronous communication requirement, storage requirement and calculation capability set a high threshold for the participation of the nodes, and the method is contrary to the idea of decentralization of the blockchain. Therefore, an excellent expandable alliance chain system needs to consider the expansibility of the PBFT protocol, reasonably ensure the resource utilization efficiency of communication, storage, state representation and the like, and simultaneously ensure the decentralization and the security of the system.
Many centralized distributed systems, such as Google scanner and slicers, employ a slicing technique for lateral expansion. As one of the expansion modes on the blockchain, the slicing technology divides the transaction storage, the computing power and the state representation into different slices, and each slice node independently completes the respective transaction and the storage state. In parallel, the throughput of the blockchain system is increased linearly. The slicing technology provides a new idea for solving the problem of the scalability of the blockchain, but on the other hand, the problem to be solved is also needed to be solved:
Safety problem: in general, the nodes belong to only one segment, the more segments are divided by the blockchain system, the lower the number of the nodes in one segment is, and when the algorithm for dividing the nodes has loopholes, malicious node aggregation is most likely to occur, so that the problem of double flowers caused by the calculation power of honest nodes is diluted. If the number of the fragments is reduced, too many nodes in a single fragment pay higher consensus cost, so that the relationship between the number of the fragments is balanced, and the dynamic random allocation of the nodes is a key for solving the security problem.
Cross-fragment transaction problem: the difficulty with the sharding technique across sharding transactions is that the modification of the commonly accessed state by one shard must be synchronized in time with another shard, otherwise double-flower or state-derangement problems are likely to occur. The whole process is directly driven by the initiator through the cross-slice transaction in the Omniledge, so that the communication protocol among slices is avoided. But has the disadvantage that the client must remain operational throughout the process, so that deadlock problems can easily occur causing data redundancy. Although the method also provides a solution for solving the deadlock, the whole course of the method is finished by the client, which is obviously inconvenient in an application scene and extremely affects the efficiency of the block chain network. The transaction is marked by the aid of a trace mode. Before the transaction is injected into the blockchain network, the places where transaction conflicts are likely to occur are marked through trace simulation, and all fragments process conflicts according to trace positions after the transaction is issued. The disadvantage is that a single round of consensus is required for each transaction conflict to be processed, thus a significant amount of time is wasted in work beyond the transaction processing, severely impacting the effective time ratio and blockchain network efficiency. RChain uses its unique multi-level namespace mechanism to handle cross-shard transactions to parent-level shards. The disadvantage is that parent-level shards face obvious problem convergence, and the more cross-shard conflict transactions that need to be processed for parent-level shards of the higher level are, the higher the shard transaction processing throughput requirements are.
Efficiency problem: the introduction of the sharding mechanism necessarily causes the blockchain network to spend a great deal of computation effort and time on tasks other than consensus and processing transactions, such as a node dynamic partitioning mechanism, an inter-sharding consensus mechanism, and the like. How to maximize the ratio for consensus and transaction processing is also a matter of concern.
Disclosure of Invention
The invention aims to solve the technical problem of providing a scalable blockchain network model based on fragmentation, which can dynamically adjust the fluctuation range of a blockchain network and realize node distribution balance as much as possible.
In order to solve the technical problems, the invention adopts the following technical scheme: a scalable blockchain network model based on slicing comprises a data layer, a consensus layer and an application layer;
in the data layer, each fragment node generates an information data abstract through hash operation; the information data abstract is packed into blocks and generates zero knowledge proof, and the zero knowledge proof is added to the back of the latest block through intra-slice consensus from the created block without transaction; after the hash value is calculated, the transaction and the state data are packaged and stored in a micro node server to finish the warehouse-in storage of the blockchain;
The consensus layer comprises an intra-chip consensus module and an inter-chip consensus (cross-chip consensus) module, wherein the intra-chip consensus module comprises an elliptic curve module, a merck tree module, a PoW consensus module, a zk-SNARK module, an excitation mechanism module, an Account module and a transaction Txs module; the inter-slice consensus module comprises a directed acyclic graph DAG module, a PBFT consensus module, a parallel promise module, a naming space module, an improved cuckoo principle module and a trusted execution environment TEE module;
the intra-chip consensus module is used for being responsible for running inside the chip, each node in intra-chip consensus can directly communicate, in inter-chip consensus, each node belongs to different chips and maintains different block chains respectively, transaction storage information of each node is not intersected, so that node communication needs to rely on the chips for transaction synchronization, and the same PBFT protocol is executed among the chips for consensus;
the inter-chip consensus module utilizes the concept of transaction atomization, the namespace module is utilized in inter-chip consensus to be applied to inter-chip transactions, a directed acyclic graph data structure is utilized to replace a single linked list to construct a DAG blockchain to realize parallel promise, namely internal transactions which do not conflict with the inter-chip transactions are guaranteed, and the internal transactions can be safely submitted to each chip in the same consensus round; every time a new node is added into a slice or a certain consensus round is passed, the slice-expandable blockchain network must take out part of the nodes from the original slice to exchange with other slices, the cuckoo principle is improved, and a trusted execution environment TEE is used as a trusted third party to dynamically reconfigure all the nodes;
The application layer comprises an interface protocol module, an IPFS module, a Docker module and an intelligent contract module, and the application layer in the node is used for providing intelligent contracts and interfaces for upper-layer services and external applications; the external Cli client isolates the intra-segment consensus generation chain and the zero knowledge proof through a Docker virtualization technology, and the disclosure is independent of the segment; meanwhile, an upper user constructs a Docker container arrangement cluster and an automation engine; the IPFS module comprises a Hash table, a block exchange, a Merkle DAG and a self-authentication file system; through a hash table and a merck tree, the IPFS stores nouns and paths of files and does not pay attention to the positions of server data, and the HashKey generated by the files is directly used for searching; each shard deploys an intelligent contract above the consensus layer to provide a trust interface for the DApps; the DApps invokes the intelligent contract through the Json Api to realize the autonomy of the service and the task.
The beneficial effects of adopting above-mentioned technical scheme to produce lie in: the network model provides a brand new node dynamic reconfiguration solution through TEE and improved design of a cuckoo algorithm, avoids single piece sinking caused by malicious node concentration, and can dynamically adjust the variation range of a block chain network so as to realize node distribution balance as much as possible. Based on the namespaces and the DAG, address spaces are applied for each fragment, and the consistency and atomicity of the cross-fragment transaction are ensured by taking intersection of the fragment namespaces related to the cross-fragment transaction in a pointer mode.
Drawings
The invention will be described in further detail with reference to the drawings and the detailed description.
FIG. 1 is a schematic block diagram of a network model according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a cuckoo principle distribution scheme in an embodiment of the invention;
FIG. 3 is a diagram of an improved cuckoo principle node allocation scheme in an embodiment of the invention;
FIG. 4 is a graph showing the change of the state of the coin before and after the transaction in the embodiment of the invention;
FIG. 5 is a cross-fragment transaction diagram in an embodiment of the invention;
FIG. 6 is a diagram of a cross-fragment transaction solution in an embodiment of the invention;
FIG. 7 is a graph of throughput as a function of number of tiles in an embodiment of the invention;
FIG. 8 is a graph of address space size versus number of fragments for a cross-fragment transaction application in accordance with an embodiment of the present invention;
FIG. 9 is a graph of transaction delay as a function of number of slices in an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways other than those described herein, and persons skilled in the art will readily appreciate that the present invention is not limited to the specific embodiments disclosed below.
As shown in fig. 1, the embodiment of the invention discloses a scalable blockchain network model based on slicing, wherein the model architecture is mainly divided into three layers, namely a data layer, a consensus layer and an application layer.
In the data layer, each fragment node independently stores information such as state representation, storage and confusion network communication, merkle tree, public key, private key and the like. The node generates an information data abstract through hash operation on transaction content, a hash value of the last block, a random number, a time stamp, a public key and the like. The information data summary is packed into chunks and zero knowledge proof is generated, added to the last chunk after the last chunk by intra-tile consensus, starting with the created chunk without transactions. And after the hash value is calculated, packaging and storing data such as transaction, state and the like to a node server to finish warehousing storage of the blockchain.
The consensus layer comprises an intra-chip consensus module and an inter-chip consensus (cross-chip consensus) module, wherein the intra-chip consensus module comprises a merck tree module, an elliptic curve module, a PoW consensus module, a zk-SNARK module, an excitation mechanism module, an Account module and a transaction Txs module; the consensus layer is mainly divided into an intra-chip consensus part and a cross-chip consensus part. The intra-chip consensus is mainly responsible for the running of part of the intra-chip agreement ledgers. The main components of the on-chip consensus include merck tree, elliptic curve, poW consensus, zk-snare, incentive mechanism, ledger, transaction, etc.
Each node in the on-chip consensus can directly communicate to ensure consistency in the consensus group. However, in the cross-slice consensus, each node belongs to different slices and maintains different blockchains respectively, and transaction storage information of each node is not intersected, so that node communication needs to rely on the slices for transaction synchronization, and the same PBFT protocol is executed among the slices for consensus. However, the isolation between the fragments makes verification of the cross-fragment transaction extremely difficult, and under normal conditions, the cross-fragment transaction between two fragments can carry out a large amount of data handover, which not only greatly affects the consensus efficiency between fragments, but also reduces the security of data. By utilizing the concept of transaction atomization, the naming space module is applied to cross-fragment transaction in inter-fragment consensus, resources consumed by the cross-fragment transaction are reduced as much as possible on the premise of ensuring atomicity and safety, data redundancy is reduced, and better flexibility and practicability are provided.
Under normal conditions, one transaction across fragments will occupy other transaction space in the same round due to the fact that a plurality of fragments are involved, and the internal transaction is blocked from being submitted. In the application, the directed acyclic graph data structure is utilized to replace a single linked list to construct the DAG blockchain to realize parallel promise, namely, internal transactions which do not conflict with cross-fragment transactions are ensured to be safely submitted to each fragment in the same consensus round. In order to prevent malicious behaviors among malicious nodes in a single slice and ensure the safety of each slice, every time a new node is added into the slice or a certain common rotation is passed, the slice-expandable blockchain network must take out part of the nodes from the original slice to exchange with other slices, which is commonly called slice reconfiguration. Under the improved scheme, the system safety is further ensured, other nodes in the shards can still perform verification and consensus normally except the nodes needing to be migrated, the influence of the shard reconfiguration on the system throughput is greatly reduced, and the dynamic balance of the maximization of the benefit is achieved as much as possible.
zk-SNARKs are abbreviations for "Zero-Knowledge Succinct Non-Interactive Argument of Knowledge", i.e., zero-knowledge succinct non-interactive knowledge demonstration. In a blockchain network, users need only guarantee the correctness of transactions involving themselves, without being interested in seeing the transaction records of the full chain. Therefore, the non-interactive characteristic of zk-SNARKs in the zero knowledge proof is naturally matched with the blockchain technology, so that the transaction verification rate of the blockchain can be remarkably improved, and strong privacy guarantee is provided, and the method can be widely applied to the blockchain field.
The main operation flow of the algorithm is as follows:
in general, first, the input calculation content is converted into the form of an algebraic circuit, and the algebraic circuit is converted into a first-order constraint system R1CS, so that the solution vector s thereof satisfies s·a·s·b·s·c=0;
then converting R1CS into a quadratic equation QAP, and converting the constraint to be checked from the constraint between numbers to the constraint between polynomials; arithmetic electronics over a finite field of addition and multiplication gates onlyThe road represents a trusted third party toSatisfy n equations if and only if for each x 1 ,...,x q The following equation holds:
consider arithmetic circuits on finite fields with only adder and multiplier gates Wherein->For each x of the multiplier gates 1 ,...,x q ,a i (x q ),b i (x q ),c i (x q ) Is->The constant satisfying the qth equation, set a of the corresponding row i =1,b i =1,c i =1; let t (X) be the lowest order polynomial, at any point X q ,t(x q ) =0. For the addition gate, the equation number is not counted. The following equation holds:
the entire quadratic equation (QAP) R can be expressed as:
wherein aux is auxiliary information, 1.ltoreq.l.ltoreq.m,and the degree of t (X) is nn, which is the number of R1CS constraints; when h 0 =1, the following binary relationship can be defined:
constructing a non-interactive linear demonstration based on bilinear pairing:
prover from trusted setting third party +.>Selecting random number, setting G and H as prime group +.>And->Is a generator of (1); output as common reference string +.>
And responsive simulated trapdoors
Selecting two random numbers x 1 =r,x 2 =s; and (3) calculating:
three points A, B, C on the elliptic curve are then calculated:
point a above:
point B above:
point C above:
first use +.>Is disclosed prefix calculation point->
Taking (a, B, C), it is verified that the proof-er provided the assertion is correct if the following equation holds true:
e(A,B)=e(αG,βH)·e(D,γH)·e(C,δH) (12)
the zk-SNARKs constructed by the method has stronger completeness, reliability and zero knowledge. The soundness of the algorithm is ensured through bilinear pairing. Groth16 has the most efficient verification algorithm and the shortest proving string, which has the disadvantage that a reliable third party is required for the distribution of random numbers.
The application layer comprises an interface protocol module, an IPFS module, a Docker module and an intelligent contract module, and the application layer in the node mainly provides intelligent contracts and interfaces for upper-layer services and external applications. Key applications for this layer include interface protocols, IPFS, docker, and smart contracts, among others. The external Cli client isolates the intra-segment consensus generation chain and the zero knowledge proof through a Docker virtualization technology, and the disclosure is independent of each segment. The Cli client can concentrate on the application program and the data by the container technology without participating in intra-chip consensus, and does not worry about processes such as blockchain runtime consensus. Meanwhile, an upper user can construct a Docker container arrangement cluster and an automation engine by using Kubernetes, ansible, consul and other technologies, and a distributed and high-availability service network system is constructed, so that the upper application can realize higher availability, and the project can be customized more freely and smoothly.
IPFS (interstellar file system) is a distributed file storage Protocol developed by Protocol Lab, and is intended to replace HTTP to be the underlying network Protocol in the web3.0 era. The method mainly comprises the following parts of Hash table, block exchange, merkle DAG, self-authentication file system and the like. Through the Hash table and the merck tree, the IPFS stores nouns and paths of the files and the positions where the server data are located, and the HashKey generated by the files is directly used for searching, and even if 1bit is modified, the corresponding Hash values are different. Each sliced ledger deploys intelligent contracts on top of the consensus layer to provide trust interfaces for DApps. The DApps can realize autonomy, security, trust and accuracy of services and tasks by calling intelligent contracts through Json Api, and the problems of fuzzy requirements, asymmetric information, unreliable intermediaries and the like of both sides of the services are avoided.
Threat model:
in the whole sliced extensible blockchain network, two node types coexist: honest nodes and malicious nodes. Honest nodes refer to nodes in a fragmented network that adhere to various protocols and consensus mechanisms. Malicious nodes refer to nodes that attempt to do malicious activity, whose generation comes mainly from two cases: 1. the slice itself is malicious. Namely, account book fake blockchain established by malicious users or organizations is attempted to join the expandable blockchain network to perform illegal actions; 2. more than 1/3 of the users within the patch are malicious and the balance of consensus within the ledger is disturbed, resulting in unreliable consensus results. Assume that the shards can expand the possibility that malicious nodes in the blockchain network can cross each other and initiate denial of service, falsify, forge and intercept messages. Because the nodes are slowly adaptive in the BFT environment, the honest nodes and the malicious nodes are fixed under the same consensus round, and only change among rounds can be generated.
Design of network scheme of segmented expandable block chain
Consensus algorithm selection
There are many BFT (bayer fault tolerance) algorithms commonly used in blockchain systems, such as PBFT, IBFT, raft, tendermint. Wherein, hyperledger Fabric uses a PBFT algorithm, ethermint uses a Tendermint algorithm, and Quorun uses an IBFT algorithm. The PBFT algorithm is always superior in scale to several other BFT algorithms. The reason is that the PBFT algorithm allows pipeline execution, while IBFT and tendremine are both disabled, easily resulting in a common-knowledge block. Therefore, the segmented expandable blockchain network is established on the basis of the PBFT algorithm, and the node design, the addition of new nodes and the like of the segmented expandable blockchain network are improved and expanded.
And (3) node design:
in the scalable blockchain network of the present application, each segment is essentially an independent blockchain environment, and nodes in the ledger maintain a blockchain together. The nodes are used as communication units for sharing the segmented block chain network, dynamic allocation is needed among the segments within a certain period of time, and each node only needs to store DAGs of account transactions participated by the nodes.
The new node joins:
for the addition of a new node in a certain fragment, in the view of the addition, the fragment randomly generates a new workload proving difficult problem according to the public key and the time stamp. After the nodes complete serialization and consensus within the fragmentation committee, and package and uplink, the new nodes participate in the consensus of the fragmentation committee the earliest in the next cycle of the application joining round.
Node dynamic reconfiguration
In a tile-based blockchain network, a single tile is vulnerable to partition attacks. In a single shard, once the offline nodes or malicious nodes exceed 1/3 of the number of committee nodes, the shard consensus may not be able to proceed normally, and even cause message interception, tampering or falsification. In the earliest elastic algorithm for solving the problem of dynamic allocation of fragmented nodes, the fragment reconfiguration mode is full random fragmentation, and all nodes of the full fragments are scattered and then form a new committee reelect consensus. Obviously, this reconfiguration scheme has relatively large limitations. First, there is a significant overhead that would be incurred in the view that needs to be reconfigured, which would severely impact system performance within the current time round. Secondly, most nodes under the full random slicing are redistributed under the slicing different from the former slicing, and then the account book of the current slicing committee must be read again, so that the slicing has larger storage pressure.
Cuckoo principle
In the cuckoo principle, all clients are linearly and randomly arranged in a [0, n ] interval, and are equally divided into n committees according to the system condition during starting. When a new client joins a committee randomly, a fixed number of clients in the area are moved randomly to other committees. The cuckoo principle distribution scheme is shown in fig. 2.
There are problems with node reconfiguration using the cuckoo principle in a sliced based blockchain network. First, the random allocation of clients in a large distributed system is centralized, and the presence of a central server can enable the distributed system to easily complete the random allocation of clients. However, in the decentralised blockchain network, the process of randomly moving a fixed number of nodes to other slices must be completed after the common knowledge of all the slice committees passes, which seriously affects the throughput and the operation efficiency of the system. In addition, in an actual blockchain network environment, the liveness of different shard committees is different. For example, some active fragmentation committees may frequently have nodes joining or going offline, while some passive committees do not have transactions over long spans of time. When a new node joins a committee at a time, a fixed number of nodes in a region are randomly moved to other committees. The number of active fragmentation committee nodes will instead decrease over time, and the number of passive committee nodes will increase. Even if only one node is moved at a time, so that the number of nodes of the active committee is not affected, the dynamic reconfiguration of the slices is too small to guarantee the security of the system. This is clearly not in line with what we want.
Trusted execution environment TEE
The trusted execution environment (Trusted Execution Environment TEE) is a trusted execution environment that can perform sensitive task operations independent of the blockchain system, in hardware-level isolation space. The method is widely applied to protecting sensitive data such as passwords, identification certificates, transaction information and the like, and ensuring that the data cannot be tampered or revealed by a third party. Because of the ability of TEE to protect data security and privacy, it is often used as a trusted third party to ensure the security of data and code, the execution security of algorithms, the secure management of keys, the security of mobile devices, etc.
Assuming a hybrid model, a trusted third party component Trusted Execution Environment (TEE) is added to the bayer blockchain network instead of computing a portion of the work that is not related to the transaction but requires consensus. An important security guarantee of TEE is to ensure the integrity of the protected module so that an attacker cannot tamper with its execution. In the application, SGX hardware using intel provides TEE technical support. By dividing a piece of address space enclave in SGX to construct a trusted environment, the two functions of built-in SGX _read_rand and SGX _get_trusted_time are used to generate unbiased random numbers and time stamps required for node reconfiguration. The sharding may verify whether the TEE is properly instantiated and executing on the corresponding hardware through a remote verification protocol. This is accomplished by the TEE calculating its measurement of the initial state and signing the measurement using its private key. The fragments may then verify the signed message and compare the measured value to a known value to ensure that the unbiased random number has not been tampered with. The TEE persists its state to non-volatile memory through a data sealing mechanism, ensuring that data can only be decrypted by the TEE sealing it.
On one hand, the addition of the trusted third party TEE optimizes the PBFT protocol, and the work except the transaction is optimized, so that the communication overhead is reduced, and the throughput is further improved. On the other hand, the reliable and safe TEE features are also very compatible with a block chain system, and the safety enhancement technology further provides the safety guarantee of a hardware level for PBFT consensus.
Improved cuckoo principle
In order to solve the problems that the throughput and the operation efficiency are reduced due to redistribution of the cuckoo principle in a decentralised PBFT system, the total number is reduced due to the addition of new nodes with frequent active fragments, and the like, a trusted third party TEE is added in a Bayesian blockchain network to generate unbiased random numbers and time stamps, and the cuckoo principle is improved.
First node reconfiguration requires a constant acquisition of unbiased random numbers rnd by the TEE as a seed for node-to-fragment committee allocation. Given rnd, the node derives the allocation order among the committees of fragments by computing the random permutation pi of [1, n ] by the seeds.
Assuming that each consensus cycle of the sliced blockchain system is numbered epoch, the node reconfiguration module is invoked at the beginning of each consensus cycle. At the beginning of a cycle, each slice calls the TEE with a cycle number to address space enclave, which generates random values q and rnd using the sgx _read_rand function. If and only if q=0, TEE returns < e, rnd > signature certificate contained. After the certificate is broadcast to the slicing network, each slicing adopts rnd with the smallest median value of the period epoch, and the node reconfiguration is carried out by using the rnd. In addition, in each round of consensus period, in order to avoid random deviation caused by random output discarding of malicious nodes, the enclave can only be called once.
The application improves the cuckoo principle, and m original nodes are extracted from each segment every time a new node is added or the common period epoch is sent to change in the segment block chain system, wherein the number of m nodes can be configured according to the dynamic allocation degree of the system. For the extracted nodes, the TEE forms random arrangement pi of [1, N ] through unbiased random numbers rnd, and the extracted nodes are distributed into all fragments according to the arrangement sequence. An improved cuckoo principle node distribution scheme is shown in fig. 3.
The safety of the improved cuckoo principle is ensured. Since q and rnd are independently generated in the TEE, randomness is not affected by malicious nodes in the sliced blockchain system. Because the number of times of the enclave calls in the consensus period is limited, the malicious node cannot selectively discard the unbiased random number rnd.
Cross-slice consensus protocol
In on-chip consensus, the nodes obey the on-chip consensus algorithm and can communicate directly through broadcasting. In the cross-slice consensus, as each slice stores and maintains independent blockchains, information is not communicated, and transactions among different slice nodes cannot be directly communicated, the cross-slice consensus protocol among the slices must be used as a medium to realize the consensus. The cross-slice consensus protocol must satisfy transaction atomicity, consistency, and isolation at the same time. Transaction atomicity refers to a transaction involving different fragments, where the processing action is either totally successful or totally unsuccessful, and where partial success or failure results in a double payment. Consistency refers to the fact that the timestamp, public and private keys, and hash values of the cross-slice transactions between slices must remain consistent. Isolation refers to that inter-chip transactions are carried out on the basis of data non-intercommunication, the inter-chip transactions are shared, and inter-chip transactions are isolated from each other. At present, the cross-chip consensus mode mainly comprises transaction atomization, transaction centralization and a class routing protocol.
Transaction atomization refers to the refinement of a transaction into a plurality of independent sub-transactions, and the fragmentation involved in cross-fragment consensus only needs to ensure the atomicity and consistency of the sub-transactions. Through the atomization process, a cross-slice transaction can be understood as an intra-slice transaction-a sliced output transaction and a sliced input transaction. The cross-slice transaction is processed through the atom protocol. The output client firstly broadcasts verification to the fragments, and the verification completes the transaction by sending a fund unlocking request to the input client. This approach is prone to deadlock when funds are unlocked and transactions are cancelled, and also places significant pressure on the authentication of the shard group if there are a large number of low-credit sub-transactions to commit. Transaction centralization refers to the centralized processing of all cross-slice transactions across a certain slice or node. In the Ethereum2.0 framework, beacon chains are added to the side chains of the Ethereum backbone, and whether the cross-fragment transaction is double-flower is intensively verified. The rapidcircuit proposes an inter-committee routing protocol, establishes a routing table, enables transactions to be routed and propagated among the fragments, and can continuously route among the fragments after channels are established.
Namespaces
In the computer field, a namespace (namespace) is typically a container that holds a set of identifiers (variables, functions, classes, etc.). The purpose of the namespaces is to organize the identifiers in a logical way and to prevent naming conflicts between identifiers of different parts of a program or library. This is accomplished by giving each identifier a unique, unambiguous name within the namespace. Namespaces are typically implemented in programming languages such as c++, python, and Java, and can be used to organize large code libraries into smaller, more manageable parts.
In the present application, a namespace is used as a piece of logical address for each block within each tile used to record and tag transaction applications. Namespaces are collections of transactions, one namespace logically corresponds to one shard, so each namespace requires a chain to record the change in state of the transaction within the shard. In the sliced blockchain system of the present application, the namespace consists essentially of pointers to the logical addresses of the next blocks and transaction state changes. The logic, the sequence and the dependency relationship among the transactions can be intuitively displayed through the pointer.
Directed acyclic graph DAG
Whatever the type of blockchain system, its main process basically follows the basic process of packaging, consensus, storage. In the conventional blockchain transaction execution scheme, nodes perform serial reading transaction from a block to be agreed, and in the intra-chip consensus, the serial reading mode does not have much influence on performance because the nodes can communicate with each other through broadcasting. However, in the cross-slice consensus, the atomicity and consistency cannot be realized by serial reading of the cross-slice transaction among the mutually isolated slices. In addition, since there is often a dependency relationship between transactions in the real environment, for example, two transactions a→ B, B →c, if a→b is not achieved, the subsequent transactions cannot be completed. The transactions may be organized in logical, sequential, and dependent relationships into a directed graph.
A directed graph includes a set of points V and a set of edges E. Each element in the edge set is (u, v), which means that the u node indirectly confirms the content represented by the v node. To prevent dependencies from looping, the same mutually exclusive resources are involved in the list of transactions, and later ordered transactions must wait for the earlier transactions to complete before being executed. The absence of any one node having directly or indirectly referenced another node, i.e. the absence of u 1 ,u 2 ,...,u l Satisfy the following requirements
And (u) l ,u 1 )∈E。
Then a directed acyclic graph DAG reflecting the transaction relation can be obtained, and the acyclic property enables the DAG account book to have the topological property of easy addition, difficult deletion and ordered transaction.
Cross-fragment transaction processing
Each transaction in the sliced blockchain system has a unique ID, an input list for the sender and an output list for the receiver. All inputs to the transaction must be the unexpired coi with the new coin value proof sn, which are tokens that have never been used in the previous transaction. The output of the transaction is a new coin generated for the recipient of the redemption token. The change in the spin state before and after the transaction is shown in fig. 4.
This type of transaction is referred to as a cross-fragment transaction if the sender and receiver are located in different fragments. A cross-fragment transaction is shown in fig. 5.
To ensure transaction atomicity, consistency across sharded transactions, state changes for transactions are stored by assigning namespaces to respective shards. Because of the high combinability of intra-block transactions, there will not be any conflict as long as there is no dependency between transactions. In this way, the single strands stored in the namespaces can be converted into the form of a directed acyclic graph DAG. Assume that a cross-slice transaction involves two slices A, B. The DAGs of the namespaces within A, B can be intersected to obtain three parallel directed acyclic graphs. The cross-fragment transaction solution is shown in fig. 6.
Thus, the namespace consisting of A and B includes { A, B, A.cndot.B }. Where namespace A, A n B is maintained by the nodes within partition A and namespace B, A n B is maintained by the nodes within partition B. The fragments A, B collectively maintain the namespaces A.andB, so the fragment committee need only consensus on the change in transaction state within the A.andB namespaces to ensure atomicity and consistency across fragment transactions. The validity of each cross-fragment transaction can be divided into a source validity and a result validity. Source validity refers to the transaction initiator status meeting the transaction condition, which is ensured by the initiator intra-chip consensus. The result validity indicates that the receiver status is consistent with the transaction running result. The transaction party fragments share the intersection of the respective namespaces among committees to ensure the validity of the results of the transaction.
Performance and safety analysis
The part evaluates the segmented blockchain network provided by the application, analyzes the dynamic reconfiguration safety and balance of the nodes, and analyzes the safety and effectiveness of the cross-slice consensus protocol. Performance, from the aspects of throughput, application address space and transaction delay, and comparison analysis of previous research on the slicing system and the non-slicing system, performance advantages and problems of the slicing blockchain system provided by the application are discussed.
Node reconfiguration security analysis
The adopted node reconfiguration scheme needs to be proved to maintain the security and balance of the sliced blockchain system, and the system meets two definitions:
(1) Safety. The fragmentation committee can be considered safe if the proportion of malicious nodes in the fragmentation committee is strictly less than 1/3.
(2) Balance. If the number of single slice committee nodes is limited by O (logn), then it satisfies the balance condition.
Let n denote the total number of nodes of the whole blockchain network, t be the number of malicious nodes, δ be the malicious node distribution score, let m < n denote the size of a single committee, thus the number of committees k=n/m, each committee size being m=clogn, where c is a safety constant. In a round of consensus cycle, the number of new nodes per committee is clogn at most.
Safety. A k value is selected such that:
in the worst case, any committee has (1-t/n) (1-delta) clognk/3 honest nodes andand malicious nodes.
Balance. The minimum node number of each committee is c/2 (1-delta) logn, and the maximum node number is
Cross-slice consensus protocol security analysis
There is a need to prove the security and validity of the adopted cross-slice consensus protocol. Similar to other consensus protocols, the honest nodes among the security finger committee agree on valid blocks in each round on the scale of the inter-slice consensus. Validity refers to that the state change of the transaction initiator is valid and consistent with the transaction result of the receiver.
Safety. The number of malicious nodes in each slice is not more than 1/3, so that the safety of intra-slice consensus can be ensured. That is to say that the initiator (recipient) is active in a cross-fragment transaction. The inter-shard consensus of the shard blockchain system follows the PBFT protocol, and collecting 2f+1 messages from different shards in the preparation phase ensures that the correct nodes agree on within the current view. Since the initiator (receiver) is valid in the cross-fragment transaction via intra-fragment consensus, the cross-fragment transaction is confirmed in the preparation phase by broadcasting. In the submitting stage, in the process of cross-view conversion (switching of the master node), on the premise of safe intra-chip consensus result, related requests are executed by cross-chip transaction related parties and respond to clients, so that the requests can still be replayed (executed by other nodes) after the master node is switched. The transaction safety across the fragments in the submitting stage is also ensured, the communication among the fragments can be safely carried out, and honest nodes in all relevant fragments agree on the same effective block across the fragments in each round, namely the consensus safety is ensured.
Effectiveness. The validity of each cross-fragment transaction can be divided into a source validity and a result validity. Source validity refers to the transaction initiator status satisfying the transaction condition. The node ensures (1) whether the input token coi is not spent; (2) whether the output sum is less than the input sum. The endorsement of sn is guaranteed to the new coin value proof of the input token coin in the burst. The result validity indicates that the receiver status is consistent with the transaction running result. Parties involved in the transaction take their namespaces into intersection, and maintain the intersection namespaces while maintaining the on-chip transaction state. Related transaction states exist and are consistent in the name space intersection of the fragments, so that the validity of the result of the transaction can be ensured.
Performance analysis:
blockchain system performance primarily analyzes its throughput, occupied address space size, and transaction delay. Throughput TPS refers to the number of transactions processed per second and transaction delay refers to the time required from transaction processing to submission. For a sliced blockchain system, system performance is primarily affected by transactions across slices. For a chipless blockchain system, the transaction distribution may be expressed as α= { α 12 ,...,α s -wherein alpha s Is the percentage of transactions involving s nodes. Distribution α in a sliced blockchain system can be converted to β= { β 12 ,...,β k -wherein beta is 1 Is the percentage of the on-chip transaction, beta k Percentage of transactions across fragments that involve k fragments. The paper assumes that the delay in a slice with n nodes increases with the number of nodes n, a function of f (n). The functional image of the delay function f (n) resembles an exponential function based on e.
In a complete sliced blockchain system, each cross-slice transaction involving k slices needs to be divided into at least k sub-transactions. Let K be the maximum number of transactions processed in a round of consensus. In a non-tiled blockchain system, there is no cross-tile transaction, its throughput is:
let β be the transaction distribution function, the maximum throughput of a system with k slices is:
the throughput of the slicing system is reduced along with the increase of the slicing transactions, but the expansibility of the blockchain system is effectively improved by the slicing technology, so that the throughput of the system can be continuously improved along with the increase of the node number and the transaction amount. The variation of the scalable blockchain network throughput TPS over the number of slices is shown in fig. 7.
In a real-world tiled blockchain system, the tiles that frequently occur across tile transactions are often fixed, which greatly improves the throughput of the system and reduces the required application address space capacity. Second, the maximum number of transactions K of the blockchain system is often far greater than that of the non-blockchain system, so that although the throughput of the blockchain system is affected by the cross-slicing transaction, the throughput total value and the system expansibility are far higher than those of the non-blockchain system.
Assume that the average value of the length of the address space is j bit for the name space application. The maximum value of the address space applied by the block chain system for processing the cross-slice transaction is as follows:
in a real blockchain system, inactive fragments often exist, and the number of fragments for frequently initiating cross-fragment transactions is relatively fixed. The number of transactions across multiple slices is also much smaller than the transactions between two slices. Thus, the size of the address space of the transaction application across the fragments of the scalable blockchain network based on fragments varies with the number of fragments as shown in fig. 8.
In previous sharding systems, such as OmniLedger, each sub-transaction across sharded transactions required to be submitted between different consensus rounds. The previous shard system transaction delays were therefore:
in the application, as the namespaces and the DAGs are added, fragments related to cross-fragment transactions all have transaction state changes and ensure consistency, and can complete consensus and submit transactions in the same consensus round. The transaction delay of the sliced blockchain system of the present application is therefore predicted to be:
compared with the traditional block chain system transaction delay based on the slicing, the system transaction delay based on the slicing can be increased along with the expansion of the system scale, and along with the continuous proportional increase of the number of the slicing and the nodes, the expandable block chain network system transaction delay based on the slicing can be stabilized at about 18 s. The situation that the transaction delay of the scalable blockchain network based on the fragments changes with the number of the fragments is shown in fig. 9.
Comparison of existing schemes
In recent years, the slicing technology is continuously updated and iterated, indexes such as throughput, transaction delay, consensus protocol and the like are continuously optimized, and the slicing efficiency and robustness are further improved. In table 1, the scalable blockchain network based on shards compares the metrics of throughput, transaction delay, shard consensus, etc. with OmniLedger, rapidChain, monoxide.
Table 1 comparison of properties
Where x refers to the blockchain size and k refers to the number of slices.
The network model provides a brand new node dynamic reconfiguration solution through TEE and improved design of a cuckoo algorithm, avoids single piece sinking caused by malicious node concentration, and can dynamically adjust the variation range of a block chain network so as to realize node distribution balance as much as possible. Based on the namespaces and the DAG, address spaces are applied for each fragment, and the consistency and atomicity of the cross-fragment transaction are ensured by taking intersection of the fragment namespaces related to the cross-fragment transaction in a pointer mode.

Claims (8)

1. The utility model provides a scalable blockchain network model based on segmentation which characterized in that: the system comprises a data layer, a consensus layer and an application layer;
in the data layer, each fragment node generates an information data abstract through hash operation; the information data abstract is packed into blocks and generates zero knowledge proof, and the zero knowledge proof is added to the back of the latest block through intra-slice consensus from the created block without transaction; after the hash value is calculated, the transaction and the state data are packaged and stored in a micro node server to finish the warehouse-in storage of the blockchain;
The consensus layer comprises an intra-chip consensus module and a cross-chip consensus module, wherein the intra-chip consensus module comprises an elliptic curve module, a merck tree module, a PoW consensus module, a zk-SNARK module, an excitation mechanism module, an Account book Account module and a transaction Txs module; the inter-slice consensus module comprises a directed acyclic graph DAG module, a PBFT consensus module, a parallel promise module, a naming space module, an improved cuckoo principle module and a trusted execution environment TEE module;
the intra-chip consensus module is used for being responsible for running an intra-chip account book, in intra-chip consensus, each node can directly communicate, in inter-chip consensus, each node belongs to different chips and maintains different block chains, transaction storage information of each node is not intersected, so that node communication needs to rely on the chips for transaction synchronization, and the same PBFT protocol is executed among the chips for consensus;
the inter-chip consensus module utilizes the concept of transaction atomization, the namespace module is utilized in inter-chip consensus to be applied to inter-chip transactions, a directed acyclic graph data structure is utilized to replace a single linked list to construct a DAG blockchain to realize parallel promise, namely internal transactions which do not conflict with the inter-chip transactions are guaranteed, and the internal transactions can be safely submitted to each chip in the same consensus round; every time a new node is added into a slice or a certain consensus round is passed, the slice-expandable blockchain network must take out part of the nodes from the original slice to exchange with other slices, the cuckoo principle is improved, and a trusted execution environment TEE is used as a trusted third party to dynamically reconfigure all the nodes;
The application layer comprises an interface protocol module, an IPFS module, a Docker module and an intelligent contract module, and the application layer in the node is used for providing intelligent contracts and interfaces for upper-layer services and external applications; the external Cli client isolates the intra-segment consensus generation chain and the zero knowledge proof through a Docker virtualization technology, and the disclosure is independent of the segment; meanwhile, an upper user constructs a Docker container arrangement cluster and an automation engine; the IPFS module comprises a Hash table, a block exchange, a Merkle DAG and a self-authentication file system; through a hash table and a merck tree, the IPFS stores nouns and paths of files and does not pay attention to the positions of server data, and the HashKey generated by the files is directly used for searching; each shard deploys an intelligent contract above the consensus layer to provide a trust interface for the DApps; the DApps invokes the intelligent contract through the Json Api to realize the autonomy of the service and the task.
2. The scalable blockchain network model of claim 1, wherein the trusted execution environment TEE module is implemented as follows:
setting a mixed model, adding a Trusted Execution Environment (TEE) of a trusted third party component in the Bayesian blockchain network to calculate a part of work which is irrelevant to transactions but needs consensus; constructing a trusted environment by dividing an address space enclave in an SGX, and generating unbiased random numbers and time stamps required by node reconfiguration by using two functions of built-in SGX _read_rand and SGX _get_purified_time; the slicing verifies whether the TEE is properly instantiated and executed on the corresponding hardware through a remote verification protocol; the TEE persists its state to non-volatile memory through a data sealing mechanism, ensuring that data can only be decrypted by the TEE sealing it.
3. The scalable blockchain network model based on shards of claim 1, wherein the improved cuckoo principle implementation method is as follows:
adding a trusted third party TEE into the Bayesian blockchain network to generate unbiased random numbers and time stamps and improving the cuckoo principle;
firstly, the fragment node reconfiguration needs a TEE to continuously acquire unbiased random number rnd as a seed to distribute the node to the fragment committee; given rnd, the node derives the allocation order among the committees of fragments by computing pi from the random permutation of [1, n ] of the seeds;
assuming that each consensus period of the block chain system is numbered as epoch, calling a node reconfiguration module when each consensus period starts; at the beginning of a cycle, each slice calls an address space enclave to the TEE with a cycle number, the enclave generating random values q and rnd using a sgx _read_rand function; if and only if q=0, the TEE returns the < e, rnd > signature certificate contained; after the certificate is broadcast to the slicing network, each slicing adopts rnd with the smallest median value of the period epoch, and the node reconfiguration is carried out by using the rnd; in addition, in each round of consensus period, in order to avoid random deviation caused by random output discarding of malicious nodes, the enclave can only be called once.
4. The scalable, slice-based blockchain network model of claim 1, wherein the method of constructing the zk-snare module comprises the steps of:
firstly, converting input calculation content into an algebraic circuit form, and converting the algebraic circuit into a first-level constraint system R1CS, so that a solution vector s of the algebraic circuit meets s.a.s.b-s.c=0;
then converting R1CS into a quadratic equation QAP, and converting the constraint to be checked from the constraint between numbers to the constraint between polynomials; the arithmetic circuit on the finite field of only the addition and multiplication gates represents a trusted third party forSatisfy n equations if and only if for each x 1 ,...,x q The following equation holds:
consider arithmetic circuits on finite fields with only adder and multiplier gatesWherein->For each x of the multiplier gates 1 ,...,x q ,a i (x q ),b i (x q ),c i (x q ) Is->The constant satisfying the qth equation, set a of the corresponding row i =1,b i =1,c i =1; let t (X) be the lowest order polynomial, at any point X q ,t(x q ) =0. For the addition gate, the equation number is not counted. The following equation holds:
the entire quadratic equation (QAP) R can be expressed as:
wherein aux is auxiliary information, 1.ltoreq.l.ltoreq.m,and t (X) has a degree of n. n is the number of R1CS constraints; when h 0 =1, the following binary relationship can be defined:
Constructing a non-interactive linear demonstration based on bilinear pairing:
prover from trusted setting third party +.>Selecting random number, setting G and H as prime group +.>Andis a generator of (1); output as common reference string +.>
And responsive simulated trapdoors
Selecting two random numbers x 1 =r,x 2 =s; and (3) calculating:
three points A, B, C on the elliptic curve are then calculated:
point a above:
point B above:
point C above:
first use +.>Is disclosed prefix calculation point->
Taking (a, B, C), it is verified that the proof-er provided the assertion is correct if the following equation holds true:
e(A,B)=e(αG,βH)·e(D,γH)·e(C,δH) (12)
zk-SNARKs were constructed by the above method.
5. The scalable, slice-based blockchain network model of claim 1, wherein the method of slice-to-slice consensus comprises the steps of:
cross-slice consensus must satisfy transaction atomicity, consistency, and isolation at the same time; transaction atomicity refers to a transaction involving different fragments, and processing actions are either all successful or all failed, and partial success or failure can cause double payment; consistency means that the timestamp, public and private keys and hash values of the cross-slice transactions among slices must be kept consistent; isolation refers to that inter-chip transactions are carried out on the basis of data non-intercommunication, the inter-chip transactions are shared, and inter-chip transactions are isolated from each other;
The cross-chip consensus mode mainly comprises transaction atomization, transaction centralization and a class routing protocol; transaction atomization refers to the refinement of a transaction into a plurality of independent sub-transactions, and the fragmentation involved in cross-fragment consensus only needs to ensure the atomicity and consistency of the sub-transactions; through atomization processing, a cross-slice transaction can be understood as an intra-slice transaction, namely a sliced output transaction and a sliced input transaction; the output client firstly broadcasts verification to the fragments, and the verification completes the transaction by sending a fund unlocking request to the input client; transaction centralization refers to the centralized processing of all cross-slice transactions by a certain slice or node; the class routing protocol is to build a routing table to make the transaction route-spread among the fragments, and the channel can continuously route among the fragments after being built.
6. The scalable, slice-based blockchain network model of claim 5, wherein the method of implementing the namespaces comprises the steps of:
using the name space as a piece of logical address for recording and marking the transaction application by each block in each piece; namespaces are collections of transactions, one namespace logically corresponds to one shard, so each namespace requires a chain to record the change in transaction state within the shard; in a sliced blockchain system, the namespace mainly includes a pointer to the next blocklogical address and a transaction state change; the logic, the sequence and the dependency relationship among the transactions can be intuitively displayed through the pointer.
7. The scalable, slice-based blockchain network model of claim 5, wherein the directed acyclic graph DAG module is processed as follows:
a directed graph includes a set of points V, an edge set E; each element in the edge set is (u, v), which means that the u node indirectly confirms the content represented by the v node; to prevent the dependency from forming a loop, the transaction list is defined to involve the same mutually exclusive resources, and the later ordered transactions must be executed after the earlier transactions are completed; the absence of any one node having directly or indirectly referenced another node, i.e. the absence of u 1 ,u 2 ,...,u l Satisfy the following requirements
And (u) l ,u 1 )∈E;(13)
A directed acyclic graph DAG reflecting the transaction relation is obtained, and the acyclic property enables the DAG account book to have the topological property of easy addition, difficult deletion and ordered transaction.
8. The scalable blockchain network model of claim 5, wherein in the cross-shard transaction processing method:
the single strands stored in the namespace are converted into the form of a directed acyclic graph DAG during the transaction; assume that a cross-fragment transaction involves two fragments A, B; intersection of the DAGs of the namespaces in A, B is carried out, and three parallel directed acyclic graphs are obtained; the namespace consisting of A and B includes { A, B, A.u.B };
Wherein the namespace A, A n B is maintained by the inode within partition A and the namespace B, A n B is maintained by the inode within partition B; the fragments A, B together maintain the namespaces a n B, so that the fragment committee can ensure the atomicity and consistency of the cross-fragment transactions by only consensus on the change of transaction states in the a n B namespaces; the validity of each cross-fragment transaction can be divided into source validity and result validity; source validity refers to the transaction initiator status meeting the transaction condition, which is ensured by the initiator intra-chip consensus; the result validity indicates that the state of the receiver is consistent with the transaction operation result; the transaction party fragments share the intersection of the respective namespaces among committees to ensure the validity of the results of the transaction.
CN202310704460.1A 2023-06-14 2023-06-14 Scalable blockchain network model based on slicing Pending CN116668313A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310704460.1A CN116668313A (en) 2023-06-14 2023-06-14 Scalable blockchain network model based on slicing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310704460.1A CN116668313A (en) 2023-06-14 2023-06-14 Scalable blockchain network model based on slicing

Publications (1)

Publication Number Publication Date
CN116668313A true CN116668313A (en) 2023-08-29

Family

ID=87709571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310704460.1A Pending CN116668313A (en) 2023-06-14 2023-06-14 Scalable blockchain network model based on slicing

Country Status (1)

Country Link
CN (1) CN116668313A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116846916A (en) * 2023-09-01 2023-10-03 武汉趣链数字科技有限公司 Data synchronization method, device, electronic equipment and computer readable storage medium
CN117114886A (en) * 2023-10-23 2023-11-24 北京邮电大学 Block chain carbon transaction method and system based on double-layer consensus mechanism
CN117708244A (en) * 2024-02-05 2024-03-15 粤港澳大湾区数字经济研究院(福田) Digital asset interaction method, terminal and medium based on high-performance blockchain

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116846916A (en) * 2023-09-01 2023-10-03 武汉趣链数字科技有限公司 Data synchronization method, device, electronic equipment and computer readable storage medium
CN116846916B (en) * 2023-09-01 2023-12-08 武汉趣链数字科技有限公司 Data synchronization method, device, electronic equipment and computer readable storage medium
CN117114886A (en) * 2023-10-23 2023-11-24 北京邮电大学 Block chain carbon transaction method and system based on double-layer consensus mechanism
CN117114886B (en) * 2023-10-23 2024-04-09 北京邮电大学 Block chain carbon transaction method and system based on double-layer consensus mechanism
CN117708244A (en) * 2024-02-05 2024-03-15 粤港澳大湾区数字经济研究院(福田) Digital asset interaction method, terminal and medium based on high-performance blockchain
CN117708244B (en) * 2024-02-05 2024-06-11 粤港澳大湾区数字经济研究院(福田) Digital asset interaction method, terminal and medium based on high-performance blockchain

Similar Documents

Publication Publication Date Title
Keidar et al. All you need is dag
Wang et al. Sok: Sharding on blockchain
Fernández-Caramés et al. A Review on the Use of Blockchain for the Internet of Things
Berger et al. Scaling byzantine consensus: A broad analysis
Amir et al. Steward: Scaling byzantine fault-tolerant replication to wide area networks
Hong et al. Scaling blockchain via layered sharding
CN116668313A (en) Scalable blockchain network model based on slicing
Danezis et al. Blockmania: from block dags to consensus
Cai et al. Benzene: Scaling blockchain with cooperation-based sharding
Chen et al. DEXON: a highly scalable, decentralized DAG-based consensus algorithm
Tennakoon et al. Dynamic blockchain sharding
Liu et al. Parallel and asynchronous smart contract execution
Li et al. Scalable blockchain storage mechanism based on two-layer structure and improved distributed consensus
Xi et al. [Retracted] A Comprehensive Survey on Sharding in Blockchains
Durand et al. Stakecube: Combining sharding and proof-of-stake to build fork-free secure permissionless distributed ledgers
Wang et al. GradingShard: A new sharding protocol to improve blockchain throughput
Flamini et al. Multidimensional Byzantine agreement in a synchronous setting
JP2022553701A (en) Decentralized network with consensus mechanism
Kiayias et al. Ordering transactions with bounded unfairness: definitions, complexity and constructions
Xian et al. ICOE: A Lightweight Group-Consensus-Based Off-Chain Execution Model for Smart Contract-Based Industrial Applications
Chen et al. Enhancing Blockchain Performance via On-chain and Off-chain Collaboration
Azouvi et al. Modeling Resources in Permissionless Longest-Chain Total-Order Broadcast
Yang et al. Adapted PBFT consensus protocol for sharded blockchain
Xu et al. Ecom: Epoch randomness-based consensus committee configuration for iot blockchains
Zhang et al. Scalable and fault-tolerant selection method of verification and accounting nodes for permissionless blockchain

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