CN111131298A - POC (Point of sale) efficient consensus mechanism based on credit decentralization and implementation method - Google Patents

POC (Point of sale) efficient consensus mechanism based on credit decentralization and implementation method Download PDF

Info

Publication number
CN111131298A
CN111131298A CN201911405979.XA CN201911405979A CN111131298A CN 111131298 A CN111131298 A CN 111131298A CN 201911405979 A CN201911405979 A CN 201911405979A CN 111131298 A CN111131298 A CN 111131298A
Authority
CN
China
Prior art keywords
node
consensus
credit
poc
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911405979.XA
Other languages
Chinese (zh)
Inventor
杨霖
王志坚
冉小波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Prophecy Machine Chongqing Technology Co Ltd
Original Assignee
Prophecy Machine Chongqing 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 Prophecy Machine Chongqing Technology Co Ltd filed Critical Prophecy Machine Chongqing Technology Co Ltd
Priority to CN201911405979.XA priority Critical patent/CN111131298A/en
Publication of CN111131298A publication Critical patent/CN111131298A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/105Multiple levels of security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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 invention relates to the technical field of block chains, and provides a POC (Point of sale) efficient consensus mechanism based on credit decentralized and an implementation method, which comprises the following steps: s1, node election, S2, round calculation, S3, block packaging, including two steps of calculation of reward and credit calculation, S31, calculation of reward, S32, credit calculation, S4, block synchronization, S5 and height updating, wherein after all steps are completed, the height updating is carried out, and the next cycle is started. An efficient, decentralized, nationwide participation, fair and nationwide revenue consensus mechanism is created through POC.

Description

