CN113377862B - Research and development system and method for block chain - Google Patents

Research and development system and method for block chain Download PDF

Info

Publication number
CN113377862B
CN113377862B CN202010162783.9A CN202010162783A CN113377862B CN 113377862 B CN113377862 B CN 113377862B CN 202010162783 A CN202010162783 A CN 202010162783A CN 113377862 B CN113377862 B CN 113377862B
Authority
CN
China
Prior art keywords
transaction
chain
sub
module
custom
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.)
Active
Application number
CN202010162783.9A
Other languages
Chinese (zh)
Other versions
CN113377862A (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.)
Benchainless Technology Shenzhen Co ltd
Original Assignee
Benchainless Technology Shenzhen 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 Benchainless Technology Shenzhen Co ltd filed Critical Benchainless Technology Shenzhen Co ltd
Priority to CN202010162783.9A priority Critical patent/CN113377862B/en
Publication of CN113377862A publication Critical patent/CN113377862A/en
Application granted granted Critical
Publication of CN113377862B publication Critical patent/CN113377862B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction

Abstract

The invention discloses a research and development system and method for a block chain sub-chain, comprising a node manager, an creation block manager and a sub-chain manager; the system generates a blank generation block through the generation block manager, generates a sub-chain research and development transaction, submits the transaction to the block chain, receives the transaction through the node manager, checks the transaction and executes the transaction, completes the list expansion of the generation node, synchronizes the sub-chain data, and completes the start of the sub-chain. The invention realizes the function of keeping the processing logic consistent among different coding chains of different architectures, and solves the problem that the source is randomly closed when the source is opened in the ecological development of the block chain.

Description

