CN111161070A - Alliance chain optimization method and device based on Ether house - Google Patents

Alliance chain optimization method and device based on Ether house Download PDF

Info

Publication number
CN111161070A
CN111161070A CN201911391482.7A CN201911391482A CN111161070A CN 111161070 A CN111161070 A CN 111161070A CN 201911391482 A CN201911391482 A CN 201911391482A CN 111161070 A CN111161070 A CN 111161070A
Authority
CN
China
Prior art keywords
transaction
transaction data
processing logic
gas
data
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
CN201911391482.7A
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.)
Aspire Digital Technologies Shenzhen Co Ltd
Original Assignee
Aspire Digital Technologies 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 Aspire Digital Technologies Shenzhen Co Ltd filed Critical Aspire Digital Technologies Shenzhen Co Ltd
Priority to CN201911391482.7A priority Critical patent/CN111161070A/en
Publication of CN111161070A publication Critical patent/CN111161070A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

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

Abstract

The invention discloses a alliance chain optimization method and device based on Ether houses. The method comprises the steps of receiving transaction data, judging whether the transaction data are legal or not, removing gas processing logic of the transaction data if the transaction data are legal, submitting the transaction data to a transaction pool, carrying out transaction maintenance on the transaction data in the transaction pool, extracting the transaction data and carrying out block uplink of the transaction data according to a consensus mechanism. By adding the transaction data into the transaction pool, the gas processing logic of the transaction data is removed, so that the complexity of alliance chain transaction is reduced, and the transaction performance and the success rate of transaction data processing are improved. The method can be widely applied to the field of alliance chain transaction.

Description

