CN113988856A - Block header propagation method and storage medium - Google Patents

Block header propagation method and storage medium Download PDF

Info

Publication number
CN113988856A
CN113988856A CN202111313631.5A CN202111313631A CN113988856A CN 113988856 A CN113988856 A CN 113988856A CN 202111313631 A CN202111313631 A CN 202111313631A CN 113988856 A CN113988856 A CN 113988856A
Authority
CN
China
Prior art keywords
block
data
height
payee
payer
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
CN202111313631.5A
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.)
Fujian Boquan Hashi Technology Co ltd
Original Assignee
Fujian Boquan Hashi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Boquan Hashi Technology Co ltd filed Critical Fujian Boquan Hashi Technology Co ltd
Priority to CN202111313631.5A priority Critical patent/CN113988856A/en
Publication of CN113988856A publication Critical patent/CN113988856A/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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • 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
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present application relates to the field of block chaining technologies, and in particular, to a block header propagation method and a storage medium. The method comprises the following steps: establishing point-to-point connection between the payer and the payee; the payee sends information capable of judging the initial value of the block height and a payment transaction template to the payer; if the latest block height which can be calculated by the local information of the payer is larger than the block height initial value, block head data between the block height initial value and the local latest block height are sent to the payee together with the corresponding data of the payment transaction template; the payee verifies whether the block header data is correct according to the received data; if the block head data is verified correctly, the payee updates the block head data. The method and the device can realize bidirectional block header data synchronization between two light nodes, reduce interaction and dependence of all nodes for storing block chain full accounts, simultaneously support offline equipment to synchronize block header data, and have more flexible application scenes.

Description