POC (Point of sale) efficient consensus mechanism based on credit decentralization and implementation method
Technical Field
The invention relates to the technical field of block chains, in particular to a POC (Point of sale) efficient consensus mechanism based on credit decentralized and an implementation method thereof.
Background
The consensus mechanism is one of core technologies of the blockchain, and is used for realizing verification of transactions and blocks in an asynchronous distributed network, achieving network-wide consensus and guaranteeing validity and uniqueness of a blockchain account book. The key issue is to determine a unique tile generator for each tile period in an asynchronous distributed network. The common identification mechanism based on the workload certification (POW) is a first block chain common identification mechanism and is applied to a bitcoin system. POW sets a Hash challenge based on asymmetric cryptography. The Hash problem solved by the computer needs a large amount of complex calculation, and the answer is not easy to obtain; but the correctness verification of the answer can be done quickly. Based on the block chain of the POW, users of the block chain strive for block generation weight by competing for solving the Hash problem. The first user obtaining the Hash solution unpacks the obtained user in a block and sends the user to other users for verification; if the verification is passed, the block is approved by other users, and the user is approved by other users as a block generator. Then, since the POW consensus process consumes a lot of computing resources and electric energy and is not environment-friendly, the consensus mechanism is developing towards the rights and interests (POS). Proof of authority (POA) is a consensus protocol developed by the etherhouse foundation that votes a series of users as control nodes for block generation, but does not give criteria for authorized node election, and lacks behavioral constraints on authorized nodes; trust value attestation (POT) is a consensus protocol based on trust value evaluation, which selects users satisfying certain trust conditions as block generation nodes, but the protocol lacks the constraint on trust nodes and does not provide the necessary conditions for disqualifying authorized nodes. The consensus mechanism is still one of the technical problems that needs to be overcome in the field of block chaining.
The defects in the prior art include that 1, resources are wasted: POW needs to rely on a large amount of computation to compete for the right to maintain the blocks, but these cloud computations actually do not generate any value, which is a waste of resources; 2. centralized risk: because computing power (computing power of a computer) and assets can be concentrated in a few individuals or a group of hands, the POS mechanism and the POW mechanism are difficult to truly decentralize, and the core idea of a block chain is violated; 3. difficulty of whole member participation: the POW algorithm can only be realized by purchasing a special mining machine to participate in network maintenance, a POS (point of sale) needs to pull a great number of votes, and a DPOS (distributed processing system) needs a super server and asset voting, so that the participation of all members is difficult to realize; 4. fairness: most consensus algorithms do not participate fairly in network maintenance and asset allocation.
Disclosure of Invention
The invention aims to provide a credit decentralized POC (public communications over cellular) efficient consensus mechanism and a realization method thereof, and the POC is used for creating an efficient decentralized POC consensus mechanism, a nationwide participation mechanism, a fairness mechanism and a nationwide income mechanism.
The invention provides a POC (Point of sale) efficient consensus mechanism based on credit decentralization and an implementation method, which comprises the following steps:
s1, selecting the node,
the method is characterized in that: the two participation modes comprise node creation and entrusting, and thresholds are respectively set in the two modes, so that high-efficiency performance and decentralization are guaranteed;
s2, calculating the times in turn,
the round consists of a start time and a member list, the start time of the current round is determined according to the end time of the previous round, round members are determined forward from the transaction in the first block of the previous round, and the round calculation difference caused by the incomplete synchronization of the blocks with nodes is avoided; the method is characterized in that: distributed consistency, even if synchronization is not completed to a high degree, the list and order of the next round can be completely calculated.
And S3, packaging the block, including calculating reward and credit calculation,
s31, calculating the reward
Calculating the reward value of generating a block according to the total reward amount and other configuration parameters within a certain time; the method is characterized in that: in relation to the credit value, a bad credit awards the loss to a good credit node.
S32, credit calculation
The credit is the honesty coefficient of the account in the system, the credit of all accounts is in the interval [ -1,1], and the credit is automatically calculated through a credit rating algorithm formula; the method is characterized in that: and (4) submitting penalty records to nodes with poor capability by distinguishing contributors and destructitors of network maintenance.
S4, block synchronization
The method is characterized in that: and (4) broadcasting the whole network by block head + system transaction, and finishing the assembly and verification of the block by each node. The network transmission flow is greatly saved.
S5, height updating
After all the steps are finished, the height is updated, and the next cycle is started. The "height" described herein is an attribute of the block chain, and is abbreviated as block height. The blocks are linked together by a rule to form a block chain, the default height of the starting block is 0, the height of the next block is 1, and so on (the rule of the block chain is that the system only recognizes the block chain with the longest length). Examples are: the height of a certain block is 386357, which means that the number of chain blocks from the created block to the current block is 386357+ 1. The tile height may be used to identify the location of the tile in the blockchain and from this find all the underlying attributes and transaction records associated with this tile.
The POC (proof Of credit) consensus mechanism starts from the fusion Of DPOS and POS mechanism, and combines the main assets Of block chain to realize the maintenance Of network. The efficient DPOS and POS reward distribution mechanism is reserved, and an efficient, decentralized, safe and stable block chain consensus algorithm is realized. The POC judges the credit value of a node according to the capability of the consensus node and the quality of the responsibility, and when the node acts maliciously, the POC carries out punishment on the node, including reducing the reward proportion and even playing the mode of locking the guarantee fund of the consensus network, thereby ensuring the stability and the high efficiency of the consensus node. POC consensus involves multiple roles, with different roles having different roles, and involves security of the consensus accounts through separation of roles of creators and packagers.
The invention discloses a POC (PTT over cellular) efficient consensus mechanism based on credit decentralization and an implementation method thereof, which have the beneficial effects that: the high efficiency and decentralization of a block chain consensus algorithm are ensured by utilizing the high efficiency consensus mechanism of POC;
1. high efficiency and decentralization: through node election in step S1, the two participation modes ensure efficient performance and decentralization.
2. Fairness: and packaging blocks in the step S3 to ensure that the calculation modes of the credit coefficients of all accounts are consistent, and the reward and punishment systems are also ensured to be consistent, thereby ensuring the fairness of all accounts.
3. All account participation and joint revenue: according to the round calculation, block packaging and block synchronization of the steps S2, S3 and S4, the participation and income of the account in the whole POC common recognition mechanism are more fair and fair, and a good mechanism of the whole people participation and the whole people income is established.
Drawings
Fig. 1 is a flowchart of a POC efficient consensus mechanism based on credit decentralization and an implementation method thereof according to an embodiment of the present invention.
Detailed Description
The POC efficient consensus mechanism based on credit decentralization and the implementation method of the present invention are further described with reference to the accompanying drawings and specific embodiments. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
The first embodiment is as follows:
as shown in fig. 1, the POC efficient consensus mechanism based on credit decentralization and the implementation method provided by the present invention include:
s1, node election
The method is characterized in that: the two participation modes comprise node creation and entrusting, and thresholds are respectively set in the two modes, so that high-efficiency performance and decentralization are guaranteed;
s2, round calculation
The round consists of a start time and a member list, the start time of the current round is determined according to the end time of the previous round, round members are determined forward from the transaction in the first block of the previous round, and the round calculation difference caused by the incomplete synchronization of the blocks with nodes is avoided; the method is characterized in that: distributed consistency, even if synchronization is not completed to a high degree, the list and order of the next round can be completely calculated.
S3, packaging to obtain blocks
S31, calculating the reward
Calculating the reward value of generating a block according to the total reward amount and other configuration parameters within a certain time; the method is characterized in that: in relation to the credit value, a bad credit awards the loss to a good credit node.
S32, credit calculation
The credit is the honesty coefficient of the account in the system, the credit of all accounts is in the interval [ -1,1], and the credit is automatically calculated through a credit rating algorithm formula; the method is characterized in that: and (4) submitting penalty records to nodes with poor capability by distinguishing contributors and destructitors of network maintenance.
S4, block synchronization
The method is characterized in that: and (4) broadcasting the whole network by block head + system transaction, and finishing the assembly and verification of the block by each node. The network transmission flow is greatly saved.
S5, height updating
After all the steps are finished, the height is updated, and the next cycle is started. The "height" described herein is an attribute of the block chain, and is abbreviated as block height. The blocks are linked together by a rule to form a block chain, the default height of the starting block is 0, the height of the next block is 1, and so on (the rule of the block chain is that the system only recognizes the block chain with the longest length). Examples are: the height of a certain block is 386357, which means that the number of chain blocks from the created block to the current block is 386357+ 1. The tile height may be used to identify the location of the tile in the blockchain and from this find all the underlying attributes and transaction records associated with this tile.
The POC (proof Of credit) consensus mechanism starts from the fusion Of DPOS and POS mechanism, and combines the main assets Of block chain to realize the maintenance Of network. The efficient DPOS and POS reward distribution mechanism is reserved, and an efficient, decentralized, safe and stable block chain consensus algorithm is realized. The POC judges the credit value of a node according to the capability of the consensus node and the quality of the responsibility, and when the node acts maliciously, the POC carries out punishment on the node, including reducing the reward proportion and even playing the mode of locking the guarantee fund of the consensus network, thereby ensuring the stability and the high efficiency of the consensus node. POC consensus involves multiple roles, with different roles having different roles, and involves security of the consensus accounts through separation of roles of creators and packagers.
The invention discloses a POC (PTT over cellular) efficient consensus mechanism based on credit decentralization and an implementation method thereof, which have the beneficial effects that: the high efficiency and decentralization of a block chain consensus algorithm are ensured by utilizing the high efficiency consensus mechanism of POC;
1. high efficiency and decentralization: through node election in step S1, the two participation modes ensure efficient performance and decentralization.
2. Fairness: and packaging blocks in the step S3 to ensure that the calculation modes of the credit coefficients of all accounts are consistent, and the reward and punishment systems are also ensured to be consistent, thereby ensuring the fairness of all accounts.
3. All account participation and joint revenue: according to the round calculation, block packaging and block synchronization of the steps S2, S3 and S4, the participation and income of the account in the whole POC common recognition mechanism are more fair and fair, and a good mechanism of the whole people participation and the whole people income is established.
The POC consensus mechanism includes four roles, respectively node creator, principal, packager and rewarding person,
the method comprises the steps that a consensus node creator initiates a transaction for creating consensus nodes, records the transaction into a blockchain and tells all people to make consensus nodes, the basic condition of the node creation is that a certain number of TOKEN are required to be locked, and no red punishment record exists, and the purpose of setting the basic condition is to prove that an account is truly realistic and a blockchain basic network is required to be maintained;
the method comprises the following steps that a packager can be designated by an agent when a consensus node is created, the packager can be other accounts of the packager and can also be friends with technology, most importantly, the packager does not hold any NULS, even if a server participating in consensus is attacked by a hacker, a user does not have huge loss which is only influenced by the benefits after the attack, the packager needs to be noticed that the packager is an account which really produces blocks, and a block signature is needed after each block packaging, so that the packaged account does not need to be provided with a password;
the agent can not only specify a packing person but also specify a beneficiary when creating the consensus node, and specify who can obtain the reward produced by the consensus;
the trustee and the NULS holder can delegate the NULS held by the trustee to the agent for consensus according to the credit value condition of the agent and the influence factor of the agent, and can enjoy corresponding consensus income.
The network model set in the POC consensus mechanism is a double-layer network model, the double-layer network model comprises a core consensus network and a block chain complete network, the complete network consists of consensus nodes and common nodes, all the nodes are equal and have no function or authority distinction, the core consensus network consists of the consensus nodes, on the basis of the common nodes, the core consensus network is responsible for maintaining block chain data when the nodes are guided in a node program and recognize a packing address, and the packing address is in the current packing round, and blocks are packed in turn according to the POC consensus service logic.
The light node, the app end and other user terminals initiate a transaction, which must reach the node of the core consensus network in a network transmission manner, and the transaction is packaged and confirmed.
The first step of participating in the maintenance of the consensus network is to create a consensus node, in the design of POC, an asset threshold is set for creating the consensus node, and the qualification of the registered node can be obtained only by locking a certain number of assets; after the nodes are successfully created, the nodes cannot join the consensus network immediately to perform block packing operation, and a certain amount of entrusts are required to be obtained to prove that all network members can participate in block packing with certain influence.
Any person holding the block chain assets can select the node to delegate, wherein the delegation is a mode of proving trust, and when one person delegates the own right to one node, the node is proved to be trusted; each entrusting has a separate record, the revoking operation can be carried out at any time, and entrusting transaction needs to lock assets with corresponding quantity; the total entrusting amount of each node is set with an upper limit, and the condition that the total entrusting amount exceeds the upper limit is not allowed to occur, namely when one entrusting is successful, the total entrusting amount in the node exceeds the upper limit, and the entrusting cannot be confirmed.
This is done to avoid the rationality of the number of nodes, both to ensure decentralization of the network with enough nodes and to ensure high performance of the blockchain network.
And (3) revocation: and (4) canceling the entrusting operation for each confirmed entrusting transaction, wherein after the entrusting is cancelled, the entrusting sum of the nodes is reduced, and the entrusting can be moved out of the consensus nodes. After the delegation is cancelled, the corresponding delegation asset will be unlocked to become available.
Stopping the node: the node creator can stop the operation of the node at any time for the node in any state. The deposit of the creator when stopping the node will be locked for a period of time to be used as a punishment for destroying the stability of the consensus network, and meanwhile, the repeated operation of the node is avoided. All delegated assets delegated to the stop node will be unlocked immediately upon stopping the node, and the available state will be restored.
The calculation of the reward is divided into two parts: one of them is the configuration parameter, and the other is the configuration parameter,
# total award quantity totalInflationAmount;
# initial award amount inflationatmospheric over interval;
# inflation Start calculation time (unit: S) initTime;
a # pantographion ratio (set to 100 if there is no pantographion);
the # puncture interval time (unit: S) deflationTimeInterval.
The second of which is the computational logic that,
Figure BDA0002348640560000071
fee is the quick renewal fee;
rnc: the number of the common identification nodes in the current round;
bti: block out interval time (seconds);
spy: total time of year (seconds);
cmc: a consensus commitment Token;
cr: the credit base.
The key to incentive calculation of the POC consensus mechanism is a total reward amount within a certain time, and a reward value (blockarewardaccount) for generating a block can be calculated according to the total reward amount and other configuration parameters. The more important part is allocation, the mechanism of allocation between consensus member nodes and the mechanism of reward allocation between node internal delegates and node owners.
The value of the coinbase is the total number of rewards obtained after the whole block is generated, and then the total number of the rewards is evenly distributed according to the asset proportion of all participants, so that the total number of the rewards is the portion which each person should obtain.
Credit evaluation formula:
credit coefficient is ability coefficient + responsibility coefficient
Description of the parameters:
capacity coefficient: the number of blocks in 100 rounds is calculated according to the historical number of blocks,
responsibility coefficient: the calculation is carried out according to the violation condition, and in 100 rounds, the penalty of each yellow card is-0.01,
the change of the credit coefficient is carried out by depending on the change of the turn, and the credit coefficient of the node is not changed in the same turn, so that the consistency of the total weight of all the nodes can be calculated when each node is out of the block.
The POC consensus mechanism comprises two punishment mechanisms, namely yellow punishment and red punishment,
yellow card punishment: when one node should be blocked at a certain time and other people cannot receive the block, the next blockmaker can contain a yellow card transaction in the block chain, and the credit value of the punished node is reduced due to the existence of the yellow card transaction, so that the node income is influenced;
punishment of red cards: the red punishment is punishment of a system to a malicious node, and the node receives the red punishment when any one of the following conditions is met:
1. the credit value is reduced to-1 and,
2. the nodes are at the same height for a plurality of times within a certain time to produce a plurality of different blocks, namely malicious branched networks,
3. the node packages the double flower transaction in one block,
when the node receives the punishment of the red license, the node immediately kicks out the consensus node list, locks the guarantee fund of the node for 60 days, and immediately unlocks the assets of all clients.
Example two:
the following example, is exemplified by the POC practice of a homemade public-chain NULS network:
and (3) consensus node election:
the node participating in block packing and verification in POC is called a consensus node. In order to avoid the common node being completely controlled by the large subscriber, POC designs a more open node election mode. Firstly, anyone can create a node because the threshold of the POC node is low enough, so long as the deposit above 20000TOKEN is locked, a node can be created, in order to avoid that the number of nodes is too small, POC limits the interval of the node deposit, only 2w-20w of deposit is accepted, the deposit exceeding or less than the interval cannot create the node, once the transaction confirms that the deposit is locked, the transaction cannot be participated again until the node is unlocked after stopping. Each node does not need to expose the position of the server outside the heap, and people in the network know that the node exists but cannot associate the node with the ip address, so that the possibility that the node is attacked in a targeted manner is greatly reduced, and the safety of the node is ensured.
Creating a node requires setting several parameters, as follows:
creating an address: having the right to stop the node requires the account private key to be properly kept.
Packaging addresses: in POC consensus, each block requires a block person signature, and the packing address is the address used for signature and must be stored in the operating node.
Reward address: and the reward for the receiving node to participate in consensus is that the creation address is the same by default when the reward is not filled.
And (3) node name: the node name is not allowed to be set directly, but an alias for creating an address is automatically selected as the node name. When the create address has no alias, the last 8 characters of the node id are intercepted as the node name. The node name may be used for searching.
The amount of the deposit: there are enough TOKENs in the creation node to make a guarantee, 2w at a minimum and 20w at a maximum. The margin has a consensus gain as does the commission amount.
The commission ratio is as follows: the node can accept the commission of any account, and the node can extract a part of commission from the commission agent income, for example, the commission ratio is set to 10%, then 10% of commission agent income can be collected as reward of the node
How a node participates in consensus
The state of the created node is "to be known together", which means literally waiting. If the nodes created by the 2w margin can participate in consensus, the network can reach 5000 nodes at most, which is a very large number, so that the efficiency of maintaining the network by using the distributed nodes is very low, and the threshold of 2w is difficult to be called as the consensus of full participation. In the design of POC, the threshold for creating nodes is very low, but the threshold for participating in consensus is very high to some extent, that is, after the nodes are created, a commission of at least 20wTOKEN is required to participate in the consensus conference, and at the same time, each node accepts the commission and sets an upper limit, which is currently 50wTOKEN, so as to reduce the number of nodes to a certain extent, ensure a certain decentralization characteristic, and improve network performance.
Delegation of
Anyone can participate in the delegation, the threshold currently set by the POC is 2000 TOKEN starts, which is a basic operation parameter, and can be modified in a community administration manner, and after the delegation, the principal can participate in the distribution of consensus rewards to obtain corresponding benefits. The amount of the entrusted money is locked at the moment when the transaction takes effect, and no transaction can be carried out until the node stops unlocking or actively cancels the entrusted and quits the consensus, and the income distribution is stopped after the entrusted money is cancelled (with turn delay). The client can withdraw the TOKEN delegated by itself by exiting the consensus operation.
How to stop the node:
the creation account of the node has the right to terminate the operation of the node at any time, when the node stops, all the money entrusted on the node is unlocked to the account of the entrustor, and the security deposit # node of the node operates
And (4) round:
the POC block submission mode is performed in a round mode, starting from a creation block, the round is calculated according to a common node format, for example, three nodes a, b and c are included, the block generation interval is 10s, the creation block time is 1970-00-0000: 00:00, the first round time is 1970-00-0000: 00:10 to 1970-00-0000: 00:40, and the like.
And (3) block outlet sequence:
the block output sequence of each round is dynamically calculated in a pseudo-random mode, and the specific algorithm is to analyze the packed addresses of all the nodes into byte codes, splice the time stamps of the start time of the round before the byte codes, then perform Hash256 abstract calculation on the spliced result, and finally sort the abstract to obtain the block output sequence of all the nodes of the round. Then the blocks are alternated every 10s according to the calculated result.
The mechanism of the red and yellow cards is as follows:
the common recognition mechanism of the block chain must consider the existence of the malicious node, and in the design of the POC, theoretically, as long as the malicious node is less than 50%, the security of the network cannot be influenced, and on the basis, the POC summarizes some punishment measures for abnormal behaviors to punish the malicious or low-energy node, namely the red and yellow board mechanism.
Yellow card:
when a node should go out of blocks and eventually cannot successfully add a block on the block chain, a yellow card is issued to warn. The possibility of such a situation is that a node is down, highly unsynchronized, unstable hardware, split locally at the node, etc., which the node maintainer must avoid as much as possible. How to make a node yellow? Improving server performance and network performance, opening network connection ports, allowing more nodes to connect to, update wallet versions in time, monitor server operating status using tools, and the like.
Red card:
the red card is an ultimate mode for punishing the vicious node, and after the node receives the red card, the node quits the consensus meeting (with turn delay), does not obtain the consensus reward any more, and does not participate in block packaging any more. The node's deposit will lock for 60 days, during which 60 days the deposit cannot participate in any transaction. The created address of the node is deprived of the right to create the node since the red penalty is received, and the node can never be created as a created address. Currently, red punishment mainly punishes two malicious behaviors:
the node goes offline, when the credit value of the node is reduced to-1, the node receives a red penalty,
and (4) branching is attempted, when a node packs two different blocks at a height, the node is considered to be branching is attempted, and if 3 branching-attempted behaviors exist in 100 rounds, the node receives a red penalty. Note: many times the attempt to branch is due to the node maintainer directing the packaging address into two different purses, both purses thinking that they are nodes and doing out-blocking.
Credit calculation logic:
current credit calculation:
Figure BDA0002348640560000111
the current value range is between 1 and-1.
How the profit is calculated:
the POC consensus gain is divided into two parts, transaction commission calculated based on transaction size, and network maintenance revenue liquidated at a minimum unit price of 0.001TOKEN/KB, and network maintenance revenue liquidated at 500 w/year, which is agreed to per block 158548960Na (1.58548960 TOKEN). Then 1.58548960TOKEN was awarded for a tile if a node successfully packaged? And is not. POC pursues fairness, the guarantee amount and the commission amount of each node may be different, so in actual calculation, the reward is calculated by taking turns as a calculation unit. The specific algorithm is as follows:
first, the sum of all consensus awards in the current round is calculated
sum (blockrewardpending) ═ 158548960Na number of home nodes
Each node divides the ratio corresponding to each node according to the weight of the node, the weight of the node is divided by the sum of the weights of all the nodes, namely the ratio of the node in the current round to the node, and if n nodes exist, the calculation mode is as follows:
weight (node) (total of guarantee fund + accepted commitment) CreditVal
Figure BDA0002348640560000112
Swelling of NULS:
since POC and inflation are closely related, we briefly introduce the inflation mechanism of TOKEN here (recent community is discussing proposals to reduce inflation, and only the previous inflation scheme is referred to here). TOKEN has a maximum inflation amount of 500WTOKEN per year, which is not more than 5% of the total amount in the first year and not more than 4.761% of the total amount in the second year, and the proportion decreases year by year. Above, two words, "max" and "no more than", why is it uncertain to say a number? When one node should be blocked but not blocked, when the profit is calculated, other nodes calculate the weight of the node, and the node does not reserve shares, but because the node does not have the blocks, the inflexion is not taken or cancelled, so 500w is only a theoretical value, and the actual inflexion is less.
Relationship between credit and revenue:
the first perfect state is that the credit value of each node is 1, and each node distributes the consensus reward of the round according to the guarantee sum and the commission amount, and the result is fair after one payment and one return. When the credit value of one node is lower than 1, the weight of the node is reduced, but the weights of other nodes are unchanged, so that the ratio of the node is reduced, and the income is reduced. In this case, the weight of the node is decreased, and the weights of the other nodes are not changed, so that the occupation ratio is increased, and the profit is also increased. The credit value of the node, which directly affects the revenue, needs to be treated with caution.

