CN113746922B - Node connection method, computer device, and storage medium - Google Patents

Node connection method, computer device, and storage medium Download PDF

Info

Publication number
CN113746922B
CN113746922B CN202111033386.2A CN202111033386A CN113746922B CN 113746922 B CN113746922 B CN 113746922B CN 202111033386 A CN202111033386 A CN 202111033386A CN 113746922 B CN113746922 B CN 113746922B
Authority
CN
China
Prior art keywords
current node
node
blockchain
fuel
flow check
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111033386.2A
Other languages
Chinese (zh)
Other versions
CN113746922A (en
Inventor
李邦柱
王志文
吴思进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202111033386.2A priority Critical patent/CN113746922B/en
Publication of CN113746922A publication Critical patent/CN113746922A/en
Application granted granted Critical
Publication of CN113746922B publication Critical patent/CN113746922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The application provides a node connection method, a computer device and a storage medium, wherein the method comprises the following steps: when the current node starts the blockchain service for the first time, recharging a plurality of first fuel pass certificates to a first account of the current node; sending a first connection request to a first blockchain node, so that the first blockchain node refuses to establish connection with the current node when the first blockchain node checks that the current node does not have a first fuel passing number exceeding a first number through a fuel locking contract; and when the current node does not initially start the blockchain service and the current node is checked to have the first fuel passes exceeding the first quantity, the connection service of the current node is not started. The application reduces the jitter of the blockchain network.

Description

Node connection method, computer device, and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a node connection method, a computer device, and a storage medium.
Background
The blockchain network is in a dynamic telescopic state, and nodes can be added and withdrawn at any time. If a large number of nodes frequently exit and join the blockchain network, a great deal of uncertainty is caused to the blockchain network; particularly in the blockchain network of the slicing and the distributed storage, the exiting and the joining of the nodes can cause the reassignment of the slicing, thereby increasing the bandwidth burden of the blockchain network.
Disclosure of Invention
In view of the foregoing drawbacks or shortcomings in the art, it is desirable to provide a node connection method, computer device, and storage medium that reduces blockchain network jitter.
In a first aspect, the present application provides a node connection method applicable to a blockchain node, where the method includes:
when the current node starts the blockchain service for the first time, recharging a plurality of first fuel pass certificates to a first account of the current node; the method comprises the steps of,
transmitting a first connection request to the first blockchain node for the first blockchain node to check whether the current node has more than a first number of first fuel passes through the fuel lock contract:
if not, refusing to establish connection with the current node;
checking whether the current node has more than a first number of first fuel passes when the current node does not initially start blockchain service:
if not, the connection service of the current node is not started.
In a second aspect, the present application also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform the node connection method provided according to embodiments of the present application.
In a third aspect, the present application also provides a storage medium storing a computer program that causes a computer to execute the node connection method provided according to the embodiments of the present application.
According to the node connection method, the computer equipment and the storage medium provided by the embodiments of the application, when the current node starts the blockchain service for the first time, a plurality of first fuel certificates are recharged to a first account of the current node; sending a first connection request to a first blockchain node, so that the first blockchain node refuses to establish connection with the current node when the first blockchain node checks that the current node does not have a first fuel passing number exceeding a first number through a fuel locking contract; and when the current node does not initially start the blockchain service and the current node is checked to have no first fuel passes beyond the first quantity, the method for connecting the current node is not started, and the network jitter of the blockchain is reduced.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a node connection method according to an embodiment of the present application.
Fig. 2 is a flow chart of a preferred embodiment of the method of fig. 1.
Fig. 3 is a flow chart of another preferred embodiment of the method of fig. 1.
Fig. 4 is a flow chart of a preferred embodiment of the method of fig. 3.
Fig. 5 is a flow chart of another preferred embodiment of the method of fig. 1.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be noted that, for convenience of description, only the portions related to the application are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
Fig. 1 is a flowchart of a node connection method according to an embodiment of the present application. As shown in fig. 1, in this embodiment, the present application provides a node connection method applicable to a blockchain node, where the method includes:
s11: when the current node starts the blockchain service for the first time, recharging a plurality of first fuel pass certificates to a first account of the current node; the method comprises the steps of,
s12: transmitting a first connection request to the first blockchain node for the first blockchain node to check whether the current node has more than a first number of first fuel passes through the fuel lock contract:
if not, refusing to establish connection with the current node;
s131: checking whether the current node has more than a first number of first fuel passes when the current node does not initially start blockchain service:
if not, then step S132 is performed: the connection service of the current node is not enabled.
Specifically, S11 includes "creating a nodeID of the current node, a public-private key pair held by the current node by executing a command chainode-init command when the current node starts the blockchain service for the first time; generating a first redemption transaction and broadcasting to other blockchain nodes; wherein the first redemption transaction includes a number of second credentials of the first account; when the first exchange transaction is successfully executed, exchanging a plurality of second certificates into a corresponding number of first fuel certificates according to a first exchange proportion of the second certificates and the first fuel certificates through a fuel locking contract, and freezing the exchanged first fuel certificates, wherein checking whether the current node has more than the first number of the first fuel certificates through the fuel locking contract comprises checking whether the current node has more than the first number of the first fuel certificates through the fuel locking contract, and S131 comprises checking whether the current node has more than the first number of the first fuel certificates when the current node does not start the blockchain service for the first time;
assuming that the current node is nodeA, the first blockchain node is nodeB, the first quantity is 1000, the first fuel pass is token1, the second pass is token2, and the first exchange ratio is 1:1;
step S11 is executed by nodeA when the blockchain service is started for the first time, and a nodeID (A), a held public-private key pair (pub (A), pri (A)) are created by executing a command chainode-init command;
nodeA generates and broadcasts a redemption transaction tx1 (token 2,2000) to other blockchain nodes;
when executing tx1 successfully, node A and other blockchain nodes exchange 2000 token2 for 2000 token1 according to a fuel locking contract, and freeze the 2000 token1;
the nodeA performs step S12, and sends a connection request to the nodeB; it will be appreciated by those skilled in the art that the manner in which the nodeA finds the nodeB may be configured according to actual needs, e.g., configured such that the nodeA sends a request to the seed node seed to join the blockchain network, the seed returns the nodeB to the nodeA, the nodeA sends a connection request to the nodeB, or the blockchain has information about each blockchain node recorded thereon, the nodeA picks out the nodeB, sends a connection request to the nodeB, etc.;
the nodeB checks whether nodeA has more than 1000 token1 by the fuel lock contract:
assuming that there are more than 1000 token1 for nodeA, then nodeB establishes a connection with nodeA; it will be appreciated by those skilled in the art that the current step may also be configured according to actual requirements, for example, if there are more than 1000 token1 for nodeA, then it is determined whether the logical distance between nodeB and nodeA is less than a certain value: if yes, the nodeB establishes connection with the nodeA;
assuming that there are not more than 1000 token1 for nodeA, then nodeB refuses to establish a connection with nodeA;
performing step S131 when the NODEA does not start the blockchain service for the first time, and checking whether the NODEA has more than 1000 token1; it will be appreciated by those skilled in the art that the manner of checking whether there are more than 1000 token1 for nodeA may be configured according to actual needs, e.g., configured to check whether there are more than 1000 token1 for nodeA by seed node seed; alternatively, checking, by the centralized server, whether there are more than 1000 token1 s or the like for nodeA;
assuming that nodeA has more than 1000 token1, nodeA enables connectivity services; those skilled in the art will appreciate that at this point nodeA may continue to establish connections with blockchain nodes (e.g., nodeB) that have previously been established, or seek to establish connections with new blockchain nodes (e.g., nodeC);
assuming that there are not more than 1000 token 1S for nodeA, nodeA performs step S132 without enabling the connection service.
In more embodiments, the first quantity and the first conversion ratio may be configured according to actual requirements, so that the same technical effects may be achieved.
In more embodiments, S11 may be further configured according to actual requirements, for example, configured to generate a first recharging transaction and broadcast the first recharging transaction to other blockchain nodes when the current node starts the blockchain service for the first time, and recharge a plurality of first fuel certificates to the first account when the first recharging transaction is successfully executed, so that the same technical effects can be achieved.
The above embodiments reduce the jitter of the blockchain network and ensure the safe operation of the blockchain network.
Fig. 2 is a flow chart of a preferred embodiment of the method of fig. 1. As shown in fig. 2, in a preferred embodiment, step S11 includes:
s112: when the current node starts the blockchain service for the first time, generating a first exchange transaction and broadcasting the first exchange transaction to other blockchain nodes; wherein the first redemption transaction includes a number of second credentials of the first account;
s114: when the first exchange transaction is successfully executed, exchanging a plurality of second certificates into a corresponding number of first fuel certificates according to a first exchange proportion of the second certificates and the first fuel certificates through a fuel locking contract, and freezing the exchanged first fuel certificates;
checking whether the current node has more than a first number of first fuel passes by the fuel lock contract includes:
checking whether the current node is frozen with more than a first number of first fuel pass certificates through a fuel lock contract;
step S131 includes:
s1311: when the current node does not start the blockchain service for the first time, whether the current node is frozen with more than a first number of first fuel passes or not is checked.
The node connection principle of the above embodiment may refer to the method shown in fig. 1, and will not be described herein.
Fig. 3 is a flow chart of another preferred embodiment of the method of fig. 1. In a preferred embodiment, as shown in fig. 3, the method further comprises:
the following operations are performed at intervals of a first time length:
s14: counting a first data amount transmitted to a first blockchain node in a first time period, signing the first data amount to generate an incomplete first flow check and transmitting the incomplete first flow check to the first blockchain node for the first blockchain node to:
verifying whether the first data amount in the incomplete first flow check is authentic:
if so, signing the incomplete first flow check to generate a complete first flow check and returning;
s15: generating a first flow check transaction from the complete first flow check and broadcasting to other blockchain nodes;
s16: when a first flow check transaction is successfully performed by the fuel lock contract, the complete first flow check is stored by the fuel lock contract.
Specifically, when the first data volume is verified to be not true, disconnecting the current node; when receiving a connection request sent by the current node subsequently, refusing to establish connection with the current node;
the nodeA performs the following operations every first time length:
step S14 is performed by nodeA, which counts the data amount (assuming ToB: sendTotal:10 MB) sent to nodeB in the first time period, signs the data amount to generate incomplete flow checks "to B10 MB, signA (B, 10M)", and sends "to B10 MB, pri (a). Sign (B, 10M)";
nodeB verifies whether the data size 10M in "to B10 MB, signA (B, 10M)" is authentic:
assuming true, sign "to B10 MB, signA (B, 10M)" to generate a complete flow check "verify: signB (B, 10M)), signA (B, 10M) and return;
if not, disconnecting the connection with nodeA; when receiving a connection request sent by the nodeA subsequently, refusing to establish connection with the nodeA; it will be appreciated by those skilled in the art that the hypothetical unrealistic operation could also be configured according to the actual requirements, e.g. to disconnect from nodeA, or to return error information to nodeA, etc.;
nodeA performs step S15, generating a flow check transaction tx2 from "verify: sign B (B, 10M), sign a (B, 10M) and broadcasting to other blockchain nodes;
the nodeA and other blockchain nodes execute step S16 upon successful execution of tx2 by the fuel lock contract, storing "verify: sign B (B, 10M)), sign na (B, 10M)", by the fuel lock contract.
In more embodiments, the generating manner of the incomplete first flow check may be further configured according to actual requirements, for example, configured to count a first data amount sent to the first blockchain node in the first period of time, receive a second data amount returned by the first blockchain node, sign the first data amount and the second data amount to generate the incomplete first flow check, and correspondingly, the first blockchain node should verify whether the second data amount in the incomplete first flow check is true, and generate the complete first flow check and return the complete first flow check when both the first data amount and the second data amount are true.
Fig. 4 is a flow chart of a preferred embodiment of the method of fig. 3. In a preferred embodiment, as shown in fig. 4, the method further comprises:
s17: generating a first flow check redemption request transaction and broadcasting to other blockchain nodes; wherein the first flow check redemption request transaction includes a nodeId of the first blockchain node;
s18: clearing each unsettled complete first-volume check and each unsettled complete second-volume check according to a pre-configured check clearing rule through the fuel locking contract; wherein the complete second flow check is stored by the fuel lock contract when the second flow check transaction is successfully executed by the fuel lock contract, the second flow check transaction is generated by the first blockchain node from the complete second flow check, the complete second flow check is generated by the current node signing the incomplete second flow check in real time as the second data amount in the incomplete second flow check is verified by the current node, the incomplete second flow check is generated by the first blockchain node counting the second data amount sent to the current node within the first time period.
Specifically, take check settlement rules as an example of paying 1 token1 for every 10M received; assume that the complete flow check that is not currently settled is: "verify: signB (B, 10M)), signA (B, 10M), and" verify: signA (SignB (A, 20M)), signB (A, 20M); at this time, there are 1000 token1 for each of nodeA and nodeB;
nodeA performs step S17 to generate a flow check redemption request transaction tx3 and broadcast to other blockchain nodes; wherein tx3 comprises the nodeId of nodeB;
step S18 is performed by the nodeA and other blockchain nodes, 2 token1 of nodeA are subtracted and transferred to nodeB, and 1 token1 of nodeB is subtracted and transferred to nodeA.
At this point there were 999 notes 1 for nodeA and 1001 for nodeB.
At this point, the remaining token1 for nodeA is less than 1000, and if nodeA wants to establish a connection with another blockchain node (e.g., nodeD) again without restarting blockchain service, it will be rejected by the other blockchain node.
In more embodiments, the check settlement rules are not limited to the above examples, and may be configured according to actual requirements, so as to achieve the same technical effects.
Assume that there is a first scenario as follows:
the token1 on nodeA is always more than 1000, but nodeA is still frequently on-line and off-line, which still causes blockchain network jitter.
The problem created by the first scenario described above may be solved by the method shown in fig. 5.
Fig. 5 is a flow chart of another preferred embodiment of the method of fig. 1. In a preferred embodiment, as shown in fig. 5, the method further comprises:
s191: generating a first public parameter according to the random character string and the second duration; wherein the first common parameters include a first calculation parameter and a first verification parameter;
s192: generating first input data according to a first moment appointed by the current node and a first blockchain node;
s193: calculating first output data and first proving data according to the first calculation parameters and the first input data;
s194: generating a first VDF certificate according to the first verification parameter, the first input data, the first output data and the first certificate data;
s195: sending a second connection request including the first validation parameter, the first output data, the first attestation data, and the first VDF attestation to the second blockchain node for the second blockchain node to:
verifying whether the first VDF certificate is correct based on the first verification parameter, the first input data, the first output data, the first certificate data:
if not, refusing to establish connection with the current node;
if yes, then establish connection with the current node.
Specifically, step S192 includes "receiving second signature data sent by the first blockchain node; the second signature data is obtained by signing the Pid of the first blockchain node, the Pid of the current node and the first moment agreed by the current node and the first blockchain node by the private key of the first blockchain node; calculating first input data according to the Pid of the current node, the second signature data and the first time, and signing the Pid of the current node, the Pid of the first blockchain node and the first time according to the private key of the current node to obtain first signature data; sending the first signature data to a first blockchain node "as an example;
step S191 is executed by nodeA, and a public parameter pp is generated according to the random character string lambda and the second duration t; pp comprises a calculation parameter ek and a verification parameter vk;
the nodeA executes step S192 to receive signature data sign b (pidb+pida+timestamp) transmitted by the nodeB;
nodeA calculates input data x from PidA, the signature data, and timestamp, x=pida+sign b (pidb+pida+timestamp) +timestamp;
nodeA performs step S193 of calculating output data y and proof data pi, i.e., eval (ek, x) → (y, pi), from the calculation parameter ek, the input data x;
step S194 is executed by nodeA to generate VDF certification Verify (vk, x, y, pi) from the verification parameter vk, the input data x, the output data y, and the certification data pi;
the nodeA performs step S195, and sends a connection request including the verification parameter vk, the output data y, the proof data pi, and the Verify (vk, x, y, pi) to the nodeE;
the nodeE verifies whether the Verify (vk, x, y, pi) is correct or not according to the verification parameters vk, the input data x, the output data y and the proof data pi, namely { accept, reject } Verify (vk, x, y, pi);
if the verification fails, refusing to establish connection with nodeA;
the nodeA calculates the data signA (PidA+PidB+timestamp) and sends the signA (PidA+PidB+timestamp) to the nodeB for the nodeB to generate VDF evidence of the nodeB in the same way, and the VDF evidence of the nodeB is used for being verified by other blockchain nodes when the nodeB subsequently establishes connection with other blockchain nodes, and establishes connection with the nodeB when the verification is correct.
Note that, because x=pida+sign b+time stamp, sign b=sign (pidb+pida+time stamp), when nodeE receives a connection request, the pidA at the head is removed from the time stamp, so that sign B is obtained, and the verifySign (pidb+pida+time stamp, sign B) is used as the pass (B) to verify sign B, so that data forgery is prevented.
Those skilled in the art can also configure assumptions to verify proper operation based on actual requirements, such as, for example, by a fuel lock contract checking that nodeA has more than a first number of first fuel passes: if yes, establishing connection with nodeA; or checking by the fuel lock contract whether nodeA has more than a first number of first fuel pass: if so, then a connection is established with nodeA if the logical distance between nodeE and nodeA is less than a certain value, etc.
In more embodiments, S192 may be further configured according to actual requirements, for example, configured that nodeA receives signature data sign B (Pub (B) +pub (a) +timestamp) sent by nodeB; nodeA calculates input data x from Pub (A), the signature data, and the timestamp, where x=Pub (A) +sign B (Pub (B) +Pub (A) +timestamp, and the like; correspondingly, the nodeA also needs to generate signature data sign NA (Pub (A) +Pub (B) +timestamp) and send the sign NA (Pub (A) +Pub (B) +timestamp) to the nodeB, so that the nodeB can achieve the same technical effect by using the same method to generate VDF of the nodeB.
In the above embodiment, since nodeA needs to be continuously connected with nodeB for t to calculate VDF certification that can be verified by other blockchain link points, thus making nodeA continuously online, the above embodiment further reduces blockchain network jitter.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
As shown in fig. 6, as another aspect, the present application also provides a computer device including one or more Central Processing Units (CPUs) 601 which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage part 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the computer device are also stored. The CPU601, ROM602, and RAM603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
In particular, according to embodiments of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611.
As still another aspect, the present application also provides a computer-readable storage medium, which may be a computer-readable storage medium contained in the apparatus of the above-described embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a computer device. The computer-readable storage medium stores one or more programs for use by one or more processors to perform the methods described herein.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules involved in the embodiments of the present application may be implemented in software or in hardware. The described units or modules may also be provided in a processor, for example, each of the units may be a software program provided in a computer or a mobile smart device, or may be separately configured hardware devices. Wherein the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
The above description is only illustrative of the preferred embodiments of the present application and of the principles of the technology employed. It will be appreciated by persons skilled in the art that the scope of the application referred to in the present application is not limited to the specific combinations of the technical features described above, but also covers other technical features formed by any combination of the technical features described above or their equivalents without departing from the spirit of the application. Such as the above-mentioned features and the technical features disclosed in the present application (but not limited to) having similar functions are replaced with each other.

Claims (10)

1. A method of node attachment for a blockchain node, the method comprising:
when the current node starts the blockchain service for the first time, recharging a plurality of first fuel pass certificates to a first account of the current node; the method comprises the steps of,
transmitting a first connection request to a first blockchain node for the first blockchain node to check whether the current node has more than a first number of the first fuel pass through certificates by a fuel lock contract:
if not, refusing to establish connection with the current node;
checking whether the current node has more than the first number of the first fuel pass credentials when the current node does not initially start blockchain service:
if not, the connection service of the current node is not started.
2. The method of claim 1, wherein recharging the number of first fuel passes to the first account of the current node comprises:
generating a first redemption transaction and broadcasting to other blockchain nodes; wherein the first redemption transaction includes a number of second credentials of the first account;
when the first exchange transaction is successfully executed, exchanging the plurality of second certificates into corresponding numbers of first fuel certificates through the fuel locking contract according to a first exchange proportion of the second certificates and the first fuel certificates, and freezing the exchanged first fuel certificates;
said checking whether the current node has more than a first number of said first fuel passes by the fuel lock contract comprises:
checking whether the current node is frozen with more than the first number of the first fuel pass through the fuel lock contract;
said checking whether the current node has more than said first number of said first fuel passes comprises:
checking whether the current node is frozen with more than the first number of the first fuel pass.
3. The method of claim 1 or 2, wherein the recharging the number of first fuel passes to the first account of the current node comprises:
creating a nodeID of the current node and a public-private key pair held by the current node by executing a command chainode-init command;
and recharging a plurality of first fuel pass certificates to the first account of the current node.
4. The method as recited in claim 1, further comprising:
the following operations are performed at intervals of a first time length:
counting a first data amount transmitted to the first blockchain node in the first time period, signing the first data amount to generate an incomplete first flow check and transmitting the incomplete first flow check to the first blockchain node for the first blockchain node to:
verifying whether a first amount of data in the incomplete first flow check is authentic:
if so, signing the incomplete first flow check to generate a complete first flow check and returning;
generating a first flow check transaction from the complete first flow check and broadcasting to other blockchain nodes;
storing the complete first flow check by the fuel lock contract upon successful execution of the first flow check transaction by the fuel lock contract.
5. The method as recited in claim 4, further comprising:
disconnecting the connection with the current node when the first data volume is verified to be not true; the method comprises the steps of,
and refusing to establish connection with the current node when receiving a connection request sent by the current node subsequently.
6. The method according to claim 4 or 5, further comprising:
generating a first flow check redemption request transaction and broadcasting to other blockchain nodes; wherein the first flow check redemption request transaction includes a nodeId of the first blockchain node;
clearing each complete first flow check which is not settled and each complete second flow check which is not settled according to a preset check settlement rule through the fuel locking contract; wherein the complete second flow check is stored by a fuel lock contract when a second flow check transaction is successfully executed by the fuel lock contract, the second flow check transaction is generated by the first blockchain node according to the complete second flow check, the complete second flow check is generated by signing an incomplete second flow check by a current node when a second data amount in the incomplete second flow check is verified by the current node, and the incomplete second flow check is generated by the first blockchain node counting a second data amount sent to the current node in the first time period.
7. The method as recited in claim 1, further comprising:
generating a first public parameter according to the random character string and the second duration; wherein the first common parameters include a first calculation parameter and a first verification parameter;
generating first input data according to a first moment appointed by a current node and the first blockchain node;
calculating first output data and first proving data according to the first calculation parameters and the first input data;
generating a first VDF credential according to the first verification parameter, the first input data, the first output data, the first credential data;
sending a second connection request including the first validation parameter, the first output data, the first attestation data, and the first VDF attestation to a second blockchain node for the second blockchain node:
verifying whether the first VDF certificate is correct based on the first verification parameter, the first input data, the first output data, the first certificate data:
and if not, refusing to establish connection with the current node.
8. The method of claim 7, wherein the generating the first input data based on the first time instant agreed upon by the current node and the first blockchain node comprises:
receiving second signature data sent by the first blockchain node; the second signature data is obtained by signing the Pid of the first blockchain node, the Pid of the current node, and the first moment appointed by the current node and the first blockchain node by the private key of the first blockchain node;
calculating first input data according to the Pid of the current node, the second signature data and the first moment;
the method further comprises the steps of:
signing the Pid of the current node, the Pid of the first blockchain node and the first moment according to the private key of the current node to obtain first signature data;
the first signature data is sent to the first blockchain node.
9. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-8.
10. A storage medium storing a computer program, which when executed by a processor implements the method of any one of claims 1-8.
CN202111033386.2A 2021-09-03 2021-09-03 Node connection method, computer device, and storage medium Active CN113746922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111033386.2A CN113746922B (en) 2021-09-03 2021-09-03 Node connection method, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111033386.2A CN113746922B (en) 2021-09-03 2021-09-03 Node connection method, computer device, and storage medium

Publications (2)

Publication Number Publication Date
CN113746922A CN113746922A (en) 2021-12-03
CN113746922B true CN113746922B (en) 2023-10-20

Family

ID=78735591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111033386.2A Active CN113746922B (en) 2021-09-03 2021-09-03 Node connection method, computer device, and storage medium

Country Status (1)

Country Link
CN (1) CN113746922B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015143068A1 (en) * 2014-03-18 2015-09-24 nTrust Technology Solutions Corp. Virtual currency system
CN107040585A (en) * 2017-02-22 2017-08-11 阿里巴巴集团控股有限公司 A kind of method and device of business verification
CN109409885A (en) * 2018-10-29 2019-03-01 深圳声笑科技有限公司 Across chain method of commerce, device and storage medium on block chain
WO2019195755A1 (en) * 2018-04-05 2019-10-10 Neji, Inc. Network protocol for blockchain based network packets
WO2020010270A1 (en) * 2018-07-04 2020-01-09 Neji, Inc. Dynamic routing using a distributed hash table
CN111383110A (en) * 2020-01-04 2020-07-07 天津金农企业管理咨询合伙企业(有限合伙) Cross-block-chain evidence transfer method and device and hardware equipment
CN112883435A (en) * 2021-04-12 2021-06-01 北京飞天数科科技有限公司 Method and equipment for realizing safe communication with intelligent contract
CN113190812A (en) * 2021-05-24 2021-07-30 中国工商银行股份有限公司 Login method, system, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10642967B2 (en) * 2017-11-28 2020-05-05 American Express Travel Related Services Company, Inc. Single sign-on solution using blockchain
US20210073913A1 (en) * 2019-09-06 2021-03-11 Bosonic, Inc. System and method of providing a block chain-based recordation process

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015143068A1 (en) * 2014-03-18 2015-09-24 nTrust Technology Solutions Corp. Virtual currency system
CN107040585A (en) * 2017-02-22 2017-08-11 阿里巴巴集团控股有限公司 A kind of method and device of business verification
WO2019195755A1 (en) * 2018-04-05 2019-10-10 Neji, Inc. Network protocol for blockchain based network packets
WO2020010270A1 (en) * 2018-07-04 2020-01-09 Neji, Inc. Dynamic routing using a distributed hash table
CN109409885A (en) * 2018-10-29 2019-03-01 深圳声笑科技有限公司 Across chain method of commerce, device and storage medium on block chain
CN111383110A (en) * 2020-01-04 2020-07-07 天津金农企业管理咨询合伙企业(有限合伙) Cross-block-chain evidence transfer method and device and hardware equipment
CN112883435A (en) * 2021-04-12 2021-06-01 北京飞天数科科技有限公司 Method and equipment for realizing safe communication with intelligent contract
CN113190812A (en) * 2021-05-24 2021-07-30 中国工商银行股份有限公司 Login method, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113746922A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
EP3249599A1 (en) Blockchain-based system, and electronic apparatus and method in the system
Kiayias et al. A composable security treatment of the lightning network
CN112541758A (en) Multi-round voting type fault-tolerant sequencing consensus mechanism and method based on block chain
KR20200141502A (en) Computer-implemented systems and methods suitable for increasing the security of immediate offline blockchain transactions
CN111640017A (en) Transaction correctness verification method and device applied to alliance chain cross-chain transfer
CN112287031B (en) Data synchronization method and device of block chain system, readable medium and electronic equipment
CN112000744A (en) Signature method and related equipment
CN114567643B (en) Cross-blockchain data transfer method, device and related equipment
CN110910000A (en) Block chain asset management method and device
CN113079000A (en) Consensus method based on verifiable quantum random number
CN116150260A (en) Data processing method, device, medium and electronic equipment of block chain system
KR100815072B1 (en) Electronic value exchange system and electronic value exchange method
CN112565370B (en) Method and system for verifying calculation result based on wireless communication and block chain scene
CN113746922B (en) Node connection method, computer device, and storage medium
CN112184228B (en) Asset exchange method, device and storage medium
CN115244526A (en) Method and system for decentralized transaction communication protocols
CN109272318B (en) Resource flow transaction method, device, equipment and medium applied to requester client
CN117221337A (en) Block chain consensus method, device, medium and electronic equipment
CN116186786A (en) Block chain-based service processing method and device, electronic equipment and readable medium
US6978372B1 (en) Verification of correct exponentiation or other operations in cryptographic applications
CN116186749A (en) Block chain-based service processing method and device, electronic equipment and readable medium
CN111524011B (en) Parallel link consensus validation method, apparatus, and storage medium
CN116233139A (en) Data processing method, device, medium and electronic equipment of block chain system
US20200402091A1 (en) Method for automatically providing cryptocurrency to recommender using propagation on sns
CN115115360A (en) Cross-chain resource transfer method, device, medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant