| Recently,blockchain technology has attracted extensive attention due to its features such as decentralization,autonomy,data irrevocability,and traceability.At present,the application of blockchain still has performance constraints.In order to further optimize the performance of blockchain,the existing capacity expansion scheme is studied.In order to improve the scalability of blockchain,predecessors have proposed a large number of blockchain scalability schemes,which can be roughly divided into three categories: on-chain scheme(Layer 1),off-chain scheme(Layer 2),and on-chain and off-chain collaborative expansion.Layer1 is the scalability scheme implemented on the blockchain basic protocol,such as the improvement of the consensus algorithm and the sharding of the blockchain.Off-chain scalability scheme,namely Layer 2 expansion,is an application layer expansion scheme,such as the side chain and state channel technology of Layer 2.In order to ensure the relevance and consistency of the data on-chain and off-chain,the collaborative expansion scheme of the blockchain requires on-chain and off-chain data can collaborate effectively.This paper aims to optimize the existing blockchain scalability scheme on the basis of the consortium blockchain as the research object and proposed an on-chain and off-chain collaborative expansion scheme,so as to provide conditions for the large-scale application of blockchain.The expansion scheme is divided into two parts: The first part proposed a consortium chain model with on-chain and off-chain data collaboration,which implements a method of data access and reflection verification for on-chain and off-chain collaboration,and enhances the coordination of data on and off the chain;The second part is an alternative to the first part.It proposed a more efficient blockchain model.This consortium chain model using KRaft(Kademlia-Raft)consensus algorithm.The two parts are interrelated and complementary.The consortium blockchain model of on-chain and off-chain collaborative expansion scheme realized an on-chain and off-chain collaborative data access and reflection verification method.It includes three parts: efficient on-chain consensus scheme,on-chain and off-chain collaborative data access and reflection verification scheme,and on-chain and off-chain collaboration model.The three parts together construct a complete set of expansion scheme for the coordination of on-chain and off-chain data.The consortium blockchain model of on-chain and off-chain data synergy organically combines on-chain security with powerful off-chain data processing functions to achieve efficient on-chain and off-chain collaboration,improved the efficiency of blockchain operations,and finally realized the scalability of blockchain.Since the current on-chain and off-chain collaborative expansion schemes are not perfect,and there is uncertain factors instability,in order to improve the stability of the blockchain system for better services and applications,a more efficient blockchain model is proposed--The consortium blockchain model using the KRaft(Kademlia-Raft)consensus algorithm is used as an alternative scheme for on-chain and off-chain collaborative expansion to the consortium chain model.The KRaft consensus algorithm is a non-Byzantine fault-tolerant consensus algorithm that can be applied to the consortium blockchain.This algorithm optimizes the Raft consensus algorithm by improving the log replication process and the leader election process.The consortium blockchain model using the KRaft consensus algorithm realizes the expansion of the blockchain by optimizing the on-chain consensus process.it ensures the availability of the consortium blockchain system when the consortium blockchain model of on-chain and off-chain data coordination fails.The proposal of an on-chain and off-chain collaborative expansion scheme optimized the performance of the blockchain,improved the efficiency and availability of the blockchain,provided favorable conditions for the large-scale application of the blockchain,and made the blockchain technology better serving traditional industries and accelerating the realization of "blockchain+". |