Alliance chain optimization method and device based on Ether house
Technical Field
The invention relates to the field of block chains, in particular to an Ethernet-based alliance chain optimization method and device.
Background
The Etherhouse introduces the intelligent contracts into the blockchain, opens the application of the blockchain outside the currency field, and accordingly opens the blockchain 2.0 era. When the block chain technology is adopted in the application field, a alliance chain mode is mainly adopted. The alliance chain is that only aiming at members of a certain specific group and limited third parties, a plurality of preselected nodes are designated as bookers inside, the generation of each block is determined by all the preselected nodes together, other access nodes can participate in transactions, but the billing process is not asked, and other third parties can carry out limited query through an API opened by the block chain. The alliance chain service can be realized by deploying EtherFang software (including installing geth program, creating node account, generating created block file, connecting files among several nodes and the like) on the alliance member computing nodes, deploying intelligent contracts related to the service, and finally starting a mining mechanism of mining nodes.
Since the advent of EtherFang, the method is mainly used for public chains, and an excitation mechanism is needed for mining nodes, so that related mechanisms such as Ethermoney and gas are introduced. However, in this case, the complexity of the system increases and the transaction performance of the system decreases in the entire process of processing the transaction by each node. Therefore, it is necessary to provide a federation chain transaction optimization method capable of reducing the complexity of federation chain transactions and improving transaction performance.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides an Ethengfang-based alliance chain optimization method, which can reduce alliance chain transaction complexity and improve transaction performance.
In a first aspect, an embodiment of the present invention provides: a alliance chain optimization method based on Ether Fang is used for alliance chain nodes and comprises the following steps:
receiving transaction data;
judging whether the transaction data is legal or not, if so, removing gas processing logic of the transaction data, and then submitting the transaction data to a transaction pool;
transaction maintenance is carried out on transaction data in the transaction pool;
and extracting the transaction data and performing uplink of the transaction data block according to a consensus mechanism.
Further, the process of removing the gas processing logic of the transaction data specifically includes one or more of the following:
processing logic to remove the transaction data regarding the transaction amount;
processing logic to remove transaction gas caps and/or block gas caps from the transaction data;
processing logic to remove the transaction data regarding a minimum gas price;
processing logic to remove the transaction data regarding whether the current account balance is insufficient;
processing logic to remove the amount of gas required for transaction execution from the transaction data;
processing logic in the transaction data is removed as to whether the transaction gas is sufficient to execute.
Further, the transaction data is directly rejected when the transaction pool space is full.
Further, submitting the transaction data to a transaction pool specifically includes: and submitting the transaction data to a queue, and directly replacing the transaction data when the transaction data is required to be replaced.
Further, the transaction maintenance of the transaction data in the transaction pool specifically includes:
reserving transaction data with insufficient balance;
and/or deleting the transaction data with earlier time when the serial numbers of the two transaction data are repeated.
Further, the transaction data includes: current node user initiated transaction data and/or broadcast received transaction data.
In a second aspect, an embodiment of the present invention provides: an EtherFang-based federation chain optimization apparatus, comprising:
a receiving module: for receiving transaction data;
a transaction submission module: the gas processing logic is used for judging whether the transaction data is legal or not, removing the transaction data if the transaction data is legal, and then submitting the transaction data to a transaction pool;
a transaction maintenance module: the transaction pool is used for carrying out transaction maintenance on transaction data in the transaction pool;
block uplink module: for extracting the transaction data and performing uplink of the transaction data block according to a consensus mechanism.
Further, the process of removing the gas processing logic of the transaction data specifically includes one or more of the following:
processing logic to remove the transaction data regarding the transaction amount;
processing logic to remove transaction gas caps and/or block gas caps from the transaction data;
processing logic to remove the transaction data regarding a minimum gas price;
processing logic to remove the transaction data regarding whether the current account balance is insufficient;
processing logic to remove the amount of gas required for transaction execution from the transaction data;
processing logic in the transaction data is removed as to whether the transaction gas is sufficient to execute.
In a third aspect, the present invention provides an ethernet-based alliance chain optimization device, which includes:
at least one processor, and a memory communicatively coupled to the at least one processor;
wherein the processor is adapted to perform the method of any of the first aspects by invoking a computer program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any of the first aspects.
The invention has the beneficial effects that:
the invention judges whether the transaction data is legal or not by receiving the transaction data, removes the gas processing logic of the transaction data if the transaction data is legal, submits the transaction data to a transaction pool, carries out transaction maintenance on the transaction data in the transaction pool, extracts the transaction data and carries out block uplink of the transaction data according to a common identification mechanism. By adding the transaction data into the transaction pool, the gas processing logic of the transaction data is removed, so that the complexity of alliance chain transaction is reduced, and the transaction performance and the success rate of transaction data processing are improved.
The method can be widely applied to the field of alliance chain transaction.
Drawings
FIG. 1 is a flowchart illustrating an EtherFang-based federation chain optimization method according to an embodiment of the present invention;
fig. 2 is a block diagram of an embodiment of an ethernet-based federation chain optimization apparatus according to the present invention.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
The first embodiment is as follows:
the alliance chain is an alliance block chain, the block chain is managed by a plurality of organizations or organizations, and for the alliance chain, whether a new block can be uplinked or not can be determined as long as a plurality of nodes with higher weights are determined, so that the transaction processing time is reduced. In addition, each node in the alliance chain has a private key belonging to the node, data information generated by each node is only known by the node, and if information exchange and data communication are needed between the nodes, the private key of the node of the other side needs to be known, so that information circulation can be guaranteed, and the problem of node privacy disclosure is solved. Compared with the private chain, the information on the federation chain is not accessible by all persons with access conditions, and only the nodes on the federation chain can perform activities such as reading modification and access.
Therefore, each member in the alliance chain has natural motivation to deploy its own node to ensure data security, and the alliance chain members are both users of the system and providers of the system nodes. Therefore, in the embodiment, the alliance chain transaction process is optimized, the transaction data are added into the transaction pool process, the gas processing logic is optimized, the gas processing logic of the transaction data is removed, the alliance chain transaction complexity is reduced, and the transaction performance and the transaction data processing success rate are improved.
An embodiment of the present invention provides a federation chain optimization method based on etherhouses, and fig. 1 is a flowchart of the federation chain optimization method based on etherhouses according to the embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
s1: receiving transaction data, wherein the transaction data comprises: the current node user initiated transaction data and/or other node broadcast received transaction data.
S2: and judging whether the transaction data is legal, if so, removing the gas processing logic of the transaction data, and then submitting the transaction data to a transaction pool.
The optional embodiment judges whether the transaction is legal according to the intelligent contract or the consensus mechanism, and the multiple users in the alliance chain participate in making and automatically obeying the execution of the intelligent contract.
S3: and carrying out transaction maintenance on the transaction data in the transaction pool.
S4: the transaction data is extracted and the block uplink of the transaction data is performed according to the common identification mechanism, and the block uplink process is the existing block uplink process, so the description is omitted here.
Specifically, in step S2, the processing logic related to gas is removed from the transaction data correctness verification function (e.g., pool. validatetx), while the original logic such as signature verification is retained, without destroying the security of the original implementation logic, where the process of the processing logic for gas of transaction data specifically includes one or more of the following (the function in the following is derived from the published etherhouse source code):
1) processing logic for removing transaction amount from the transaction data.
Optionally, the processing logic related to the transaction amount in the transaction data is removed by using the pool.
2) Processing logic for removing the transaction gas cap and/or block gas cap from the transaction data.
Optionally, the processing logic for removing the transaction gas cap using pool, currentmaxgas () and/or the processing logic for removing the block gas cap using tx.
3) Processing logic in the transaction data regarding the minimum gas price is removed.
Gasridge () is used to remove the processing logic about the minimum gas price in the transaction data, i.e. the minimum gas price is not judged.
4) Processing logic is removed from the transaction data regarding whether the current account balance is insufficient.
Optionally, the processing logic of the transaction data about whether the current account balance is insufficient is removed by using pool.
5) Processing logic is provided for removing the amount of gas required for transaction execution from the transaction data.
Optionally, the processing logic of the transaction data regarding the number of gas required for transaction execution is removed by using IntrinsicGas (), i.e. how many gas numbers are required for transaction execution is not calculated.
6) Processing logic in the transaction data is removed as to whether the transaction gas is sufficiently executed.
Optionally, processing logic in the transaction data regarding whether the transaction gas is executed sufficiently is removed using tx.gas (), i.e., whether the transaction gas is executed sufficiently is not determined.
Further, in step S2, submitting the transaction data to the transaction pool specifically includes: and when the transaction data is required to be replaced, the league chain does not need an excitation mechanism, so that the size of gas of new and old transaction data can be directly replaced without judging, and the transaction complexity is reduced.
Further, when the transaction data is added to the queue list or pending waiting list in the transaction pool function pool.
Optionally, the upper limit transaction data number fields submitted to the queue queuing list in the transaction pool or replaced to the pending waiting list are pool.
Further, in step S3, the transaction maintenance of the transaction data in the transaction pool specifically includes:
the transaction data with insufficient balance is reserved, optionally, the transaction balance is judged by using a pool current state getbank (addr) function, but the transaction data with insufficient balance is not deleted in the embodiment.
And/or deleting the transaction data with earlier time when the serial numbers of the two transaction data are repeated. For example, in the transaction pool transaction upgrading function pool, if the transaction data sequence number (nonce) is repeated, the size of the gas price of the new and old transaction data is not determined, and the old transaction data with earlier time is directly deleted and then the transaction data with later time is added.
In the embodiment, the transaction data is added into the transaction pool, and the gas processing logic of the transaction data is removed, so that the complexity of alliance chain transaction is reduced, and the transaction performance and the success rate of transaction data processing are improved.
Example two:
the present embodiment provides an ethernet workshop-based alliance chain optimization device, as shown in fig. 2, which is a block diagram of the ethernet workshop-based alliance chain optimization device of the present embodiment, and the block diagram includes:
the receiving module 100: for receiving transaction data;
the transaction submission module 200: the gas processing logic is used for judging whether the transaction data is legal or not, removing the transaction data if the transaction data is legal, and then submitting the transaction data to a transaction pool;
the transaction maintenance module 300: the system is used for carrying out transaction maintenance on transaction data in the transaction pool;
block uplink module 400: used for extracting transaction data and performing uplink of transaction data blocks according to a consensus mechanism.
Further, the process of removing the gas processing logic of the transaction data specifically includes one or more of the following:
processing logic to remove transaction data regarding the transaction amount;
processing logic for removing transaction gas caps and/or block gas caps from the transaction data;
removing processing logic in the transaction data regarding the minimum gas price;
removing processing logic in the transaction data regarding whether the current account balance is insufficient;
processing logic to remove the amount of gas required for transaction execution from the transaction data;
processing logic in the transaction data is removed as to whether the transaction gas is sufficiently executed.
The specific details of the league optimization device module based on etherhouses are described in detail in the corresponding league optimization method based on etherhouses in the embodiment, and therefore are not described herein again.
In addition, the invention also provides alliance chain optimization equipment based on the Ether house, which comprises the following steps:
at least one processor, and a memory communicatively coupled to the at least one processor;
wherein the processor is configured to perform the method according to embodiment one by calling the computer program stored in the memory. A computer program, that is, a program code, configured to cause an etherhouse-based federation chain optimization device to perform the steps in the etherhouse-based federation chain optimization method described in the previous section of this specification when the program code runs on the etherhouse-based federation chain optimization device.
In addition, the present invention also provides a computer-readable storage medium, which stores computer-executable instructions for causing a computer to perform the method according to the first embodiment.
The invention judges whether the transaction data is legal or not by receiving the transaction data, removes the gas processing logic of the transaction data if the transaction data is legal, submits the transaction data to a transaction pool, carries out transaction maintenance on the transaction data in the transaction pool, extracts the transaction data and carries out block uplink of the transaction data according to a common identification mechanism. By adding the transaction data into the transaction pool, the gas processing logic of the transaction data is removed, so that the complexity of alliance chain transaction is reduced, and the transaction performance and the success rate of transaction data processing are improved. The method can be widely applied to the field of alliance chain transaction.
The above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same, although the present invention is described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.