Block header propagation method and storage medium
Technical Field
The present application relates to the field of block chaining technologies, and in particular, to a block header propagation method and a storage medium.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The block chain technology can be understood as a distributed account book technology, is an internet database technology, and is characterized by mediation and public transparency, so that everyone can participate in database recording.
The block height is an identifier of the block, and the block has two identifiers, namely a hash value of the block head and the block height. The hash value of the block header is a number obtained by performing a double hash calculation on the block header by the SHA256 algorithm. The chunk hash value may uniquely and unambiguously identify a chunk, and any node may independently obtain the chunk hash value by simply hashing the chunk header. Block height refers to the position of the block in the block chain.
The SPV Node, also called a "light Node" or a "user Node," only stores information such as public and private keys, block headers, merkel paths, and unconsumed output sets related to a user, and has a certain capability of constructing and forwarding transactions. Meanwhile, in order to quickly check the validity of the received transaction without participation of all nodes, the SPV node needs to locally store and update the block header data of the entire block chain. Taking bitcoin as an example, each chunk header is composed of an 80-byte data structure containing a version number, a parent chunk header hash value, a mercker root, a timestamp, a difficulty target, and a Nonce value. The block header formats of different block chains may differ. According to the example of the generation mechanism of the bitcoin blockchain, on average, one block is generated every 10 minutes, and only about 4.2M-sized blockhead data is generated in one year, so that the SPV node locally stores the blockhead data of the whole blockchain and does not occupy too much storage. The block header data may also be used in conjunction with other information to verify whether the transaction is contained in the ledger.
Therefore, how to update the block header to the terminals of all SPV nodes in real time is an important problem, and the existing method is that all SPV nodes apply for block header data to all nodes at intervals and update the block header data, or wait for the connected peer to actively send block header update information. However, this method has several problems: first, some SPV devices are not networked or are expensive to network, such as: the smart card with the payment function, the street lamp with the payment function and the like cannot be connected with all nodes to timely update the block header data in real time. Second, all SPV node devices request the block header from the full node, which may greatly occupy the bandwidth, resources, etc. of the full node, resulting in low efficiency.
Therefore, how to implement efficient and convenient distribution and management of the block header data becomes one of the important research points in the block chain industry.
Disclosure of Invention
One of the objectives of the present invention is to overcome the above disadvantages and provide a block header transmission method, which triggers a block header update action when a payee and a payer pay for a transaction, verifies the block header by using information such as workload certification in the block header, and verifies received transaction data through the block header, so as to synchronize the block header data among SPVs, effectively reduce the dependence of the SPVs on all nodes, and improve the efficiency of synchronous update of the block header data.
In order to solve the above technical problem, the present invention provides a block header propagation method, including the following steps:
s1, point-to-point connection is established between the payer and the payee;
s2, the payee sends the block height request parameter and the payment transaction template to the payer;
s3, the payer obtains the block height initial value according to the block height request parameter;
s4, the payer judges whether the local latest block height is larger than the block height initial value;
s5, if the local latest block height of the payer is larger than the block height initial value, sending the block head data between the block height initial value and the local latest block height in the local block head, the corresponding transaction data of the payment transaction template, the Mercker path of the transaction data and the block height of the Mercker path to the payee;
and S6, the payee verifies whether the block header data is correct.
According to the technical scheme, the payee sends block header data request information to the payer while paying for the transaction, the payer sends required block header data and transaction data to the payee, and the payee performs block header data verification according to the transaction data and updates the block header data to the local block header data. The method can realize the synchronization of the block head data between any two nodes on the block chain network, particularly the synchronization of the block head data between two light nodes, and reduces the interaction and the dependence with the whole nodes.
Further, the payer is a blockchain full node or a blockchain light node, and the payee is a blockchain full node or a blockchain light node.
Further, a point-to-point connection is established between the payer and the payee, and the specific form is as follows: based on an internet connection, based on a short-range communication connection or based on a local area network connection.
According to the technical scheme, the payer and the payee can be connected in any point-to-point mode to synchronize the block head data, any one of two transaction parties or the block chain network is not needed to be accessed, the application scene is more flexible, and the method is particularly suitable for the payment transaction scene of the off-line intelligent equipment.
Further, the block height request parameter is a block height value or a block hash value.
Further, the payee verifies whether the block header data is correct, and the method comprises the following steps:
s61, verifying the Mercker root of the Mercker tree where the transaction data are according to the transaction data and the Mercker certification information whether the Mercker root is contained by the corresponding block header;
s62, if the Mercker root of the block where the transaction data is located is correct, judging whether the block head where the transaction data is located is correct according to the information in the block head where the transaction data is located, and if not, executing the step S66;
s63, if the block header of the transaction data is correct, verifying whether the previous block header is correct according to the hash of the previous block in the block header, if so, executing the step S64, otherwise, executing the step S66;
s64, repeating the step S63 until the block head verification corresponding to the height of the local newest block of the payee in the block head data is completed;
s65, judging that the block header data is correct;
and S66, judging that the block header data is not correct.
According to the technical scheme, the payee can directly verify the correctness of the block head data according to the received corresponding data of the payment transaction template, on one hand, the block head data can be guaranteed not to be falsified, on the other hand, verification through the whole nodes of the block chain is also avoided, and dependence on the whole nodes is reduced.
Further, the block header propagation method further includes the following steps:
s7, if the block head data is verified correctly, the payee further judges whether the information of the block head corresponding to the height of the latest local block of the payee and the information of the block head of the height of the latest local block of the payee in the block head data are the same;
s8, if the data are the same, the payee updates the block head data between the local highest block height of the payee and the block head height of the transaction data to the local block head data, and stores the block head data between the block head height of the transaction data and the local latest block height of the payer to the local;
and S9, if not, the payee saves the block header data to the local.
Further, the block header propagation method further includes the following steps:
s10, if the local latest block height of the payer is less than or equal to the starting value of the block height, the payer returns a block height request parameter to the payee; the block height request parameter is a block height value or a block hash value;
s11, the payee calculates the initial value of the block height in the local block head according to the block height request parameter, and sends the data of the block head between the initial value of the block height and the local latest block height to the payer;
s12, the payer updates the block header data to the local block header data.
According to the technical scheme, synchronous updating of the bidirectional block header data between the payer and the payee is supported, the applicable scene is more flexible, and the synchronization efficiency is higher.
Accordingly, the present application also provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of any of the above.
Different from the prior art, the technical scheme of the invention has the following beneficial effects:
1. the method comprises the steps that a payee sends block header data request information to a payer while paying for a transaction, the payer sends required block header data and transaction data to the payee together, and the payee performs block header data verification according to the transaction data and updates the block header data into local block header data. The method can realize the synchronization of the block head data between any two nodes on the block chain network, particularly the synchronization of the block head data between two light nodes, and reduces the interaction and the dependence with the whole nodes.
2. According to the technical scheme, the payer and the payee can be connected in any point-to-point mode to synchronize the block head data, any party B in two transaction parties or a block chain network is not needed to be accessed at the same time, the application scene is more flexible, and the method is particularly suitable for the payment transaction scene of off-line intelligent equipment.
3. The payee can directly verify the correctness of the block head data according to the received corresponding data of the payment transaction template, on one hand, the block head data can be ensured not to be falsified, on the other hand, verification through a block chain full node is also avoided, and dependence on the full node is reduced.
4. Meanwhile, the synchronous updating of the bidirectional block header data between the payer and the payee is supported, the applicable scene is more flexible, and the synchronization efficiency is higher.
Drawings
FIG. 1 is a flow chart of the block header propagation method of the present invention.
Fig. 2 is a schematic flow chart of verifying whether the block header data is correct by the payee according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, it is a flow chart of the block header propagation method of the present invention, which includes the following steps:
and S1, establishing point-to-point connection between the payer and the payee.
The technical scheme of the application is that synchronous block header data is simultaneously initiated when a transaction is carried out between a payer and a payee, a communication channel needs to be established between the payer and the payee, and payment amount is negotiated. Here, the payer may be a blockchain full node or a blockchain light node, and the payee may also be a blockchain full node or a blockchain light node. The scheme is mainly suitable for the following scenes: updating block header data when payment is carried out between the payer SPV node and the payee SPV node, wherein the simple payment model means that a communication channel is established between the payer and the payee, the payee sends a transaction template to the payer, the payer completes the transaction template and sends the transaction template with a signature to the payee, and the payee broadcasts the payment model to the block chain full nodes. In the scene, the block header data is transmitted between the SPV node of the payee and the SPV node of the payer without participation of all the nodes, so that the interaction between the SPV and all the nodes is greatly reduced. Of course, the scheme of the application is also suitable for updating the block header data when the SPV is transacted with the full node and the full node.
In a preferred embodiment, the payer and the payee establish a point-to-point connection, in the following specific form: based on an internet connection, based on a short-range communication connection or based on a local area network connection. The short-distance communication connection includes but is not limited to common communication modes such as WiFi, Bluetooth, NFC, ZigBee and the like. The payer and the payee can be connected in any point-to-point mode to synchronize the data of the block heads, and both transaction parties are not required to be on a block chain network, so that the application scene is more flexible, and the method is particularly suitable for the payment transaction scene of off-line intelligent equipment.
S2, the payee sends the block height request parameter and the payment transaction template to the payer.
In an embodiment, the block height request parameter may be data that can determine a unique number of a certain block header, and may be other information that can determine the block height, such as a block height value, a block hash value, or a mercker root value in the block header, through which a uniquely corresponding block header in the block chain can be located. The payee may provide the corresponding request parameter according to the required block height, which may be the local latest block height or smaller than the local latest block height.
In addition, the payment transaction template refers to a data structure in which a payee constructs a transaction output and a payer fills in a transaction input and signs, and is used for a method of transmitting payment information used in payment after the payee establishes a communication path with the payer.
S3, the payer obtains the starting value of the block height according to the block height request parameter. And the paying party positions the corresponding block head unique number in the block chain according to the block height request parameter.
S4, the payer judges whether the local latest block height is larger than the block height initial value.
S5, if the local latest block height of the payer is larger than the block height initial value, sending the block head data between the block height initial value and the local latest block height in the local block head, the corresponding transaction data of the payment transaction template, the Mercker path of the transaction data and the block height of the Mercker path to the payee together.
In a preferred embodiment, the corresponding data of the payment transaction template comprises: complete transaction data of all input transactions, the Mercker path and the block height of the Mercker path. The Mercker path is an authentication path from a specific transaction in a block to a root of the Mercker tree, and the Mercker tree is a hash binary tree, and each node is obtained by hash calculation of a lower node, so that the Mercker path can be used for proving the existence of a specific transaction in tens of millions of transactions in a block with a large number of bytes in a specific block of a block chain account book.
S6, the payee verifies whether the block header data is correct according to the received transaction data corresponding to the payment transaction template. As shown in fig. 2, it is a schematic flow chart of verifying whether the block header data is correct by the payee of the present invention, and the method includes the following steps:
s61, verifying the Mercker root of the Mercker tree where the transaction data are according to the transaction data and the Mercker certification information whether the Mercker root is contained by the corresponding block header;
s62, if the Mercker root of the block where the transaction data are located is correct, judging whether the block head where the transaction data are located is correct according to the Mercker root, the difficulty, the nonce and the like in the block head where the transaction data are located, and if not, executing the step S66; the block header is a data structure shown in the following table, where the merkel root occupies 32 bytes, and the specific verification method is: and hashing the block head to obtain a block head hash value, comparing the block head hash value with the difficulty target, and judging whether the hash value meets the difficulty target. For example: the difficulty target requires that the chunk header hash has 5 0 s, and if the chunk header hash calculated by the user has only 20 s, the chunk header is considered to be wrong.
Size and breadth Field(s)
4 bytes Version(s)
32 bytes Parent block hashingValue of
32 bytes Merkle root of Merkle
4 bytes Time stamp
4 bytes Difficulty target
4 bytes Nonce
S63, if the block header of the transaction data is correct, verifying whether the previous block header is correct according to the hash of the previous block in the block header, if so, executing the step S64, otherwise, executing the step S66;
s64, repeating the step S63 until the block head verification corresponding to the height of the local newest block of the payee in the block head data is completed;
s65, judging that the block header data is correct;
and S66, judging that the block header data is not correct.
In the scheme of the application, the payee verifies the correctness of the block head data according to the received corresponding data of the payment transaction template, on one hand, the block head data can be ensured not to be falsified, on the other hand, verification through the whole nodes of the block chain is also avoided, and dependence on the whole nodes is reduced.
In a preferred embodiment, the block header propagation method further includes the following steps:
s7, if the block head data is verified correctly, the payee further judges whether the information of the block head corresponding to the height of the latest local block of the payee and the information of the block head of the height of the latest local block of the payee in the block head data are the same;
and S8, if the data are the same, the payee updates the block head data between the local highest block height of the payee and the block head height of the transaction data to the local block head data, and stores the block head data between the block head height of the transaction data and the local latest block height of the payer to the local. In this step, the payee updates only the verified and correct block header in the received block header data to the local block header data, because the partial block header data can ensure that the partial block header data is not tampered illegally. And the block head which can not be verified correctly in the block head data is stored to the local, so that repeated transmission can be avoided when the block head data is updated next time, and the data transmission quantity is reduced.
And S9, if not, the payee saves the block header data to the local. Similarly, if the information of the block head corresponding to the local latest block height of the payee and the block head of the local latest block height of the payee in the block head data is different, the block head data can also be stored locally, and repeated transmission can not be performed when the block head data is updated next time, so that the data transmission amount is reduced.
In another preferred embodiment, the block header transmission method of the present application further includes the following steps:
and S10, if the local latest block height of the payer is less than or equal to the block height initial value, the payer returns a block height request parameter to the payee, wherein the block height request parameter is a block height value or a block hash value. S11, the payee calculates the initial value of the block height according to the block height request parameter, and sends the data of the block head between the initial value of the block height and the local latest block height to the payer. S12, the payer updates the block header data to the local block header data. By the mode, the scheme can simultaneously support synchronous updating of the bidirectional block header data between the payer and the payee, the applicable scene is more flexible, and the synchronization efficiency is higher.
The application provides a method for synchronously updating block header data by a block link point, which mainly comprises the following steps: when the payee pays with the payer, the payee provides the payee with the block height of the block header and the transaction template to be updated. The payer compares the height of the payee with the height of the local block, and determines whether to transmit the head of the block required by the payee to the payee. The payer sends the transaction template, the complete transaction data of all transaction inputs, the Mercker path of the transaction inputs, and the block number required by the payee to the payee. The payee carries out local verification on the transaction sent by the payer and updates the local block header according to the verification result. The method can realize the synchronization of the block head data between any two nodes on the block chain network, particularly the synchronization of the block head data between two light nodes, and reduces the interaction and the dependence with the whole nodes.
In another embodiment, the present application provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of any of the embodiments described above.
Example (b):
taking the update of the block header data when the simple payment is performed between the payer SPV node and the payee SPV node as an example, assuming that the latest height 120 of the current payer SPV block header and the latest height 105 of the current payee SPV block header, the block header propagation method of the present application is adopted with the steps of:
and S1, the payer SPV node and the payee SPV node establish point-to-point connection through a Bluetooth protocol.
S2, the receiving side SPV node sends the chunk hash value corresponding to the chunk with height of 100 and the payment transaction template to the paying side SPV node.
S3, the payer calculates the starting value of the block height as 100 according to the block hash value.
S4, the payer determines whether the local latest tile height 120 is greater than the starting tile height value of 100.
S5, since the local latest block height 120 of the payer is greater than the block height start value 100, the block header data of the local block header from the block height start value 100 to the local latest block height 120 is sent to the payee together with the corresponding data of the payment transaction template. Wherein the corresponding data of the payment transaction template comprises: the complete transaction data for all incoming transactions, the Merck path, and the block height 110 in which the Merck path is located.
S6, the payee verifies whether the block header data is correct according to the received corresponding data of the payment transaction template, specifically:
s61, verifying whether the Mercker root of the block Mercker tree with the height of 110, where the transaction data are located, is contained by the corresponding block head according to the transaction data and the Mercker certification information; s62, if the Merck root of the block where the transaction data is located is correct, judging whether the block head of the transaction data is correct according to the Merck root, the difficulty, the nonce and the like in the block head with the height of 110, and if not, executing the step S66;
s63, if the chunk header with height of 110 is correct, verifying whether the previous chunk header, i.e. the chunk header with height of 109, is correct according to the previous chunk hash in the chunk header, otherwise, performing step S66;
s64, repeating the step S63 until the verification of the block head corresponding to the local newest block height 105 of the payee in the block head data is completed;
s65, if the verification is correct, judging that the block header data are correct;
and S66, if any one of the verifications is incorrect, judging that the block head data is incorrect.
S7, if the block header data is verified correctly, the receiving side further determines whether the information of the block header corresponding to the block height 105 in the block header data is the same as the information of the block header of the local latest block height 105 of the receiving side.
S8, if the data is the same, the payee updates the 5 verified correct block headers in the block header data from the local highest block height 105 of the payee to the block header height 110 of the transaction data, and stores the block headers in the block headers that cannot be verified correct from the block header height 111 of the transaction data to the local latest block height 120 of the payer to the local highest block height 120 of the payer, and the next update of the block headers can be performed without transmission, thereby reducing the data transmission amount.
And S9, if the data are different, the payee saves the block header data from the block height 100 to the block height 120 to the local, and the repeated transmission is not required when the block header data are updated next time, so that the data transmission amount is reduced.
The above embodiments are merely illustrative of the technical solutions of the present invention, and the present invention is not limited to the above embodiments, and any modifications or alterations according to the principles of the present invention should be within the protection scope of the present invention.

