CN109087105A - For digging the Hash Search method of mine, digging mine machine and block catenary system - Google Patents
For digging the Hash Search method of mine, digging mine machine and block catenary system Download PDFInfo
- Publication number
- CN109087105A CN109087105A CN201811012239.5A CN201811012239A CN109087105A CN 109087105 A CN109087105 A CN 109087105A CN 201811012239 A CN201811012239 A CN 201811012239A CN 109087105 A CN109087105 A CN 109087105A
- Authority
- CN
- China
- Prior art keywords
- hash
- verified
- cryptographic hash
- search
- miner
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3827—Use of message hashing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3829—Payment protocols; Details thereof insuring higher security of transaction involving key management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/40—Authorisation, 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/401—Transaction 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 invention relates to block chain technical fields, more particularly to a kind of Hash Search method for digging mine, dig mine machine and block catenary system.Method includes: the digging mine task requests that Receiving Agent node is sent, wherein digs mine task requests and carries search number;According to mine task requests are dug, cryptographic Hash to be verified corresponding with described search number is searched out in the search space of random number, all there is same search number between the search space of any two random number, it is all different that same search numbers corresponding cryptographic Hash to be verified;Cryptographic Hash to be verified corresponding with search number is uploaded to agent node, so that agent node verifies current block according to cryptographic Hash to be verified.Since the corresponding cryptographic Hash to be verified of same search number is all different, agent node can be to avoid same verifying work be repeated, to relatively save energy consumption.
Description
Technical field
The present invention relates to block chain technical fields, more particularly to a kind of Hash Search method for digging mine, dig mine machine
And block catenary system.
Background technique
Some block catenary systems support proof of work mechanism ((Proof of Work, POW), according to proof of work machine
System, each miner's node disjoint are completed proof of work and are calculated, when finding the random number for meeting preset condition, be just packaged
The right of book keeping operation.
Inventor in the implementation of the present invention, has found traditional technology the prior art has at least the following problems: due to each miner
Node disjoint completes proof of work, therefore each miner's node is easy to compute repeatedly same workload, to cause the energy unrestrained
Take.
Summary of the invention
One purpose of the embodiment of the present invention is intended to provide a kind of Hash Search method and device for digging mine, dig mine machine and
Block catenary system, can be energy saving.
In order to solve the above technical problems, the embodiment of the present invention the following technical schemes are provided:
In a first aspect, the embodiment of the present invention provides a kind of for digging the Hash Search method of mine, it is applied to miner's node,
The described method includes:
The digging mine task requests that Receiving Agent node is sent, wherein the digging mine task requests carry search number;
According to the digging mine task requests, searched out in the search space of random number it is corresponding with described search number to
Verify cryptographic Hash, wherein all there is same search number, same search number pair between the search space of any two random number
The cryptographic Hash to be verified answered is all different;
Cryptographic Hash to be verified corresponding with described search number is uploaded to the agent node, so that the agent node root
According to the cryptographic Hash to be verified, current block is verified.
Optionally, each miner's node is all corresponding with miner's wallet address, also, each miner's wallet address
It is all different;
The method also includes:
Determine the corresponding Hash seed of each cryptographic Hash to be verified, wherein the corresponding Kazakhstan of any two cryptographic Hash to be verified
Uncommon seed is all different, and each Hash seed includes the component values being at least combined by miner's wallet address and random number;
According to each Hash seed, the cryptographic Hash to be verified of the random number is generated;
For the corresponding search number of each Hash values match to be verified, to generate the search space of the random number.
Optionally, the value range of the random number is 0-264。
Optionally, described according to each Hash seed, generate the cryptographic Hash to be verified of the random number, comprising:
According to following syntagmatic: Hm-2Hm-3Hm-4......H2H1H0Z is combined into m-th of Hash seed, wherein m is positive
Integer, Hm-1For m-th of cryptographic Hash, Z is the 1st Hash seed, and Z is combined by miner's wallet address and random number;
The Hash seed is made into Hash operation, generates cryptographic Hash Hm-1;
Any two cryptographic Hash is combined into the cryptographic Hash to be verified of the random number.
Optionally, described according to following syntagmatic: Hm-2Hm-3Hm-4......H2H1H0Z is combined into m-th of Hash kind
Son, comprising:
Judge Hm-2Hm-3Hm-4......H2H1H0Whether the data bits of Z is greater than presetting digit capacity threshold value;
If more than selection is in Hm-2Hm-3Hm-4......H2H1H0It sorts in Z in the data conduct of the presetting digit capacity of forefront
M-th of Hash seed;
If being less than, H is selectedm-2Hm-3Hm-4......H2H1H0Z is as m-th of Hash seed.
Optionally, the cryptographic Hash to be verified that any two cryptographic Hash is combined into the random number, comprising:
According to following syntagmatic:
[H0Hm-1,H2Hm-3,H4Hm-5,......Hm-6H5,Hm-4H3,Hm-2H1],
Every two cryptographic Hash to be verified is combined, to form the cryptographic Hash to be verified of the random number, wherein m is even number.
Optionally, the method also includes:
Go out same search from the search space coverage of each random number and numbers corresponding cryptographic Hash to be verified;
Same search is numbered into corresponding cryptographic Hash to be verified and random number is clustered into the search of the same search number
File.
In second aspect, the embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient meter
Calculation machine readable storage medium storing program for executing is stored with computer executable instructions, and the computer executable instructions are for executing miner's node
Described in any item Hash Search methods for being used to dig mine.
In the third aspect, the embodiment of the present invention provides a kind of digging mine machine, comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein, the memory be stored with can by it is described extremely
The instruction that a few processor executes, described instruction are executed by least one described processor, so that at least one described processing
Device can be used in executing described in any item for digging the Hash Search method of mine.
In fourth aspect, the embodiment of the present invention provides a kind of block catenary system, comprising:
Agent node;
Miner's node, miner's node and the agent node communicate;
Wherein, miner's node includes:
At least one processor;And
The memory being connect at least one described processor communication;Wherein, the memory be stored with can by it is described extremely
The instruction that a few processor executes, described instruction are executed by least one described processor, so that at least one described processing
Device can be used in executing described in any item for digging the Hash Search method of mine.
In the Hash Search method for digging mine, digging mine machine and the block catenary system that each embodiment of the present invention provides,
Firstly, the digging mine task requests that Receiving Agent node is sent, wherein dig mine task requests and carry search number.Secondly, according to
The digging mine task requests search out cryptographic Hash to be verified corresponding with search number in the search space of random number, wherein
All there is same search number between the search space of any two random number, same search numbers corresponding cryptographic Hash to be verified
It is all different.Again, cryptographic Hash to be verified corresponding with described search number is uploaded to agent node, so that agent node is according to institute
Cryptographic Hash to be verified is stated, current block is verified.On the one hand, since miner's node prestores the Hash to be verified of each random number
Value, agent node is without expending a large amount of cryptographic Hash to be verified calculated power and calculate each random number, it is only necessary to lower calculation power
Made with completing to dig miner, therefore, can satisfy the low equipment of calculation power and participate in digging mine, improve universality, become so that digging miner's work
It is more fair to obtain.On the other hand, since the corresponding cryptographic Hash to be verified of same search number is all different, agent node can
To avoid same verifying work is repeated, to relatively save energy consumption.
Detailed description of the invention
One or more embodiments are illustrated by the picture in corresponding attached drawing, these exemplary theorys
The bright restriction not constituted to embodiment, the element in attached drawing with same reference numbers label are expressed as similar element, remove
Non- to have special statement, composition does not limit the figure in attached drawing.
Fig. 1 is the configuration diagram of traditional virtual encryption money-system;
Fig. 2 is that the embodiment of the present invention provides a kind of configuration diagram of block catenary system;
It is a kind of for digging the flow diagram of the Hash Search method of mine that Fig. 3 is that the embodiment of the present invention provides;
Fig. 4 a is the Hash operation process schematic of the 1st Hash seed provided in an embodiment of the present invention;
Fig. 4 b is the Hash operation process schematic of the 2nd Hash seed provided in an embodiment of the present invention;
Fig. 4 c is the Hash operation process schematic of the 3rd Hash seed provided in an embodiment of the present invention;
Fig. 4 d is the search space schematic diagram of random number A provided in an embodiment of the present invention;
Fig. 4 e is the search file schematic diagram that search number provided in an embodiment of the present invention is Scoop#403;
Fig. 4 f is the search file schematic diagram that search number provided in an embodiment of the present invention is Scoop#404;
Fig. 4 g is that provided in an embodiment of the present invention 32 byte generation is signed is combined with 8 byte block elevation informations one
It rises and makees Hash operation schematic diagram;
Fig. 4 h be it is provided in an embodiment of the present invention by 32 byte GenHash progress modulo 4096 calculate, specified
Search for number schematic diagram;
Fig. 4 i is that the cryptographic Hash to be verified provided in an embodiment of the present invention by 64byte is combined with the generation of 32 byte signature
Hash operation is carried out together, obtains Hash result schematic diagram;
Fig. 5 is that the embodiment of the present invention provides a kind of structural schematic diagram for digging mine machine.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that described herein, the specific embodiments are only for explaining the present invention, not
For limiting the present invention.
Block catenary system has the characteristics that decentralization, is different from conventional center server, since block catenary system does not have
There is centralization node, the mechanism that needs to know together maintains normal operation, for example, common recognition mechanism includes POW algorithm, it is based on POW algorithm,
Block catenary system can be realized the common recognition verifying of block.
POW algorithm is a kind of strategy of a kind of reply Denial of Service attack and other service abuses, a proof of work
Refer to that a data for meeting specified conditions calculate, it is relatively difficult to generate correct result, but it is simpler to verify correct result
It is single.The generation of correct result can only carry out verifying trial and error by constantly enumerating random number, to eventually find correct option.
Wherein, which realized using Hash (hash) algorithm.Hash algorithm is a kind of one-way Hash algorithm, calculates Kazakhstan
The process of uncommon value is fairly simple, but inversely to obtain initial data according to fixed cryptographic Hash, then can only by enumerate trial and error come
It carries out.
In some virtual encryption money-systems, when carrying out random hash operation, POW algorithm is introduced to some spy
The scanning work of definite value, for example, at SHA-256, random hash value with one or more 0 start, with 0 quantity gradually
Increase, traversing out workload required for solution corresponding with the random hash value in the case of this will be exponentially increased, and to result
It tests, only needs a random hash operation.
A random number (Nonce) is augmented in the block of some virtual encryption money-systems, which needs to meet
So that there is the condition of required specified quantity 0 in the cryptographic Hash of given block.It, can only due to the irreversible property of Hash operation
The random number of the condition of satisfaction is traversed out by making repeated attempts.
As long as block chain node traverses go out to meet the random number of condition, which just completes the card of workload
It is bright, to obtain the packing book keeping operation power of block.
In the following, the embodiment of the present invention elaborates the common recognition verifying process of traditional virtual encryption money-system.It is as described below:
1, Transaction Information is collected and selected to block chain link point, and calculates Merkel (Merkle) root Hash of transaction List Table
Value.
2, block chain node tectonic province build, wherein block head includes version, the cryptographic Hash of upper block head, Merkel
Root cryptographic Hash, timestamp (timestamp), difficulty value (difficulty) and random number.
3, block chain node calculates the block head cryptographic Hash of construction, and whether test zone build cryptographic Hash is less than or equal to target
Value.If so, completing proof of work, the block of packing is broadcasted into the whole network, other block chain nodes in block chain will be examined
Survey the legitimacy of the block.If it is not, then returning to step 2, continue workload computing.
The block chain node for executing above-mentioned process can also be known as miner's node.
Firstly, since each block chain node in the whole network needs to obtain the packing book keeping operation of block by proof of work
Power, therefore when using POW common recognition mechanism, each miner's node requires to constantly generate random number to be examined with trial and error, with this time
Suitable random number is gone through out, which needs a large amount of electric power support, to cause a large amount of energy waste.
Secondly as independently carrying out proof of work calculating between each miner's node, there are biggish for working space
It repeats, so as to cause in the identical situation of difficulty value, the time needed for miner's node completes workload is long, out block low efficiency
Under.
In fact, riseing with the encryption money price in virtual encryption money-system, people dig mine by improvement and set
It is standby, to realize the block out of higher efficiency, for example, from using CPU (Central Processing Unit, central processing unit) to dig
Mine digs mine to using GPU (Graphics Processing Unit, graphics processor), then arrives FPGA (Field
Programmable Gate Array, field programmable gate array) dig mine, the ASIC of the customization finally occurred
(Application Specific Integrated Circuit, specific integrated circuit) digs mine.
It digs mine calculation power exponentially to increase every year, since some virtual encryption money-systems can be adjusted according to power dynamic is calculated
Therefore whole digging mine disaster angle value increases, difficulty value is also increased with exponential with power is calculated.It is such to increase so that independent miner digs
Mine can not obtain income, therefore there has been the appearance in mine pond.Miner's node is combined together by mine pond by certain agreement,
It concentrates and calculates power progress workload computing, obtain and the miner to work in mine pond is given into reward after rewarding.
There are mine pond administrator, mine pond administrator is responsible for coordinating and managing all miner's work in mine pond.Therefore, mine pond administrator
Customized related protocol is needed, is communicated with miner.At the same time, miner administrator is responsible for being packaged transaction, distributes for miner
Related work amount, therefore, the relevant reward of system also can all be sent to mine pond administrator, and mine pond administrator is responsible for mine
Work sends the reward of related work amount.It is also easier to complete for independent miner since mine pond summarizes a large amount of power of calculating
Proof of work and obtain system award, this makes the income of miner that can become relatively stable, and mine pond administrator can be with
Obtain its certain mine pond management return.
In the following, combination of embodiment of the present invention Fig. 1 elaborates the common recognition verifying process of traditional virtual encryption money-system.Such as
It is lower described:
1, miner's client 11 sends common recognition instruction to management server 12, wherein common recognition instruction includes miner's client
11 identity information, operation information and relevant parameter information, parameter information specify dbase and the version number of miner's client.
2, after management server 12 receives this information, information can be confirmed, after confirming successfully, returns to relevant information.
3, miner's client 11 sends authentication information, and authentication information includes the wallet address of miner's client 11.
4, the legitimacy of 12 authentication verification information of management server, after being verified, it is logical that management server 12 returns to verifying
Cross information.
5, management server 12 sends difficulty setting information to miner's client 11.
6, management server 12 is by sending the block information that carry out proof of work to miner's client 11.
7, the common recognition of miner's client 11 verifying block will when miner's client 11 traverses out the random number of the condition of satisfaction
The random number is sent to management server 12.
8, management server 12 verifies the random number that miner's client 11 provides, and transmits verification result to miner client
End 11.
As previously mentioned, all rewards are distributed on mine pond manager, in the online lower mine pond formed for the miner of its work
Reward is distributed by mine pond manager, therefore mine pond manager possesses absolute right.Also, the formation in the pond line Xia Kuang, it is fixed to need
Adopted relevant communication protocol and mechanism, it is comparatively laborious.
Based on this, the embodiment of the present invention provides a kind of block catenary system.Referring to Fig. 2, block catenary system 200 includes agency
Node 21, miner's node 22 and wallet node 23, agent node 21, miner's node 22 and 23 any two node of wallet node it
Between support point-to- point communication (Point to point communication, P2P), also, agent node 21, miner's node 22
And wallet node 23 all can be used as the block chain node in block catenary system, undertake different duties in each leisure block catenary system
Appoint, common work, stabilization and the safety for safeguarding block catenary system.
Agent node 21 is mainly used for the generation and broadcast of new block, for example, agent node 21 is needed to miner's node body
Part certification, issue dig mine task, reception and verify miner's node upload cryptographic Hash to be verified, record miner's node workload,
It is packaged and is generated block, new coin reward is distributed to miner's node according to workload and broadcasts newly-generated block to block chain
In system.
Miner's node 22 needs that mine can be dug in 21 successful registration of agent node.Wherein, register flow path is as follows:
1, miner's node 22 submits registration information to agent node 21.
Wherein, which includes one or more of information: dig the equipment Serial Number SN of mine machine, user information and
Miner's wallet address.
2, agent node 21 checks registration information.
Checking process includes: that whether correct, SN whether there is in database detection SN number format, whether SN has been bound
Other users etc..
3, agent node 21 records registration information.
4, registering result is returned to miner's node 22 by agent node 21.
5, agent node 21 broadcasts new log-on data to block catenary system 200.
6, all wallet nodes 23 store and synchronize the log-on data of newest miner's node in block catenary system 200.
In the present embodiment, miner's node 22 needs to carry out following initialization operation before starting to dig mine for the first time:
1, it registers.It obtains and equipment Serial Number SN one-to-one miner's wallet address.
2, according to equipment of itself memory capacity size, a special memory space is opened up, is dug for storing stand-by when mine
Cryptographic Hash to be verified.
3, suitable dedicated memory space is selected.
In general, memory space cannot be too small, also no more than the 80% of total memory space.
4, according to the miner's wallet address of itself, a large amount of cryptographic Hash to be verified are generated, and all cryptographic Hash to be verified are deposited
It is stored in dedicated memory space, waits and being used when digging mine.
In the present embodiment, when starting the digging mine movement an of new block every time, miner's node 22 is according to agent node 21
Instruction, pre-stored cryptographic Hash to be verified is reported to agent node 21 one by one, until new block generate.Agent node 21
According to the data volume statistical work amount for the cryptographic Hash to be verified that miner's node 22 uploads, and divided according to workload to miner's node 22
It is rewarded with new coin.
Wallet node 23 for recording, inquire account balance, transaction record, initiate it is new transfer accounts, and in block catenary system
Middle synchronization, verifying block data.
It is understood that above-mentioned agent node 21, miner's node 22 and wallet node 23 can be a physical services
A logical server made of device or multiple physical servers are virtual.Server be also possible to it is multiple can interconnected communication clothes
The server zone of business device composition, and each functional module can be respectively distributed on each server in server zone.
It is understood that the block chain work that above-mentioned agent node 21, miner's node 22 and wallet node 23 are responsible for
Be not it is fixed, above-described embodiment only show block catenary system 200 in application scenes, answered there may also be other
Use scene.
It is understood that agent node 21 or miner's node 22 can all be taken as digging mine machine, wherein digging mine machine can be with
Including POS machine (point of sales terminal) mobile terminal, smart phone, computer, palm PC (Personal
Digital Assistant, PDA), tablet computer, smartwatch or desktop computer etc..
Referring to Fig. 3, Fig. 3 is that the embodiment of the present invention provides a kind of process signal for digging the Hash Search method of mine
Figure.As shown in figure 3, the Hash Search method 300 for digging mine includes:
The digging mine task requests that S31, Receiving Agent node are sent, wherein dig mine task requests and carry search number;
S32, according to the digging mine task requests, searched out in the search space of random number with search number it is corresponding to
Verify cryptographic Hash, wherein all there is same search number, same search number pair between the search space of any two random number
The cryptographic Hash to be verified answered is all different.
S33, cryptographic Hash to be verified corresponding with search number is uploaded to agent node, so that agent node is according to be verified
Cryptographic Hash verifies current block.
In the present embodiment, agent node 21 is sent before digging mine task requests to each miner's node, miner's node 22
It is sent to agent node 21 and digs mine request, digging mine request carries miner's identity information, wherein miner's identity information includes
The equipment Serial Number SN or block catenary system for digging mine machine are that the distribution of each miner's node has unique identification information, mine
Work identity information is made of character string, can also be other representations.
Agent node 21 detects whether miner's identity information matches default identity information, if not matching, forbids miner's node
22 are added miner's list;If matching sends to miner's node 22 and digs mine task requests.When each 22 successful registration of miner's node
Afterwards, miner's identity information of miner's node 22 of successful registration etc. information is recorded in miner's list by agent node 21, generation
Reason node 21 runs and maintains miner's list.When miner's node changes in block catenary system, agent node 21 is again
Update miner's list.
Default identity information is customized by the manager of block catenary system, can be equipment Serial Number SN or block chain
System is that the distribution of each miner's node has unique identification information.For example, presetting identity information is POS machine sequence
Number SN.When mobile phone needs to be added block chain network as miner's node, since the equipment Serial Number of mobile phone is not belonging to POS machine sequence
Row number SN, then, the mobile phone have not been able to be successfully joined in block chain network as miner's node.
In the present embodiment, by verifying the legitimacy of miner's node, be conducive to facilitate management block catenary system.
After miner's node 22 passes through the verifying of agent node, agent node 21 sends to each miner's node 22 and digs mine times
Business request, wherein the digging mine task requests carry search number.
Miner's node 22, which receives, digs mine task requests, according to digging mine task requests in the search space of random number (nonce)
In search out and the corresponding cryptographic Hash to be verified of search number.The search space of random number is by complete based on generating random number
Portion's cryptographic Hash to be verified is constituted, and cryptographic Hash to be verified can be composed of multibyte data, for example, cryptographic Hash to be verified can be with
It can also be 64 byte cryptographic Hash for 32 bytes (byte) cryptographic Hash, wherein 64 byte cryptographic Hash can be breathed out by 2 32 bytes
Uncommon value is composed.
After searching out, miner's node 22 uploads cryptographic Hash to be verified corresponding with search number to agent node 22.Its
In, all there is same search number between the search space of any two random number, same search numbers corresponding Kazakhstan to be verified
Uncommon value is all different.
In the present embodiment, the verification mode for verifying current block is varied, for example: the verifying of agent node 21 is worked as
When preceding block, firstly, cryptographic Hash to be verified and generation signature are made Hash operation, expectation cryptographic Hash is obtained.It signs due to generating
There is uniqueness and consistency in block catenary system, the randomness of cryptographic Hash to be verified is relatively high originally, subsequent recycling life
Make Hash operation with cryptographic Hash to be verified at signature, to improve randomness again, reduces agent node 21 and make repeated verifying
The probability of work.Secondly, agent node 21 judges it is expected that whether cryptographic Hash is less than or equal to the target cryptographic Hash;If be less than or
It is equal to, determines that the corresponding random number of cryptographic Hash to be verified is effective, and be packaged block;If more than determining cryptographic Hash to be verified
Corresponding random number is invalid.
In summary, on the one hand, since the corresponding cryptographic Hash to be verified of same search number is all different, Dai Lijie
Point can be to avoid same verifying work be repeated, to relatively save energy consumption.On the other hand, since miner's node is pre-
There is the cryptographic Hash to be verified of each random number, agent node is without expending a large amount of Kazakhstan to be verified calculated power and calculate each random number
Uncommon value, it is only necessary to lower calculation power can be completed to dig miner's work, therefore, can satisfy the low equipment of calculation power and participate in digging mine,
Universality is improved, makees to become more fair so that digging miner.
In some embodiments, after being verified current block, when agent node 21 counts this digging mine, each miner
Node 22 uploads the quantity of cryptographic Hash to be verified and each miner's node uploads the total amount of cryptographic Hash to be verified.Secondly, agency
Node 21 uploads the proportionate relationship between the quantity and total amount of cryptographic Hash to be verified according to each miner's node, and distribution is verified
The reward that current block generates.In this manner, the income of miner's node 22 can be stablized, to preferably safeguard area
The stabilization and normal operation of block catenary system.
In above-mentioned each embodiment, the value range of random number is 0-264Between integer, institute's cryptographic Hash still to be tested
It is all based on generating random number.Each random number will generate 256KB cryptographic Hash to be verified, and each cryptographic Hash to be verified is in local
It is uniquely to exist in data.
It is understood that user setting and for store cryptographic Hash to be verified miner's node memory space
Size determines that the quantity of cryptographic Hash to be verified can be stored.
In some embodiments, the data of each generating random number can be divided into the data space of preset quantity, in advance
If the data space of quantity collectively forms the search space of a random number.For example, the data of each generating random number are drawn
It is divided into 4096 data spaces, each data space size is 64 byte, to be tested in each data space
Card cryptographic Hash is made of two 32byte cryptographic Hash.Herein, each data space is known as a scoop.Each
Scoop is all matched with search number, and the value range for searching for number is customized by the user, for example, accepting upper example, searches for number
Value range is 0-4095.
Therefore, in general, a random number corresponds to N number of difference cryptographic Hash to be verified, and N is positive integer.Example in undertaking,
N is 4096.
Search number is as obtained from making the modulo operation of N for known constant M, and M is positive integer, also that is, M is carried out
The calculating of modulo N, to obtain search number.It is obtained it is known that constant M will combine block information as Hash operation,
Wherein, combination block information is combined by the block information that block head in current block records with the block elevation information of current block
At.
In some embodiments, Hash operation use hash algorithm include: SHA3, SHA1, SHA224, SHA256,
SHA384 or SHA512.
In general, each block includes block head and block body, the block head record of each block is following any or two
Kind or more block information:
1, random number;
2, difficulty value (Difficulty): difficulty value is for adjusting block formation speed, and every 24 blocks can adjust one
It is secondary, it is ensured that block increases according to the speed of average 5 minutes blocks;
3, target cryptographic Hash (Base Target): target cryptographic Hash is calculated according to difficulty value, is used for test zone
Whether the random number submitted in block meets the requirements;
4, target value (Bits): the integer type that target cryptographic Hash be compressed into one 64 is stored;
5, miner's wallet address;
6, it generates signature (Generate Singature): the generation signature of a upper block and miner's wallet address is breathed out
Obtained from uncommon operation, for digging the calculating during mine;
7, block signature (Block Signature): agent node is using own private key to the Hash content of current block
Make what signature operation obtained, whether is created by legal agent node for wallet node verification block.
Block information is combined as previously mentioned, generating signature and being combined into the block elevation information of current block, by combination region
Block message obtains known constant M as Hash operation, for example, generating signature is 32byte, block elevation information is 8 byte, combination
Block information is 32byte, it is known that constant M is 32byte.Above-mentioned example is held, the known constant M of 32 byte is carried out
Modulo4096 is calculated, and obtains specified search number, for example, obtained search number is scoop11 or scoop403 etc..
Then, as previously mentioned, agent node 21 is sent to each miner's node digs mine task requests, wherein the digging mine task requests are taken
Band search number scoop11, it is scoop11 that each miner's node, which searches out search number in the search space of each random number,
Corresponding cryptographic Hash to be verified, such as: for miner node a, search number is scoop11 in the search space of random number A1
Corresponding cryptographic Hash to be verified is X1, and search number is to be verified corresponding to scoop11 in the search space of random number A2
Cryptographic Hash is X2, and it is X3 ... that search number, which is cryptographic Hash to be verified corresponding to scoop11, in the search space of random number A3.
It is Y1 that for miner node b, in the search space of random number B1, search number, which is cryptographic Hash to be verified corresponding to scoop11,
It is Y2, the search of random number B3 that search number, which is cryptographic Hash to be verified corresponding to scoop11, in the search space of random number B2
It is Y3 ... that search number, which is cryptographic Hash to be verified corresponding to scoop11, in space.
As previously mentioned, when digging mine, what the search space of each random number can be pre-generated, miner can be based on
The search space of wallet address and each random number of generating random number.In some embodiments, each miner's node is all corresponding with
Miner's wallet address, also, each miner's wallet address is all different.Therefore, first when generating the search space of each random number
First, miner's node 22 determines the corresponding Hash seed of each cryptographic Hash to be verified, wherein any two cryptographic Hash to be verified is corresponding
Hash seed it is all different, each Hash seed includes the component values being at least combined by miner's wallet address and random number.
Secondly, miner's node 22 generates the cryptographic Hash to be verified of random number according to each Hash seed.As previously mentioned, each random number
The data of generation are divided into 4096 data spaces, and each data space size is 64 byte, each data storage
Cryptographic Hash to be verified in space is made of two 32byte cryptographic Hash, and therefore, each random number can correspond to 8192 32byte
Cryptographic Hash.If each cryptographic Hash to be verified is 32byte, one shares 8192 cryptographic Hash to be verified.If each Hash to be verified
When value is 64byte, one shares 4096 cryptographic Hash to be verified.Again, miner's node 22 is each Hash values match pair to be verified
The search number answered, to generate the search space of random number, for example, being for first Hash values match search number to be verified
Scoop0, is Scoop1 for second Hash values match search number to be verified, and third Hash values match search to be verified is compiled
Number be Scoop2 ....And so on, obtain 4096 or 8192 cryptographic Hash to be verified.
When miner's node 22 generates the cryptographic Hash to be verified of random number according to each Hash seed, firstly, it is according to following
Syntagmatic: Hm-2Hm-3Hm-4......H2H1H0Z is combined into m-th of Hash seed, wherein m is positive integer, Hm-1It is m-th
Cryptographic Hash, Z are the 1st Hash seed, and Z is combined by miner's wallet address and random number.Secondly, miner's node 22 is by Hash
Seed makees Hash operation, generates cryptographic Hash Hm-1.Again, any two cryptographic Hash is combined into the random number by miner's node 22
Cryptographic Hash to be verified.
For example, Fig. 4 a is please referred to, the 1st Hash seed is combined by miner's wallet address+random number (Z), by the 1st
A Hash seed Z makees Hash operation, obtains the 1st cryptographic Hash H0, remember the 1st cryptographic Hash H0For Hash#8191.
Fig. 4 b is please referred to, the 2nd Hash seed is by the 1st cryptographic Hash+miner's wallet address+random number (H0+ Z) combination
At the 2nd Hash seed is made Hash operation, obtains the 2nd cryptographic Hash H1, remember the 2nd cryptographic Hash H1For Hash#8190.
Fig. 4 c is please referred to, the 3rd Hash seed is by 1 cryptographic Hash of the 2nd cryptographic Hash+the+miner's wallet address+random number
(H1+H0+ Z) it is combined into, the 3rd Hash seed is made into Hash operation, obtains the 3rd cryptographic Hash H2, remember the 3rd cryptographic Hash H2For
Hash#8189。
……
And so on, obtain the cryptographic Hash of preset quantity.
As previously mentioned, if one shares 8192 cryptographic Hash to be verified when each cryptographic Hash to be verified is 32byte.If each
When cryptographic Hash to be verified is 64byte, one shares 4096 cryptographic Hash to be verified.When cryptographic Hash to be verified is 64byte, have
Help improve fairness, relatively weaken and calculate absolute predominance brought by the strong digging mine machine of power, it is weaker to relatively improve calculation power
Dig the chance that mine machine participates in digging mine.Cause are as follows: to be verified cryptographic Hash of the cryptographic Hash to be verified of 64byte relative to 32byte, rear
When continuous common recognition verifying, the complexity of data calculation amount is improved.Since the existing calculation power for digging mine machine is more and more stronger, according to 32byte
Cryptographic Hash to be verified, mine can be dug to real-time by calculating the strong digging mine machine of power, and calculate the weak digging mine machine such as POS machine of power, but not
Mine rapidly can be dug and be exceeded or eliminate.However, calculating the strong digging mine machine of power when the cryptographic Hash to be verified using 64 byte
Real-time cannot effectively be met the requirements, and then, before digging mine, calculation power all constructs with the weak digging mine machine of calculation power by force random in advance
Several search spaces, at this point, due to not starting also to dig mine, calculate power by force with calculate the weak digging mine machine of power and do not embody significant difference also.
When Deng digging mine, since cryptographic Hash to be verified in the search space of random number is all ready for, calculate power by force with calculate the weak digging mine machine of power
Difference can be reached and insignificantly dig mine efficiency, so that relatively, digging mine can be participated in by calculating the weak digging mine machine of power.
As previously mentioned, next Hash seed is that constantly group closes a Hash to be verified on the basis of upper Hash seed
Value, then, the data volume of Hash seed the more is rolled the more big.When the data volume of Hash seed is excessive, the meter of miner's node can be reduced
Calculate efficiency.In order to improve the computational efficiency of miner's node, in some embodiments, miner's node 22 is according to following syntagmatic:
Hm-2Hm-3Hm-4......H2H1H0Z, during being combined into m-th of Hash seed, miner's node 22 judges Hm- 2Hm-3Hm-4......H2H1H0Whether the data bits of Z is greater than presetting digit capacity threshold value;If more than selection is in Hm-2Hm- 3Hm-4......H2H1H0Sequence is in the data of the presetting digit capacity of forefront as m-th of Hash seed in Z;If being less than, selection
Hm-2Hm-3Hm-4......H2H1H0Z is as m-th of Hash seed.
For example: when the data bits of Hash seed has been over 4096 byte, later step is adopted when calculating
Hash seed is selected at Hm-2Hm-3Hm-4......H2H1H0It is sorted in Z in the data of the presetting digit capacity of forefront, wherein
The presetting digit capacity is 4096 byte.Therefore, the maximum data digit of each Hash seed is not exceed 4096 byte.
In some embodiments, any two cryptographic Hash is combined into the cryptographic Hash to be verified of random number by miner's node 22
When, according to following syntagmatic:
[H0Hm-1,H2Hm-3,H4Hm-5,......Hm-6H5,Hm-4H3,Hm-2H1],
Every two cryptographic Hash to be verified is combined, to form the cryptographic Hash to be verified of random number, wherein m is even number.Also,
Miner's node 22 is the corresponding search number of each Hash values match to be verified, to generate the search space of random number.
For example: please refer to Fig. 4 d, miner's node 22 by " Hash#0 " and " Hash#8191 " be combined into first it is to be tested
It demonstrate,proves cryptographic Hash and searches for number Scoop0 for first Hash values match to be verified, combine " Hash#2 " with " Hash#8189 "
Search for number Scoop1 at second cryptographic Hash to be verified and for second Hash values match to be verified, by " Hash#4 " and
" Hash#8187 " is combined into third cryptographic Hash to be verified and numbers for third Hash values match search to be verified
" Hash#8188 " and " Hash#3 " are combined into the 4095th cryptographic Hash to be verified and are the 4095th to be tested by Scoop2 ...
It demonstrate,proves Hash values match and searches for number Scoop4094, " Hash#8190 " and " Hash#1 " is combined into the 4096th Hash to be verified
It is worth and is the 4096th Hash values match search number Scoop4095 ... to be verified, and so on, this will not be repeated here.
In above-mentioned each embodiment, when miner's node 22 is the corresponding search number of each Hash values match to be verified
Afterwards, when digging mine, the search that miner's node 22 is issued according to agent node 21 is numbered, successively time from the search space of each random number
It goes through out same search and numbers corresponding cryptographic Hash to be verified, and same search is numbered into corresponding cryptographic Hash to be verified and is uploaded to generation
Manage node 21.In this process, miner's node 22 needs to make traversal work.
In some embodiments, corresponding cryptographic Hash to be verified is numbered in order to improve the traversal same search of miner's node 22
Operation efficiency, firstly, miner's node 22 can go out from the search space coverage of each random number same search number it is corresponding to
Verify cryptographic Hash.Secondly, miner's node 22 by same search number corresponding cryptographic Hash to be verified and random number be clustered into it is identical
Search for the search file of number.It is subsequent, when agent node 21 issues search number to miner's node 22,22 basis of miner's node
Search number, searches for search file corresponding with search number, then search file is uploaded to agent node 21.Therefore,
Its data memory format by optimizing cryptographic Hash and random number to be verified, when digging mine, miner's node 22 can pass through search text
Part quickly uploads cryptographic Hash and random number to be verified to agent node 21, to improve operation effect when miner's node 22 digs mine
Rate.
Each search file name is put into name format are as follows:
WalletAddress_ScoopNumber_StartingNonceNumber_NumberOfNonces。
Fig. 4 e is please referred to, the search number of search file is Scoop#403, which includes that each random number is corresponding
The cryptographic Hash to be verified of same search number.
Fig. 4 f is please referred to, the search number of search file is Scoop#404.
In order to illustrate the embodiment of the present invention in further detail, digging mine main flow provided in an embodiment of the present invention is hereafter summarized.
It is understood that the protection scope that digging mine main flow hereafter is not intended to restrict the invention, is only intended to aid in illustrating
The embodiment of the present invention.It is as described below:
1, miner's node 22 is sent to agent node 21 digs mine request.
It digs mine request and is used to indicate addition digging mine.Dig mine request with carrying the equipment Serial Number for digging mine machine and miner's wallet
Location.
2, mine request is dug in the verifying of agent node 21, and issues verification result to miner's node 22.
After being verified, miner's node 22 can be added in current mine pond by agent node 21 automatically.
3, when starting a new block digging mine, transaction record is first packaged into block by agent node 21, and according to area
Block number includes: that target cryptographic Hash and search are numbered according to necessary parameter, necessary parameter is calculated.
Herein, when agent node 21 calculates search number, process specific as follows:
A, 32 byte are generated signature by agent node 21 and 8 byte block elevation informations are combined and do Hash fortune
It calculates, obtains 32 byte GenHash, as shown in figure 4g.
B, 32 byte GenHash progress modulo 4096 is calculated, obtains specifying search for numbering, as shown in figure 4h.
4, agent node 21 by new block essential information and specify search for number be assembled into dig mine task requests, be broadcast to
All miner's nodes 22 in mine pond.
5, miner is according to specifying search for numbering, by the cryptographic Hash to be verified stored in search space (by two 32 byte groups
64 byte data of synthesis) it is combined into pair with random number, it is uploaded to agent node 21 one by one.
6, agent node 21 often receives the cryptographic Hash to be verified of miner's node 22 upload, can be first to miner's node 22
Workload (this digs the quantity that mine uploads cryptographic Hash to be verified) adds up, and verifies to cryptographic Hash to be verified.
Herein, verification process is as follows:
A, after agent node 21 receives the cryptographic Hash to be verified of 64byte, by the cryptographic Hash to be verified and 32 of 64byte
The generation signature of byte combines carry out Hash operation, obtains Hash result (Target), as shown in figure 4i.
B, Hash result (Target) and target cryptographic Hash (Base Target) are compared, if Hash result is small
In target cryptographic Hash, indicate that the random number uploaded is effective, agent node 21 stops this wheel and digs mine, and starts to be packaged block.
When verifying block, agent node 21 can also complete following processes:
C, check that upper a block for reference whether there is and effectively.
D, check whether the timestamp of block is later than the timestamp of a block, and earlier than following 2 hours.
E, check whether each transaction in block below transaction List Table is effective.
F, check whether the signature of block is effective using fixed public key.
G, check whether common recognition mechanism is effective.
If after 7, being verified, agent node 21 can first notify all miner's nodes 22 to stop uploading data, then completion
Block information, comprising: wallet address, Nonce, Timestamp, block signature etc..
8, generated block data is broadcast in block catenary system by agent node 21.
9, agent node 21 is divided in portion new block and obtains according to amount of work and the workload of every miner's node
Reward.
10, agent node 21 begins preparing the digging mine of next block.
In above-mentioned each embodiment, as previously mentioned, the mode that agent node 21 verifies current block is varied, and
And a random number corresponds to N number of difference cryptographic Hash to be verified, search number is obtained by known constant M to be made to the modulo operation of N
It arrives.Be with verification mode difference described in above-mentioned each embodiment: known constant M is that will combine block information to make Hash
What operation obtained, wherein the block of block information, current block that combination block information is recorded by block head in current block is high
Degree information and start dig mine ageing at.Relative to the combination block information in above-mentioned each embodiment, the present embodiment
Combination block information, which has increased newly, to be started to dig the mine time.
Agent node 21 is according to cryptographic Hash to be verified, current when having not been able to be verified during verifying current block
When block, block catenary system is the failure to enough smoothly go out block.In order to guarantee that block catenary system can smoothly go out block, pass through utilization
The changeability for starting to dig the mine time abandons current block when having not been able to output block according to currently assigned search number, and
Again mine is dug, is redefined with this and starts to dig the mine time.It is associated with due to specifying search for number with block information is combined, combines block
Information by block information, current block block elevation information and dig mine ageing at, agent node 21 is dug again
When mine, block information, the block elevation information of current block are all identical as the block of last time digging mine failure, but the beginning of the two
The digging mine time is different, and then, when digging mine again, the calculated number that specifies search for of agent node 21 is lost with last digging mine
The number that specifies search for lost is different, and in this manner, can guarantee smoothly to go out block.
For example: agent node 21 is according to cryptographic Hash to be verified, during verifying current block, firstly, agency's section
Cryptographic Hash to be verified and generation signature are made Hash operation by point 21, obtain expectation cryptographic Hash.Secondly, the judgement expectation of agent node 21
Whether cryptographic Hash is less than or equal to target cryptographic Hash;If being less than or equal to, determine that the corresponding random number of cryptographic Hash to be verified is to have
Effect, and it is packaged block;If more than, determine the corresponding random number of cryptographic Hash to be verified be it is invalid, dig mine again, and update
Start to dig the mine time, so as to reconfigure out new combination block information.Then, agent node 21 is by new combination block information
New known constant M is obtained as Hash operation, then new known constant M is made newly to specify search for obtained from the modulo operation of N
Number.
In general, in this manner, it can guarantee that block catenary system smoothly goes out block.
Be with the difference of above-mentioned each embodiment verification mode: agent node 21 is according to cryptographic Hash to be verified, verifying
During current block, firstly, agent node 21 by each cryptographic Hash to be verified divided by target cryptographic Hash, obtain with each to
Verify the corresponding deadline (deadline) of cryptographic Hash.Secondly, agent node 21 obtains generation time of a upper block and works as
The preceding current time difference dug between the mine time.Again, agent node 21 is worked as according to deadline and time difference, common recognition verifying
Preceding block, for example, agent node 21 traverse out most from several deadlines corresponding with each cryptographic Hash to be verified
Small deadline, judge whether current time difference is greater than minimum deadline;If it is not, determine cryptographic Hash to be verified it is corresponding with
Machine number is invalid, and waits current block to be verified, until being packaged current when current time difference is greater than minimum deadline
Block;If so, determining that the corresponding random number of cryptographic Hash to be verified is effective, and it is packaged current block.
For example: cryptographic Hash A to be verified corresponds to deadline t1, and cryptographic Hash b to be verified corresponds to deadline t2, to be tested
Card cryptographic Hash c corresponds to deadline t3, wherein t1 is less than t2, and t2 is less than t3.At this point, agent node 21 records Hash to be verified
Value A corresponding deadline is minimum deadline t1.Herein, a upper block is to sort to correspond to block height in currently digging mine
Front, a upper block are known together, it is assumed that the current block height for digging the corresponding block of mine is the 10000th, then a upper area
The block height of block is the 9999th.The generation time for enabling a upper block is ts.When agent node digs mine every time, all detection is current
Dig the mine time, wherein the current digging mine time is variable.Enabling the current digging mine time is tp1, then current time difference Δ t0=
tp1-ts.If Δ t0 is less than t1, agent node 21 switches to standby mode, that is, waits current block to be verified, the time of waiting
It is continued until that the new current new current time difference Δ t1 for digging mine time tp2 and ts is greater than t1, is just verified and is packaged and work as
Preceding block.If Δ t0 is greater than t1, it is verified and is packaged current block.
In some embodiments, agent node continues to update minimum deadline, for example, with the progress of verification process,
If agent node is found compared to smaller deadline minimum deadline has been recorded, agent node updates and prestores the phase
Than in having recorded smaller deadline minimum deadline and as new minimum deadline.Specifically, agency's section
Point is during verifying cryptographic Hash to be verified, firstly, agent node verifies whether the deadline that current Hash calculation goes out meets
Block requirement out, if satisfied, going out block immediately;If not meeting, the deadline that current Hash calculation goes out and the minimum prestored are judged
The size of both deadlines acts on behalf of section if the deadline that current Hash calculation goes out is less than the minimum deadline prestored
Point continues to update and prestore this compared to having recorded minimum deadline smaller deadline and cut as new minimum
The only time.
Secondly, agent node judges whether current time difference is greater than the minimum deadline prestored, if more than then going out
Block;If being less than, continue to verify subsequent cryptographic Hash to be verified.After institute's cryptographic Hash still to be tested has been verified, block catenary system
Also fail to enough go out block, then block catenary system cuts standby mode, etc. after current times difference is greater than minimum deadline, start to beat
Wrap out block.
In this manner, on the one hand, it can guarantee that block catenary system smoothly goes out block.On the other hand, it can adjust
Block catenary system goes out the speed of block.
In above-mentioned each embodiment, the block body of each block all includes Transaction Information, and every transaction is all stored in friendship
Yi Chizhong.Whether the exchange hour that each block chain node all monitors every transaction in trading pit is in term of validity, wherein
The wallet address for having the initiator that transfers accounts all is directed toward in every transaction, if it is not, trading to the wallet address withdraw for the initiator that transfers accounts;If
It is that transaction is packaged into current block, for example, miner's node can select more service charges according to the service charge height of transaction
High transaction is packaged.
Relative to traditional technology, when the transaction procedure of user takes relatively low, due to economic cause, miner's node is often selected
It chooses friends the high transaction of easy service charge to be packaged, without selecting transaction procedure expense is relatively low to be packaged.Therefore, transaction procedure takes
Relatively low transaction will appear the too long time and be stored in trading pit, cause trading efficiency low.For this purpose, the embodiment of the present invention passes through
For every transaction set term of validity, when transaction exchange hour be more than term of validity, recalled automatically to the money for the initiator that transfers accounts
Packet address to reduce the probability of Fail Transaction, and reduces the storage load of trading pit.
It should be noted that not necessarily there is centainly successive between above steps in above-mentioned each embodiment
Sequentially, those of ordinary skill in the art, according to an embodiment of the present invention to describe to be appreciated that in different embodiments, above-mentioned each step
Suddenly there can be the different sequences that executes, also i.e., it is possible to execute parallel, execution etc. can also be exchanged.
As the another aspect of the embodiment of the present invention, the embodiment of the present invention provides a kind of digging mine machine, which can be
Agent node can also be miner's node.Referring to Fig. 5, the digging mine machine 500 includes: one or more processors 51 and deposits
Reservoir 52.Wherein, in Fig. 5 by taking a processor 51 as an example.
Processor 51 can be connected with memory 52 by bus or other modes, to be connected as by bus in Fig. 5
Example.
Memory 52 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software journey
Sequence, non-volatile computer executable program and module, as the digging mine identity identifying method in the embodiment of the present invention is corresponding
Program instruction/module.Non-volatile software program, instruction and the mould that processor 51 is stored in memory 52 by operation
Block, thereby executing above-mentioned each embodiment for digging the Hash Search method of mine.
Memory 52 may include high-speed random access memory, can also include nonvolatile memory, for example, at least
One disk memory, flush memory device or other non-volatile solid state memory parts.In some embodiments, memory 52
Optional includes the memory remotely located relative to processor 51, these remote memories can pass through network connection to processor
51.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Described program instruction/module is stored in the memory 52, is held when by one or more of processors 51
When row, the Hash Search method for being used to dig mine in above-mentioned any means embodiment is executed, for example, thereby executing above-mentioned each reality
Apply the Hash Search method for being used to dig mine of example.
The embodiment of the invention also provides a kind of non-transient computer readable storage medium, the non-transient computer is readable
Storage medium is stored with computer executable instructions, and the computer executable instructions are as above any for executing miner's node
The Hash Search method for being used to dig mine described in.
The embodiment of the invention provides a kind of computer program product, the computer program product is non-easy including being stored in
Computer program on the property lost computer readable storage medium, the computer program includes program instruction, when described program refers to
When enabling by the execution of miner's node, execute miner's node described in any item for digging the Hash Search methods of mine.
In summary, on the one hand, since the corresponding cryptographic Hash to be verified of same search number is all different, Dai Lijie
Point can be to avoid same verifying work be repeated, to relatively save energy consumption.On the other hand, since miner's node is pre-
There is the cryptographic Hash to be verified of each random number, agent node is without expending a large amount of Kazakhstan to be verified calculated power and calculate each random number
Uncommon value, it is only necessary to lower calculation power can be completed to dig miner's work, therefore, can satisfy the low equipment of calculation power and participate in digging mine,
Universality is improved, makees to become more fair so that digging miner.
Device or apparatus embodiments described above is only schematical, wherein it is described as illustrated by the separation member
Unit module may or may not be physically separated, and the component shown as modular unit can be or can also
Not to be physical unit, it can it is in one place, or may be distributed on multiple network module units.It can basis
It is actual to need that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It is realized by the mode of software plus general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, above-mentioned technology
Scheme substantially in other words can be embodied in the form of software products the part that the relevant technologies contribute, the computer
Software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions to
So that computer equipment (can be personal computer, server or the network equipment etc.) execute each embodiment or
Method described in certain parts of embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;At this
It under the thinking of invention, can also be combined between the technical characteristic in above embodiments or different embodiment, step can be with
It is realized with random order, and there are many other variations of different aspect present invention as described above, for simplicity, they do not have
Have and is provided in details;Although the present invention is described in detail referring to the foregoing embodiments, the ordinary skill people of this field
Member is it is understood that it is still possible to modify the technical solutions described in the foregoing embodiments, or to part of skill
Art feature is equivalently replaced;And these are modified or replaceed, each reality of the application that it does not separate the essence of the corresponding technical solution
Apply the range of a technical solution.
Claims (10)
1. it is a kind of for digging the Hash Search method of mine, it is applied to miner's node, which is characterized in that the described method includes:
The digging mine task requests that Receiving Agent node is sent, wherein the digging mine task requests carry search number;
According to the digging mine task requests, searched out in the search space of random number corresponding to be verified with described search number
Cryptographic Hash, wherein all there is same search number between the search space of any two random number, same search number is corresponding
Cryptographic Hash to be verified is all different;
Cryptographic Hash to be verified corresponding with described search number is uploaded to the agent node, so that the agent node is according to institute
Cryptographic Hash to be verified is stated, current block is verified.
2. the method according to claim 1, wherein each miner's node is with being all corresponding with miner's wallet
Location, also, each miner's wallet address is all different;
The method also includes:
Determine the corresponding Hash seed of each cryptographic Hash to be verified, wherein the corresponding Hash kind of any two cryptographic Hash to be verified
Son is all different, and each Hash seed includes the component values being at least combined by miner's wallet address and random number;
According to each Hash seed, the cryptographic Hash to be verified of the random number is generated;
For the corresponding search number of each Hash values match to be verified, to generate the search space of the random number.
3. according to the method described in claim 2, it is characterized in that, the value range of the random number is 0-264。
4. according to the method described in claim 2, it is characterized in that, described according to each Hash seed, generate it is described with
The cryptographic Hash to be verified of machine number, comprising:
According to following syntagmatic: Hm-2Hm-3Hm-4......H2H1H0Z is combined into m-th of Hash seed, wherein m is positive whole
Number, Hm-1For m-th of cryptographic Hash, Z is the 1st Hash seed, and Z is combined by miner's wallet address and random number;
The Hash seed is made into Hash operation, generates cryptographic Hash Hm-1;
Any two cryptographic Hash is combined into the cryptographic Hash to be verified of the random number.
5. according to the method described in claim 4, it is characterized in that, described according to following syntagmatic: Hm-2Hm-3Hm- 4......H2H1H0Z is combined into m-th of Hash seed, comprising:
Judge Hm-2Hm-3Hm-4......H2H1H0Whether the data bits of Z is greater than presetting digit capacity threshold value;
If more than selection is in Hm-2Hm-3Hm-4......H2H1H0Sequence is in the data of the presetting digit capacity of forefront as m-th in Z
Hash seed;
If being less than, H is selectedm-2Hm-3Hm-4......H2H1H0Z is as m-th of Hash seed.
6. according to the method described in claim 4, it is characterized in that, described be combined into the random number for any two cryptographic Hash
Cryptographic Hash to be verified, comprising:
According to following syntagmatic:
[H0Hm-1,H2Hm-3,H4Hm-5,......Hm-6H5,Hm-4H3,Hm-2H1],
Every two cryptographic Hash to be verified is combined, to form the cryptographic Hash to be verified of the random number, wherein m is even number.
7. according to the method described in claim 2, it is characterized in that, the method also includes:
Go out same search from the search space coverage of each random number and numbers corresponding cryptographic Hash to be verified;
Same search is numbered into corresponding cryptographic Hash to be verified and random number is clustered into the search file of the same search number.
8. a kind of non-transient computer readable storage medium, which is characterized in that the non-transient computer readable storage medium is deposited
Computer executable instructions are contained, the computer executable instructions are for executing miner's node as claim 1 to 7 is any
The Hash Search method for being used to dig mine described in.
9. a kind of digging mine machine characterized by comprising
At least one processor;And
The memory being connect at least one described processor communication;Wherein, be stored with can be by described at least one for the memory
The instruction that a processor executes, described instruction is executed by least one described processor, so that at least one described processor energy
It is enough in and executes the Hash Search method as described in any one of claim 1 to 7 for being used to dig mine.
10. a kind of block catenary system characterized by comprising
Agent node;
Miner's node, miner's node and the agent node communicate;
Wherein, miner's node includes:
At least one processor;And
The memory being connect at least one described processor communication;Wherein, be stored with can be by described at least one for the memory
The instruction that a processor executes, described instruction is executed by least one described processor, so that at least one described processor energy
It is enough in and executes the Hash Search method as described in any one of claim 1 to 7 for being used to dig mine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811012239.5A CN109087105A (en) | 2018-08-31 | 2018-08-31 | For digging the Hash Search method of mine, digging mine machine and block catenary system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811012239.5A CN109087105A (en) | 2018-08-31 | 2018-08-31 | For digging the Hash Search method of mine, digging mine machine and block catenary system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109087105A true CN109087105A (en) | 2018-12-25 |
Family
ID=64840311
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811012239.5A Pending CN109087105A (en) | 2018-08-31 | 2018-08-31 | For digging the Hash Search method of mine, digging mine machine and block catenary system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109087105A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109801427A (en) * | 2019-01-28 | 2019-05-24 | 深圳市网心科技有限公司 | A kind of random number preparation method, device, system and storage medium |
CN109819025A (en) * | 2019-01-14 | 2019-05-28 | 深圳市网心科技有限公司 | A kind of block chain chain extension method, system and electronic equipment and storage medium |
CN109977166A (en) * | 2019-02-18 | 2019-07-05 | 陕西优米数据技术有限公司 | A kind of block chain common recognition mechanism |
CN110535658A (en) * | 2019-09-02 | 2019-12-03 | 紫光展锐(重庆)科技有限公司 | Block chain data processing method, apparatus and system |
CN110543488A (en) * | 2019-09-11 | 2019-12-06 | 深圳市网心科技有限公司 | Verification node updating method, device and equipment |
CN113711221A (en) * | 2019-02-15 | 2021-11-26 | 创医网络公司 | Efficient chained record access |
WO2022247069A1 (en) * | 2021-05-27 | 2022-12-01 | 南方科技大学 | Blockchain-based mining method and apparatus, and mobile terminal and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016046820A1 (en) * | 2014-09-23 | 2016-03-31 | Spondoolies Tech Ltd. | System and method for providing shared hash engines architecture for a bitcoin block chain |
CN105719185A (en) * | 2016-01-22 | 2016-06-29 | 杭州复杂美科技有限公司 | Block chain data comparison and consensus method |
CN106296191A (en) * | 2016-08-13 | 2017-01-04 | 深圳市樊溪电子有限公司 | A kind of PoW common recognition mechanism of block chain power-aware |
CN106850232A (en) * | 2017-02-28 | 2017-06-13 | 南方电网科学研究院有限责任公司 | Authorization management method and system for state maintenance |
CN107392770A (en) * | 2017-08-09 | 2017-11-24 | 北京云知科技有限公司 | A kind of random-number generating method and system based on block chain |
CN107493162A (en) * | 2017-07-25 | 2017-12-19 | 中国联合网络通信集团有限公司 | The implementation method and device of block chain node |
WO2018043865A2 (en) * | 2016-08-31 | 2018-03-08 | 서강대학교 산학협력단 | Blockchain-based file management/search system and file management/search method |
CN108234470A (en) * | 2017-12-28 | 2018-06-29 | 江苏通付盾科技有限公司 | Block packaging method and system, electronic equipment, storage medium in block chain network |
-
2018
- 2018-08-31 CN CN201811012239.5A patent/CN109087105A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016046820A1 (en) * | 2014-09-23 | 2016-03-31 | Spondoolies Tech Ltd. | System and method for providing shared hash engines architecture for a bitcoin block chain |
CN105719185A (en) * | 2016-01-22 | 2016-06-29 | 杭州复杂美科技有限公司 | Block chain data comparison and consensus method |
CN106296191A (en) * | 2016-08-13 | 2017-01-04 | 深圳市樊溪电子有限公司 | A kind of PoW common recognition mechanism of block chain power-aware |
WO2018043865A2 (en) * | 2016-08-31 | 2018-03-08 | 서강대학교 산학협력단 | Blockchain-based file management/search system and file management/search method |
CN106850232A (en) * | 2017-02-28 | 2017-06-13 | 南方电网科学研究院有限责任公司 | Authorization management method and system for state maintenance |
CN107493162A (en) * | 2017-07-25 | 2017-12-19 | 中国联合网络通信集团有限公司 | The implementation method and device of block chain node |
CN107392770A (en) * | 2017-08-09 | 2017-11-24 | 北京云知科技有限公司 | A kind of random-number generating method and system based on block chain |
CN108234470A (en) * | 2017-12-28 | 2018-06-29 | 江苏通付盾科技有限公司 | Block packaging method and system, electronic equipment, storage medium in block chain network |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109819025A (en) * | 2019-01-14 | 2019-05-28 | 深圳市网心科技有限公司 | A kind of block chain chain extension method, system and electronic equipment and storage medium |
CN109819025B (en) * | 2019-01-14 | 2020-11-06 | 深圳市网心科技有限公司 | Block chain extension method and system, electronic equipment and storage medium |
CN109801427A (en) * | 2019-01-28 | 2019-05-24 | 深圳市网心科技有限公司 | A kind of random number preparation method, device, system and storage medium |
CN113711221A (en) * | 2019-02-15 | 2021-11-26 | 创医网络公司 | Efficient chained record access |
CN109977166A (en) * | 2019-02-18 | 2019-07-05 | 陕西优米数据技术有限公司 | A kind of block chain common recognition mechanism |
CN109977166B (en) * | 2019-02-18 | 2022-12-20 | 陕西优米数据技术有限公司 | Block chain consensus mechanism |
CN110535658A (en) * | 2019-09-02 | 2019-12-03 | 紫光展锐(重庆)科技有限公司 | Block chain data processing method, apparatus and system |
CN110543488A (en) * | 2019-09-11 | 2019-12-06 | 深圳市网心科技有限公司 | Verification node updating method, device and equipment |
CN110543488B (en) * | 2019-09-11 | 2022-06-07 | 深圳市迅雷网络技术有限公司 | Verification node updating method, device and equipment |
WO2022247069A1 (en) * | 2021-05-27 | 2022-12-01 | 南方科技大学 | Blockchain-based mining method and apparatus, and mobile terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109146484A (en) | Common recognition verification method, digging mine machine and block catenary system based on block chain | |
CN109087111A (en) | Common recognition verification method, digging mine machine and block catenary system based on block chain | |
CN109242299A (en) | Distribution digs mine method, digs mine machine and block catenary system | |
CN109087105A (en) | For digging the Hash Search method of mine, digging mine machine and block catenary system | |
CN108717630B (en) | Block output method and implementation system thereof | |
CN109741039B (en) | Accounting method, mine pool server, terminal equipment, mine excavation node and mine pool | |
CN109885264B (en) | Logic slicing method and system for block chain link points | |
CN112600841B (en) | Credit record sharing method and device based on block chain and electronic equipment | |
CN108924130B (en) | Block data verification method, device, equipment and storage medium | |
CN109242491A (en) | It digs mine identity identifying method, dig mine machine and block catenary system | |
CN109242484A (en) | A kind of common recognition motivational techniques of block chain | |
CN108776929A (en) | Bill processing method, system based on block chain database and readable storage medium storing program for executing | |
CN108492183A (en) | Account trading method, system and the computer readable storage medium of block chain | |
US20200286049A1 (en) | Systems and methods of self-administered protocols on a blockchain platform | |
CN108573438A (en) | A kind of autonomous transaction system of custom power based on block chain | |
EP4318362A1 (en) | Blockchain-based data processing method, apparatus and device, and storage medium | |
CN109075964A (en) | Support the block chain of multiple one-way functions for block verifying | |
CN110855432B (en) | Asynchronous BFT & DPOS consensus mechanism for assigning verifier rewards based on verifiable random functions | |
CN110519297A (en) | A kind of data processing method and equipment based on block chain private key | |
CN112085504B (en) | Data processing method and device, computer equipment and storage medium | |
CN109255614A (en) | Digging mine method and device, digging mine machine and block catenary system based on block chain | |
CN109088722A (en) | Block chain node evolution method and block chain node | |
CN116595094A (en) | Federal learning incentive method, device, equipment and storage medium based on block chain | |
Ren et al. | Pooled mining is driving blockchains toward centralized systems | |
CN115687526A (en) | Seismic data model sharing method based on block chain and federal learning |
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 | ||
AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20211008 |
|
AD01 | Patent right deemed abandoned |