Claims (10)

1. A alliance chain optimization method based on Ether Fang is used for alliance chain nodes and is characterized by comprising the following steps:
receiving transaction data;
judging whether the transaction data is legal or not, if so, removing gas processing logic of the transaction data, and then submitting the transaction data to a transaction pool;
transaction maintenance is carried out on transaction data in the transaction pool;
and extracting the transaction data and performing uplink of the transaction data block according to a consensus mechanism.
2. The EtherFang-based federation chain optimization method of claim 1, wherein the process of removing the gas processing logic of the transactional data specifically comprises one or more of:
processing logic to remove the transaction data regarding the transaction amount;
processing logic to remove transaction gas caps and/or block gas caps from the transaction data;
processing logic to remove the transaction data regarding a minimum gas price;
processing logic to remove the transaction data regarding whether the current account balance is insufficient;
processing logic to remove the amount of gas required for transaction execution from the transaction data;
processing logic in the transaction data is removed as to whether the transaction gas is sufficient to execute.
3. The Etherhouse-based federation chain optimization method of claim 1, wherein the transaction data is directly rejected after the transaction pool space is full.
4. The Etherhouse-based federation chain optimization method of claim 1, wherein submitting the transactional data to a transaction pool specifically comprises: and submitting the transaction data to a queue, and directly replacing the transaction data when the transaction data is required to be replaced.
5. The EtherFang-based alliance chain optimization method of claim 1, wherein the transaction maintenance of the transaction data in the transaction pool specifically comprises:
reserving transaction data with insufficient balance;
and/or deleting the transaction data with earlier time when the serial numbers of the two transaction data are repeated.
6. The Etherhouse-based federation chain optimization method of any one of claims 1 to 5, wherein the transactional data comprises: current node user initiated transaction data and/or broadcast received transaction data.
7. A alliance chain optimizing device based on ether mill, its characterized in that includes:
a receiving module: for receiving transaction data;
a transaction submission module: the gas processing logic is used for judging whether the transaction data is legal or not, removing the transaction data if the transaction data is legal, and then submitting the transaction data to a transaction pool;
a transaction maintenance module: the transaction pool is used for carrying out transaction maintenance on transaction data in the transaction pool;
block uplink module: for extracting the transaction data and performing uplink of the transaction data block according to a consensus mechanism.
8. The EtherFang-based federation chain optimization apparatus of claim 7, wherein the process of removing the gas processing logic of the transaction data specifically includes one or more of:
processing logic to remove the transaction data regarding the transaction amount;
processing logic to remove transaction gas caps and/or block gas caps from the transaction data;
processing logic to remove the transaction data regarding a minimum gas price;
processing logic to remove the transaction data regarding whether the current account balance is insufficient;
processing logic to remove the amount of gas required for transaction execution from the transaction data;
processing logic in the transaction data is removed as to whether the transaction gas is sufficient to execute.
9. An EtherFang-based federation chain optimization apparatus, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the processor is adapted to perform the method of any one of claims 1 to 6 by invoking a computer program stored in the memory.
10. A computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any one of claims 1 to 6.
CN201911391482.7A 2019-12-30 2019-12-30 Alliance chain optimization method and device based on Ether house Pending CN111161070A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911391482.7A CN111161070A (en) 2019-12-30 2019-12-30 Alliance chain optimization method and device based on Ether house

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911391482.7A CN111161070A (en) 2019-12-30 2019-12-30 Alliance chain optimization method and device based on Ether house