Claims (8)

1. A block header propagation method, comprising the steps of:
s1, point-to-point connection is established between the payer and the payee;
s2, the payee sends the block height request parameter and the payment transaction template to the payer;
s3, the payer obtains the block height initial value according to the block height request parameter;
s4, the payer judges whether the local latest block height is larger than the block height initial value;
s5, if the local latest block height of the payer is larger than the block height initial value, sending the block head data between the block height initial value and the local latest block height in the local block head, the corresponding transaction data of the payment transaction template, the Mercker path of the transaction data and the block height of the Mercker path to the payee;
and S6, the payee verifies whether the block header data is correct.
2. The block header propagation method of claim 1, wherein the payer is a blockchain full node or a blockchain light node, and the payee is a blockchain full node or a blockchain light node.
3. The method of claim 1, wherein the payer and payee establish a point-to-point connection therebetween in the form of: based on an internet connection, based on a short-range communication connection or based on a local area network connection.
4. The method of block header propagation of claim 1, wherein the block height request parameter is a block height value or a block hash value.
5. The block header propagation method of claim 1, wherein the payee verifying whether the block header data is correct comprises the steps of:
s61, verifying the Mercker root of the Mercker tree where the transaction data are according to the transaction data and the Mercker certification information whether the Mercker root is contained by the corresponding block header;
s62, if the Mercker root of the block where the transaction data is located is correct, judging whether the block head where the transaction data is located is correct according to the information in the block head where the transaction data is located, and if not, executing the step S66;
s63, if the block header of the transaction data is correct, verifying whether the previous block header is correct according to the hash of the previous block in the block header, if so, executing the step S64, otherwise, executing the step S66;
s64, repeating the step S63 until the block head verification corresponding to the height of the local newest block of the payee in the block head data is completed;
s65, judging that the block header data is correct;
and S66, judging that the block header data is not correct.
6. The block header propagation method of claim 1, further comprising the steps of:
s7, if the block head data is verified correctly, the payee further judges whether the information of the block head corresponding to the height of the latest local block of the payee and the information of the block head of the height of the latest local block of the payee in the block head data are the same;
s8, if the data are the same, the payee updates the block head data between the local highest block height of the payee and the block head height of the transaction data to the local block head data, and stores the block head data between the block head height of the transaction data and the local latest block height of the payer to the local;
and S9, if not, the payee saves the block header data to the local.
7. The block header propagation method of claim 1, further comprising the steps of:
s10, if the local latest block height of the payer is less than or equal to the starting value of the block height, the payer returns a block height request parameter to the payee; the block height request parameter is a block height value or a block hash value;
s11, the payee calculates the initial value of the block height according to the block height request parameter, and sends the block head data between the initial value of the block height and the local latest block height to the payer;
s12, the payer updates the block header data to the local block header data.
8. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of any one of the claims 1 to 7.
CN202111313631.5A 2021-11-08 2021-11-08 Block header propagation method and storage medium Pending CN113988856A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111313631.5A CN113988856A (en) 2021-11-08 2021-11-08 Block header propagation method and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111313631.5A CN113988856A (en) 2021-11-08 2021-11-08 Block header propagation method and storage medium