Claims (10)

1. A POC efficient consensus mechanism based on credit decentralization and a realization method thereof are characterized by comprising the following steps:
s1, node election, wherein the two participation modes comprise node creation and delegation, and thresholds are respectively set in the two participation modes to ensure efficient performance and decentralization;
s2, round calculation, wherein the round consists of a start time and a member list, the start time of the current round is determined according to the end time of the previous round, round members are determined forward from the transaction in the first block of the previous round, and the round calculation difference caused by the incomplete synchronization of the blocks with nodes is avoided;
and S3, packaging the block, including calculating reward and credit calculation,
s31, calculating the total reward amount within a certain time, calculating the reward value of generating a block according to the total reward amount and other configuration parameters,
s32, calculating credit, wherein the credit is an honesty coefficient of the account in the system, and the credit of all the accounts is automatically calculated in an interval [ -1,1] through a credit rating algorithm formula;
s4, synchronizing the blocks, broadcasting the block head + system transaction, and completing the assembly and verification of the blocks by each node;
and S5, updating the height, and entering the next cycle after the height is updated completely.
2. The POC-efficient consensus mechanism based on credit decentralization as claimed in claim 1, wherein the POC consensus mechanism comprises four roles, namely a node creator, a principal, a packager and a rewarding party,
the method comprises the steps that a consensus node creator initiates a transaction for creating consensus nodes, records the transaction into a blockchain and tells all people to make consensus nodes, the basic condition of the node creation is that a certain number of TOKEN are required to be locked, and no red punishment record exists, and the purpose of setting the basic condition is to prove that an account is truly realistic and a blockchain basic network is required to be maintained;
the method comprises the following steps that a packager can be designated by an agent when a consensus node is created, the packager can be other accounts of the packager and can also be friends with technology, most importantly, the packager does not hold any NULS, even if a server participating in consensus is attacked by a hacker, a user does not have huge loss which is only influenced by the benefits after the attack, the packager needs to be noticed that the packager is an account which really produces blocks, and a block signature is needed after each block packaging, so that the packaged account does not need to be provided with a password;
the agent can not only specify a packing person but also specify a beneficiary when creating the consensus node, and specify who can obtain the reward produced by the consensus;
the trustee and the NULS holder can delegate the NULS held by the trustee to the agent for consensus according to the credit value condition of the agent and the influence factor of the agent, and can enjoy corresponding consensus income.
3. The POC high-efficiency common awareness mechanism and implementation method according to claim 1 or 2, wherein the network model set in the POC common awareness mechanism is a two-layer network model, the two-layer network model includes a core common awareness network and a block chain complete network, the complete network is composed of common awareness nodes and common nodes, all the nodes are peer-to-peer without any function and authority distinction, the core common awareness network is composed of common awareness nodes, it is ensured that a packaged address is introduced in a node program, and the core common awareness network is responsible for maintaining block chain data in a current packaging round, and the packaged blocks are packaged in turn according to the service logic of POC common awareness.
4. The POC efficient consensus mechanism and implementation method according to claims 1 or 2, wherein the first step involved in the maintenance of the consensus network is to create a consensus node, and in the design of POC, an asset threshold is set for creating the consensus node, and a certain number of assets need to be locked to qualify as a registered node; after the nodes are successfully created, the nodes cannot join the consensus network immediately to perform block packing operation, and a certain amount of entrusts are required to be obtained to prove that all network members can participate in block packing with certain influence.
5. The POC efficient consensus mechanism and implementation method based on credit decentralization as claimed in claim 3, wherein any person holding blockchain assets can choose a node to delegate, wherein delegation is a way of proving trust, and when a person delegates own right to a node, the node is proved to be trusted; each entrusting has a separate record, the revoking operation can be carried out at any time, and entrusting transaction needs to lock assets with corresponding quantity; the total entrusting amount of each node is set with an upper limit, and the condition that the total entrusting amount exceeds the upper limit is not allowed to occur, namely when one entrusting is successful, the total entrusting amount in the node exceeds the upper limit, and the entrusting cannot be confirmed.
6. The POC efficient consensus mechanism and implementation method based on credit decentralization as claimed in claim 4, wherein any person holding blockchain assets can choose a node to delegate, wherein delegation is a way of proving trust, and when a person delegates own right to a node, the node is proved to be trusted; each entrusting has a separate record, the revoking operation can be carried out at any time, and entrusting transaction needs to lock assets with corresponding quantity; the total entrusting amount of each node is set with an upper limit, and the condition that the total entrusting amount exceeds the upper limit is not allowed to occur, namely when one entrusting is successful, the total entrusting amount in the node exceeds the upper limit, and the entrusting cannot be confirmed.
7. The POC-efficient consensus mechanism and implementation method according to claims 1, 2, 5, or 6, wherein the calculation of the reward is divided into two parts: one of them is the configuration parameter, and the other is the configuration parameter,
the calculation of the reward is divided into two parts: one of them is the configuration parameter, and the other is the configuration parameter,
# total award amount totalInflationAmount,
# initial award amount inflationactive over interval,
# inflation Start calculation time (unit: S) initTime,
a # wildreduction ratio (set to 100 if there is no wildreduction) deflationRatio,
a # puncture interval time (unit: S) deflationTimeInterval;
the second of which is the computational logic that,
Figure DEST_PATH_IMAGE001
fee is the fee which is provided by the quick service,
rnc: the number of the nodes which are identified in the current round,
bti: the out-of-block interval time (seconds),
spy: the total time of the year (in seconds),
cmc: the Token is a consensus to be entrusted with,
cr: the credit base.
The value of coinbase, which is the total number of awards obtained after the block is generated, is then evenly distributed along with the proportion of assets of all participants, which is the portion that each person should receive.
9. The POC efficient consensus mechanism and implementation method for credit decentralized based on claim 7, wherein the credit evaluation formula is:
Figure DEST_PATH_IMAGE003
description of the parameters:
capacity coefficient: the number of blocks in 100 rounds is calculated according to the historical number of blocks,
responsibility coefficient: the calculation is carried out according to the violation condition, and in 100 rounds, the penalty of each yellow card is-0.01,
the change of the credit coefficient is carried out by depending on the change of the turn, and the credit coefficient of the node is not changed in the same turn, so that the consistency of the total weight of all the nodes can be calculated when each node is out of the block.
10. The POC efficient consensus mechanism based on credit decentralization and the implementation method thereof as claimed in claim 1, 2, 5, 6 or 8, wherein the POC consensus mechanism comprises two penalty mechanisms, yellow penalty and red penalty,
yellow card punishment: when one node should be blocked at a certain time and other people cannot receive the block, the next blockmaker can contain a yellow card transaction in the block chain, and the credit value of the punished node is reduced due to the existence of the yellow card transaction, so that the node income is influenced;
punishment of red cards: the red punishment is punishment of a system to a malicious node, and the node receives the red punishment when any one of the following conditions is met:
the credit value is reduced to-1 and,
the nodes are at the same height for a plurality of times within a certain time to produce a plurality of different blocks, namely malicious branched networks,
the node packages the double flower transaction in one block,
when the node receives the punishment of the red license, the node immediately kicks out the consensus node list, locks the guarantee fund of the node for 60 days, and immediately unlocks the assets of all clients.
CN201911405979.XA 2019-12-31 2019-12-31 POC (Point of sale) efficient consensus mechanism based on credit decentralization and implementation method Pending CN111131298A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911405979.XA CN111131298A (en) 2019-12-31 2019-12-31 POC (Point of sale) efficient consensus mechanism based on credit decentralization and implementation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911405979.XA CN111131298A (en) 2019-12-31 2019-12-31 POC (Point of sale) efficient consensus mechanism based on credit decentralization and implementation method