Publications (1)

Publication Number Publication Date
CN111161070A true CN111161070A (en) 2020-05-15

Family

ID=70558909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911391482.7A Pending CN111161070A (en) 2019-12-30 2019-12-30 Alliance chain optimization method and device based on Ether house

Country Status (1)

Country Link
CN (1) CN111161070A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114119242A (en) * 2022-01-28 2022-03-01 浙商银行股份有限公司 Alliance link performance optimization method and device based on self-adaptive window fragmentation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109409885A (en) * 2018-10-29 2019-03-01 深圳声笑科技有限公司 Across chain method of commerce, device and storage medium on block chain
CN109995850A (en) * 2019-03-05 2019-07-09 深圳前海微众银行股份有限公司 A kind of transaction processing method of block catenary system and block catenary system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109409885A (en) * 2018-10-29 2019-03-01 深圳声笑科技有限公司 Across chain method of commerce, device and storage medium on block chain
CN109995850A (en) * 2019-03-05 2019-07-09 深圳前海微众银行股份有限公司 A kind of transaction processing method of block catenary system and block catenary system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114119242A (en) * 2022-01-28 2022-03-01 浙商银行股份有限公司 Alliance link performance optimization method and device based on self-adaptive window fragmentation

Similar Documents

Publication Publication Date Title
CN108846659B (en) Block chain-based transfer method and device and storage medium
CN107368259B (en) Method and device for writing service data into block chain system
CN109146490B (en) Block generation method, device and system
KR101876674B1 (en) Method of managing common account using block chain and system performing the same
CN110310205A (en) A kind of block chain data monitoring method, device, equipment and medium
CN105913233A (en) SDK processing method suitable for application client end payment
CN109493043A (en) The blocking method, apparatus of transaction record, electronic equipment and storage medium
CN112866282B (en) Method and device for verifying time information in block chain
LU102556B1 (en) Blockchain-enhanced open internet of things access architecture
CN109743182B (en) Intelligent contract approval method and system based on block chain
CN112559635B (en) Service processing method, device, equipment and medium for Ethernet alliance chain node
CN110400217A (en) The regular changing process method and device of intelligent contract
CN110428238A (en) The account cancelling method and system of block chain
CN107528912A (en) A kind of automatic method, system and relevant apparatus for realizing distributing real time system
CN110138767A (en) Processing method, device, equipment and the storage medium of transactions requests
CN114240657A (en) Data processing method, block chain, terminal device and storage medium
CN109766316A (en) File acquisition method, device, computer equipment and storage medium
CN108961034A (en) System and method, storage medium based on user behavior certification
CN112699136B (en) Cross-link certificate storage method and related device
CN111161070A (en) Alliance chain optimization method and device based on Ether house
CN110070360A (en) A kind of transactions requests processing method, device, equipment and storage medium
US20200235935A1 (en) Data access control for edge devices using a cryptographic hash
CN111047444A (en) Data transaction method and device based on block chain network
EP4365808A1 (en) Data verification method and apparatus
CN108052842B (en) Signature data storage and verification method and device

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