Research and development system and method for block chain
Technical Field
The invention relates to the technical field of block chains, in particular to a research and development system and method for a block chain sub-chain.
Background
The blockchain will serve each industry in the future, in serving each industry, based on the problem of the upper limit of the performance bearing capacity, generally, all services will not be put into one chain, generally, all services will be split into multiple chains according to the classification of the service and the service scale, the splitting process may be a process of natural evolution of social development, may be included in the top-level design at the beginning, and may have different modes according to different initiating subjects and application scenarios, but in either mode, the service is carried by multiple chains together and is in a final expression form, so in this case, the consistency of the data structure, the network structure and the consensus rule between different chains often determines the intercommunication capacity between different chains, especially the intercommunication capacity of assets on the chains, and this capacity greatly restricts the ecological development of the blockchain network.
For solving the problems of data structure, network structure and consensus rule consistency among multiple chains, a method for copying one chain is often adopted, but in the practical application process, the core logic of the copied chain is often modified due to the demands of marketing, service specificity and technical uniqueness, so that the intercommunication among the subsequent multiple chains is further hindered. In this case, to maintain interworking between multiple links, the most widely adopted solution is to establish a third party link to access both parties, and provide indirect interworking service for both parties. Another common scheme for maintaining interworking between multiple chains is that all chains in the whole system are responsible for research and development by one organization, thus protecting the consistency of the chain cores, but greatly restricting the development speed of the blockchain and restricting the further publicization of the blockchain. Therefore, how to maintain the development of blockchain diversity and the interoperability of the structures between the chains without introducing a third party is not controlled by one organization in a centralized manner, and is an urgent problem to be solved.
Disclosure of Invention
The invention aims to provide a research and development system and method for a block chain sub-chain.
A research and development system for a blockchain sub-chain comprises a transaction definer, a transaction interpreter and a sub-chain initiator; the transaction definer is used for defining the transaction type of the sub-chain and the information contained in the transaction, and does not cover and influence the original transaction; the transaction interpreter is used for developing interpretation logic of transactions of the sub-chain, processing the transactions, and interpreting the transactions in different memory spaces and different data spaces when the transactions are interpreted and executed; the sub-chain starter is used for selecting different creation blocks, starting different chains and loading different interpreters, and the different creation blocks are loaded with different transaction interpreters;
the system downloads a main chain core program through the offline operation of a developer, creates a subchain creation block file, places the subchain creation block file into a main chain, loads the creation block by a subchain starter, completes a starting node, and completes the transaction by using a transaction interpreter.
Further, the transaction definer comprises a type definition module, a transaction body module and a transaction interface module;
the type definition module is used for defining transaction types newly supported by the sub-chain, wherein the transaction types are not repeated with the basic transaction types, accord with type definition specifications and are defined in the scope of sub-chain names;
the transaction body module is used for providing a specific transaction body aiming at a specific transaction type;
the transaction interface module is used for providing a general sub-chain custom transaction access channel, so that the sub-chain is executed and can also interact data.
Further, the transaction body structure of the transaction body module is consistent with the main chain structure, and the main chain basic structure can be expanded; the transaction body module may also operate on special definitions of the sub-chains that are to be declared in the transaction body, and when a subsequent transaction is to be interpreted, the interpretation is to be performed in accordance with the declaration of the transaction body.
Further, the transaction interpreter comprises a transaction analysis module, a transaction execution module and a result registering module;
the transaction analysis module is used for analyzing transaction data, extracting a basic structure and a sub-chain definition structure, and pushing custom operations in the custom structure into a stack according to an operation sequence so as to be used for subsequent execution operations;
the transaction execution module is used for executing the operation instructions in the stack in sequence, and the execution depends on the stacking sequence of the previous transaction analysis module;
the result registering module is used for storing intermediate data and a final result in the transaction executing process.
Further, the sub-chain starter comprises an creation block analysis module, an creation parameter module and an creation block loading module;
the generation block analysis module is used for analyzing generation block information, checking whether the generation block is legal or not and whether a complete signature of a generator exists or not;
the generation parameter module is used for extracting parameter information in generation blocks and parameter configuration information of running block chain nodes.
The generation block loading module is used for loading the content of the generation block into the blockchain environment and loading the subsequent blocks according to the generation block information.
Further, the parameter information of the generation parameter module comprises the consensus parameter of the whole blockchain ecological network, the consensus parameter of the current chain, and the parameter required by the current node in the operation process.
A development method for a blockchain sub-chain, comprising the steps of:
s1 developer offline operation: downloading a main chain core program, finding a transaction type definition catalog, adding a custom transaction type, finding a word definition transaction research and development catalog, creating a code file of the custom transaction, and writing processing logic of the transaction type in the file; entering S2 if the transaction is the developer custom processing logic, and discarding the transaction if the transaction is not the developer custom processing logic;
s2 developer offline operation: creating a code file processed by the custom logic, and writing the processing step of the custom logic in the file; the definition of the custom transaction is completed, a subchain generation block file is formed, the subchain generation block file is placed under a main chain core program directory, and S3 is entered;
s3, a sub-chain starter: the node starts a core program, the core program loads an creation block, and the starting is completed according to the requirement of the creation block on synchronizing block chain data; s4, entering a step S;
s4 transaction interpreter: the node receives a transaction, the transaction definer extracts the transaction type and extracts an interpretation code file of the transaction type; transaction interpreter: executing the transaction by using the interpreter, finding a self-defining step in the interpretation process, and completing the transaction by adopting the self-defining step; and obtaining an execution result of the transaction to finish the processing of a custom transaction.
Further, the specific steps of completing the transaction by adopting the custom step in the step S4 are as follows:
s41 transaction definer: obtaining a custom step type; extracting an interpretation code file of the step type;
s42 transaction interpreter: this step is performed using the interpreter.
Compared with the prior art, the invention realizes the function of developing the block chain of the custom service under the condition of closing the source, and solves the problem that the source is randomly closed when the source is opened in the ecological development of the block chain.
Drawings
FIG. 1 is a schematic diagram of a development system for a blockchain sub-chain in accordance with the present invention;
FIG. 2 is a schematic diagram of the components of the transaction definer of the present invention;
FIG. 3 is a schematic diagram of the components of the transaction interpreter of the present invention;
FIG. 4 is a schematic diagram of the composition of the proposed sub-chain starter;
FIG. 5 is a flow chart of a method of developing a blockchain sub-chain in accordance with the present invention;
FIG. 6 is a schematic flow chart of the step S4 according to the present invention;
wherein: 100 transaction definer, 200 transaction interpreter, 300 sub-chain initiator; a 101 type definition module, a 102 transaction body module and a 103 transaction interface module; the system comprises a transaction analysis module 201, a transaction execution module 202 and a result registering module 203; 301 creating block parsing module, 302 creating parameter module and 303 creating block loading module.
Detailed Description
The invention will be described in further detail with reference to the drawings and the specific examples. It should be noted that the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
As shown in fig. 1, a development system for a blockchain sub-chain includes a transaction definer 100, a transaction interpreter 200, a sub-chain initiator 300; the transaction definer 100 is configured to define a transaction type of the sub-chain itself, and information contained in the transaction, and not cover and affect the original transaction; the transaction interpreter 200 is used for developing interpretation logic of transactions of the sub-chain itself, and processing the transactions, and when the transactions are interpreted and executed, the transactions are interpreted in different memory spaces and different data spaces; the sub-chain initiator 300 is used for selecting different creation blocks, initiating different chains, loading different interpreters, and loading different transaction interpreters by the different creation blocks; in fact, the main chain and the sub-chain are identical in code, but the selected generation blocks at the time of starting are different, so that different transaction interpreters are loaded, and in fact, the sub-chain and the main chain are parallel in technical level;
the system downloads a main chain core program through developer offline operation, creates a subchain creation block file, puts the subchain creation block file into a main chain, performs core packaging and source closing on a core part affecting interoperability between blockchains, simultaneously opens an interface in the core to access the outside, opens the outside source, and allows a developer to customize the blockchains in the range; the sub-chain initiator 300 loads the creation block, completes the initiation node, and completes the transaction using the transaction interpreter 200.
As shown in fig. 2, the transaction definer 100 includes a type definition module 101, a transaction body module 102, and a transaction interface module 103;
the type definition module 101 is configured to define a transaction type newly supported by a sub-chain, where the transaction type is not repeated with a basic transaction type, accords with a type definition specification, and is defined in a sub-chain name range;
the transaction body module 102 is configured to provide a specific transaction body for a specific transaction type;
the transaction interface module 103 is configured to provide a generic sub-link custom transaction access channel, so that the sub-link is executed and data can be interacted.
The transaction body structure of the transaction body module 102 is consistent with the main chain structure, and the main chain basic structure can be expanded; the transaction body module 102 may also operate on special definitions of sub-chains that are to be declared in the transaction body, and when a subsequent transaction is to be interpreted, the interpretation is to be performed in accordance with the declaration of the transaction body.
As shown in fig. 3, the transaction interpreter 200 includes a transaction parsing module 201, a transaction execution module 202, and a result registering module 203;
the transaction parsing module 201 is configured to parse the transaction data, extract a basic structure and a sub-chain definition structure, and extract custom operations in the custom structure to be pushed into a stack according to an operation sequence for subsequent execution operations;
the transaction execution module 202 is configured to execute the operation instructions in the stack in order, where the execution depends on the stacking order of the preceding transaction analysis module;
the result registering module 203 is configured to store intermediate data and final results during execution of the transaction.
As shown in fig. 4, the sub-chain initiator 300 includes an creation block parsing module 301, an creation parameter module 302, and an creation block loading module 303;
the generation block analysis module 301 is configured to analyze generation block information, and verify whether the generation block is legal or not, and whether the generation block has a complete signature of a generator; the generation block parsing module 301 is configured to parse generation block information, where the biggest difference between the homogeneous blockchains is that generation blocks are different, different generation blocks include different generation information, and may include a name of a chain, an initial state of the chain, a generator of the chain, a generation block period of the chain, and may include some specific business rules according to different upper-layer business, such as minimum transaction commission, expiration time of a transaction, etc., and meanwhile, whether the generation blocks are legal or not will be checked herein, the generation blocks need to have a complete signature of the generator to be legal, and any parameter in the middle will not be available for modification.
The generation parameter module 302 is configured to extract parameter information in generation blocks and parameter configuration information of running blockchain nodes.
The creating block loading module 303 is configured to load the content of the creating block into the blockchain environment, and load the subsequent blocks according to the creating block information.
The parameter information of the generation parameter module 302 includes the consensus parameters of the whole blockchain ecological network, the consensus parameters of the current chain, and the parameters required by the current node in the operation process. In the generation parameter module 302, the generation parameter module is mainly used for extracting parameter information in a generation block and parameter configuration information of an operation blockchain node, wherein parameters are mainly classified into three types, one type is a consensus parameter of the whole blockchain ecological network, the other type is a consensus parameter of a current chain, and the other type is a parameter required by the current node in the operation process.
As shown in fig. 5-6, a developing method for a blockchain sub-chain includes the following steps:
s1 developer offline operation: downloading a main chain core program, finding a transaction type definition catalog, adding a custom transaction type, finding a word definition transaction research and development catalog, creating a code file of the custom transaction, and writing processing logic of the transaction type in the file; entering S2 if the transaction is the developer custom processing logic, and discarding the transaction if the transaction is not the developer custom processing logic;
s2 developer offline operation: creating a code file processed by the custom logic, and writing the processing step of the custom logic in the file; the definition of the custom transaction is completed, a subchain generation block file is formed, the subchain generation block file is placed under a main chain core program directory, and S3 is entered;
s3, a sub-chain starter: the node starts a core program, the core program loads an creation block, and the starting is completed according to the requirement of the creation block on synchronizing block chain data; s4, entering a step S;
s4 transaction interpreter: the node receives a transaction, the transaction definer extracts the transaction type and extracts an interpretation code file of the transaction type; transaction interpreter: executing the transaction by using the interpreter, finding a self-defining step in the interpretation process, and completing the transaction by adopting the self-defining step; the specific steps of the S4 for completing the transaction by adopting the custom steps are as follows: s41 transaction definer: obtaining a custom step type; extracting an interpretation code file of the step type; s42 transaction interpreter: performing the step using the interpreter; and obtaining an execution result of the transaction to finish the processing of a custom transaction.
The above description is only of the preferred embodiments of the present invention, and should not be taken as limiting the technical scope of the present invention, but all changes and modifications that come within the scope of the invention as defined by the claims and the specification are to be embraced by the invention.