Publications (1)

Publication Number Publication Date
CN113988856A true CN113988856A (en) 2022-01-28

Family

ID=79747102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111313631.5A Pending CN113988856A (en) 2021-11-08 2021-11-08 Block header propagation method and storage medium

Country Status (1)

Country Link
CN (1) CN113988856A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024021410A1 (en) * 2022-07-29 2024-02-01 蚂蚁区块链科技(上海)有限公司 Method and apparatus for preventing network attacks

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024021410A1 (en) * 2022-07-29 2024-02-01 蚂蚁区块链科技(上海)有限公司 Method and apparatus for preventing network attacks

Similar Documents

Publication Publication Date Title
CN110868439B (en) Block chain system
CN109471744B (en) Main chain and parallel multi-sub-chain system architecture based on block chain
KR101796690B1 (en) Firmware integrity verification system based on block chain and the method thereof
WO2018059334A1 (en) Blockchain network, branch node, blockchain network application method and storage medium
CN110958111B (en) Block chain-based identity authentication mechanism of electric power mobile terminal
Danzi et al. Communication aspects of the integration of wireless IoT devices with distributed ledger technology
CN113657900B (en) Cross-chain transaction verification method and system and cross-chain transaction system
CN109711192B (en) Method and system for inter-node transaction of block chain system
CN111371905B (en) Block chain layering consensus proving system and method based on cloud computing
US11849052B2 (en) Certificate in blockchain network, storage medium, and computer device
CN113746858B (en) Cross-chain communication method based on verifiable random function
CN111275555B (en) Block chain transaction processing method, transaction node and block chain system
CN111092896A (en) Food traceability distributed data synchronization method based on optimized PAXOS
CN105678151A (en) Block chain transmitting method and system for constructing trustable nodes/satellite nodes
CN112907252A (en) Block chain transaction method and system based on multi-person down-chain channel
CN111899002A (en) Method for efficiently performing cross-chain information transaction interaction in block chain
CN111798234B (en) Lightweight block chain system and construction method
CN111640018B (en) Block chain transaction existence verification method and device
CN108989022B (en) Intelligent object shared key establishment method and system based on block chain
CN113988856A (en) Block header propagation method and storage medium
CN115174570A (en) Cross-chain consensus method and system based on dynamic committee
CN113114465B (en) Method and device for processing attribution authority, storage medium and electronic device
CN116186749A (en) Block chain-based service processing method and device, electronic equipment and readable medium
CN114037449A (en) Cross-chain asset transfer method, computer device, and storage medium
CN116186786A (en) Block chain-based service processing method and device, electronic equipment and readable medium

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