Publications (1)

Publication Number Publication Date
CN111131298A true CN111131298A (en) 2020-05-08

Family

ID=70506386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911405979.XA Pending CN111131298A (en) 2019-12-31 2019-12-31 POC (Point of sale) efficient consensus mechanism based on credit decentralization and implementation method

Country Status (1)

Country Link
CN (1) CN111131298A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112953704A (en) * 2021-01-29 2021-06-11 杭州叙简科技股份有限公司 5G-based unmanned POC relay method
CN114338053A (en) * 2022-03-16 2022-04-12 成都信息工程大学 Dynamic reputation-based block chain consensus method and system
CN115617806A (en) * 2022-10-31 2023-01-17 哈尔滨工业大学(深圳) Block packaging method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108830577A (en) * 2018-06-07 2018-11-16 北京连琪科技有限公司 The account of block chain is established and restoration methods
US20180337882A1 (en) * 2017-05-16 2018-11-22 Peking University Shenzhen Graduate School Determining consensus in a decentralized domain name system
CN109151031A (en) * 2018-08-28 2019-01-04 北京奇虎科技有限公司 Contract processing method and processing device based on block chain
CN109410054A (en) * 2018-09-30 2019-03-01 深圳市有情矿技术有限公司 Block chain common recognition method under autonomous domain model based on information sharing contribution margin
CN109727038A (en) * 2019-01-02 2019-05-07 浙江师范大学 A kind of block chain common recognition mechanism and implementation method proving PoC based on credit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180337882A1 (en) * 2017-05-16 2018-11-22 Peking University Shenzhen Graduate School Determining consensus in a decentralized domain name system
CN108830577A (en) * 2018-06-07 2018-11-16 北京连琪科技有限公司 The account of block chain is established and restoration methods
CN109151031A (en) * 2018-08-28 2019-01-04 北京奇虎科技有限公司 Contract processing method and processing device based on block chain
CN109410054A (en) * 2018-09-30 2019-03-01 深圳市有情矿技术有限公司 Block chain common recognition method under autonomous domain model based on information sharing contribution margin
CN109727038A (en) * 2019-01-02 2019-05-07 浙江师范大学 A kind of block chain common recognition mechanism and implementation method proving PoC based on credit

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JOHNNYHAO_: "Proof Of Credit——区块链项目NULS共识机制分析", 《CSDN,HTTPS://BLOG.CSDN.NET/WEIXIN_41328020/ARTICLE/DETAILS/83212290》 *
NULS中文社区: "NULS POC共识机制的分享", 《知乎,HTTPS://ZHUANLAN.ZHIHU.COM/P/62913388》 *
VVFIGHTING: "POC共识机制详解", 《大专栏,HTTPS://WWW.DAZHUANLAN.COM/VVFIGHTING/TOPICS/962677》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112953704A (en) * 2021-01-29 2021-06-11 杭州叙简科技股份有限公司 5G-based unmanned POC relay method
CN112953704B (en) * 2021-01-29 2022-05-27 杭州叙简科技股份有限公司 5G-based unmanned POC relay method
CN114338053A (en) * 2022-03-16 2022-04-12 成都信息工程大学 Dynamic reputation-based block chain consensus method and system
CN114338053B (en) * 2022-03-16 2022-05-13 成都信息工程大学 Dynamic reputation-based block chain consensus method and system
CN115617806A (en) * 2022-10-31 2023-01-17 哈尔滨工业大学(深圳) Block packaging method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109360100B (en) Transaction rapid confirmation method and device based on block chain technology
Yu et al. Repucoin: Your reputation is your power
CN109120398B (en) Secret sharing method and device based on block chain system
Zheng et al. An overview of blockchain technology: Architecture, consensus, and future trends
CN112907252B (en) Block chain transaction method and system based on multi-person chain lower channel
CN107464106A (en) The method and system merchandised between block chain main chain and side chain
CN111131298A (en) POC (Point of sale) efficient consensus mechanism based on credit decentralization and implementation method
CN110610421B (en) Guarantee fund management method and device under fragment framework
CN110298641B (en) Rule updating method and device for block chain, block chain node and network
Han et al. A fair blockchain based on proof of credit
Azouvi et al. Winning the caucus race: Continuous leader election via public randomness
CN114362987B (en) Distributed voting system and method based on block chain and intelligent contract
Bashar et al. Contextualizing consensus protocols in blockchain: A short survey
Li et al. Metaopera: A cross-metaverse interoperability protocol
Ge et al. Survey of consensus algorithms for proof of stake in blockchain
Saini Blockchain foundation
Yu et al. Low powered blockchain consensus protocols based on consistent hash
CN116527684B (en) Multi-chain information interaction method based on 1+1+N relay consensus committee
Singh et al. Understanding the public, private and consortium consensus algorithms in blockchain technology
Decker On the scalability and security of bitcoin
CN114584990A (en) Cross-alliance chain fine-grained spectrum sharing mechanism based on prediction machine
Lajoie-Mazenc et al. Handling bitcoin conflicts through a glimpse of structure
Jangid et al. An Overview of Blockchain Technology: Architecture, Consensus, and Future Trends
Kohad et al. Consensus Algorithms in Blockchain Technology
Wang et al. Fair Contract Signing Model Based on Blockchain and VES Algorithm

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508