Claims (8)

1. A research and development system for a blockchain sub-chain comprises a transaction definer, a transaction interpreter and a sub-chain initiator; the transaction definer is used for defining the transaction type of the sub-chain and the information contained in the transaction, and does not cover and influence the original transaction; the transaction interpreter is used for developing interpretation logic of transactions of the sub-chain, processing the transactions, and interpreting the transactions in different memory spaces and different data spaces when the transactions are interpreted and executed; the sub-chain starter is used for selecting different creation blocks, starting different chains and loading different interpreters, and the different creation blocks are loaded with different transaction interpreters;
the system downloads a main chain core program through the offline operation of a developer, creates a subchain creation block file, places the subchain creation block file into a main chain, loads the creation block by a subchain starter, completes a starting node, and completes the transaction by using a transaction interpreter.
2. A development system for a blockchain sub-chain as in claim 1 wherein: the transaction definer comprises a type definition module, a transaction body module and a transaction interface module;
the type definition module is used for defining transaction types newly supported by the sub-chain, wherein the transaction types are not repeated with the basic transaction types, accord with type definition specifications and are defined in the scope of sub-chain names;
the transaction body module is used for providing a specific transaction body aiming at a specific transaction type;
the transaction interface module is used for providing a general sub-chain custom transaction access channel, and enabling the sub-chain to be executed or data to be interacted.
3. A development system for a blockchain sub-chain as in claim 2, wherein: the transaction body structure of the transaction body module is consistent with the main chain structure, or the main chain basic structure is expanded; the transaction body module is capable of operating on a special definition of a sub-chain that is to be declared in the transaction body, and when a subsequent transaction is to be interpreted, the interpretation is to be performed in accordance with the declaration of the transaction body.
4. A development system for a blockchain sub-chain as in claim 1 wherein: the transaction interpreter comprises a transaction analysis module, a transaction execution module and a result registering module;
the transaction analysis module is used for analyzing transaction data, extracting a basic structure and a sub-chain definition structure, and pushing custom operations in the custom structure into a stack according to an operation sequence so as to be used for subsequent execution operations;
the transaction execution module is used for executing the operation instructions in the stack in sequence and executing the stacking sequence depending on the previous transaction analysis module;
the result registering module is used for storing intermediate data and a final result in the transaction executing process.
5. A development system for a blockchain sub-chain as in claim 1 wherein: the sub-chain starter comprises an creation block analysis module, an creation parameter module and an creation block loading module;
the generation block analysis module is used for analyzing generation block information, checking whether the generation block is legal or not and whether a complete signature of a generator exists or not;
the generation parameter module is used for extracting parameter information in generation blocks and parameter configuration information of running block chain nodes;
the generation block loading module is used for loading the content of the generation block into the blockchain environment and loading the subsequent blocks according to the generation block information.
6. The development system for a blockchain sub-chain of claim 5, wherein: the parameter information of the generation parameter module comprises the consensus parameter of the whole blockchain ecological network, the consensus parameter of the current chain, and the parameter required by the current node in the operation process.
7. A development method for a blockchain sub-chain, comprising the steps of:
s1 developer offline operation: downloading a main chain core program, finding a transaction type definition catalog, adding a custom transaction type, finding a word definition transaction research and development catalog, creating a code file of the custom transaction, and writing processing logic of the transaction type in the file; entering S2 if the transaction is the developer custom processing logic, and discarding the transaction if the transaction is not the developer custom processing logic;
s2 developer offline operation: creating a code file processed by the custom logic, and writing the processing step of the custom logic in the file; the definition of the custom transaction is completed, a subchain generation block file is formed, the subchain generation block file is placed under a main chain core program directory, and S3 is entered;
s3, a sub-chain starter: the node starts a core program, the core program loads an creation block, and the starting is completed according to the requirement of the creation block on synchronizing block chain data; s4, entering a step S;
s4 transaction interpreter: the node receives a transaction, the transaction definer extracts the transaction type and extracts an interpretation code file of the transaction type; transaction interpreter: executing the transaction by using the interpreter, finding a self-defining step in the interpretation process, and completing the transaction by adopting the self-defining step; and obtaining an execution result of the transaction to finish the processing of a custom transaction.
8. The method of claim 7, wherein: the specific steps of the S4 for completing the transaction by adopting the custom steps are as follows:
s41 transaction definer: obtaining a custom step type; extracting an interpretation code file of the step type;
s42 transaction interpreter: this step is performed using the interpreter.
CN202010162783.9A 2020-03-10 2020-03-10 Research and development system and method for block chain Active CN113377862B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010162783.9A CN113377862B (en) 2020-03-10 2020-03-10 Research and development system and method for block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010162783.9A CN113377862B (en) 2020-03-10 2020-03-10 Research and development system and method for block chain

Publications (2)

Publication Number Publication Date
CN113377862A CN113377862A (en) 2021-09-10
CN113377862B true CN113377862B (en) 2024-04-02

Family

ID=77568850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010162783.9A Active CN113377862B (en) 2020-03-10 2020-03-10 Research and development system and method for block chain

Country Status (1)

Country Link
CN (1) CN113377862B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109033422A (en) * 2018-08-08 2018-12-18 云南天之游科技股份有限公司 A kind of method, apparatus and block chain generating block chain
CN109447805A (en) * 2018-10-18 2019-03-08 尚维斯 A method of dissolving new chain block group new block chain automatically

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11030161B2 (en) * 2018-03-28 2021-06-08 Exosite LLC Blockchain scaling method and blockchain scaling apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109033422A (en) * 2018-08-08 2018-12-18 云南天之游科技股份有限公司 A kind of method, apparatus and block chain generating block chain
CN109447805A (en) * 2018-10-18 2019-03-08 尚维斯 A method of dissolving new chain block group new block chain automatically

Also Published As

Publication number Publication date
CN113377862A (en) 2021-09-10

Similar Documents

Publication Publication Date Title
US10572370B2 (en) Test-assisted application programming interface (API) learning
US20080127303A1 (en) Generating security validation code automatically
Pientka et al. Inductive beluga: Programming proofs
CN106462425A (en) Complex constants
US8707259B2 (en) Framework for open dynamic reflective applications
CN109597618B (en) Program development method, program development device, computer device, and storage medium
US20220383222A1 (en) Anonymous distributed consensus regarding the verification of protocols
Tassi Deriving proved equality tests in Coq-elpi: Stronger induction principles for containers in Coq
CN111563040B (en) Block chain intelligent contract code testing method and device
Reynolds et al. Datatypes with shared selectors
Camilli et al. Formal specification and verification of decentralized self-adaptive systems using symmetric nets
Niemetz et al. Bitwuzla
CN113377862B (en) Research and development system and method for block chain
Elsayed et al. Reverse engineering approach for improving the quality of mobile applications
CN111143463B (en) Construction method and device of bank data warehouse based on topic model
Miculan Developing (meta) theory of λ-calculus in the theory of contexts
WO2021086704A1 (en) Rules generation using learned repetitive code edits
US8689327B2 (en) Method for characterization of a computer program part
Lillibridge Unchecked exceptions can be strictly more powerful than call/cc
Murawski et al. A contextual equivalence checker for IMJ
Soleimanifard et al. Algorithmic verification of procedural programs in the presence of code variability
US8250589B2 (en) Method for simplifying interfaces having dynamic libraries
Varming et al. Higher-order separation logic in Isabelle/HOLCF
Losavio et al. Unified process for domain analysis integrating quality, aspects and goals
Brune Towards an enterprise-ready implementation of artificial intelligence-enabled, blockchain-based smart contracts

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