In order for a block to be considered valid in a Proof of Justice-based system, one or more entity(ies) with a role Enforcer (Pa1) must compare the transaction list (T1) of the Generator with its own transaction list (T2), as if Pa1 would generate a block itself, and ultimately provide the comparison result (or proof thereof) (Cr1) to the Generator, said Generator then comprising Cr1 in said block.
It is not recommended that a large quantity of Enforcers verifies and signs every transaction list proposed by every given Generator, as this could lead to severe scalability and performance issues down the line. Therefore, much like Partner(s) for a Requester, a subset of one or more Enforcers must be selected in a determined and traceable fashion for a given Generator, finding an equilibrium between statistical security and performance.
According to step 302 in Figure 3, firstly, Pa1 is selected using the abovementioned Entity Selection process. The Peterson (P1) of the Generator, according to the implementation of Proof of Justice, is also fed to said Entity Selection process.
According to step 304, once Pa1 has been selected, the Generator sends a message (M1) to Pa1, wherein M1 contains PT1. Once Pa1 receives M1, it generates its own Peterson (P2) using the abovementioned Peterson -> Generation process. Pa1 then evaluates M1 and determines M1's validity by analyzing it thereof. The analyzing may vary greatly based on the pre-block information included therein, but will always involve Pa1:
-
Generating its own transaction list (T2) from its own mempool;
-
Making sure T2 is organized in the same way that T1 was organized; and
-
Establishing the difference (or indication/proof thereof) (D1) between T1 and T2.
One important part of the validation that should be in all Proof of Justice implementations is to determine and evaluate the distance between P1 and P2. To do so, Pa1 would use the abovementioned Peterson -> Tracking process for P1, then determine the distance in blocks between P1 and the block Peterson used in generating P2.
According to step 306, Pa1 then includes P2 and D1 in a response message (M2). In a given implementation of Proof of Justice, M2 would also comprise additional information, such as the hash of at least one relevant part of M1. M2 is then signed and provided back to the Generator.
In one or more implementations, a mechanism where the transactions (or indications thereof) in M2 are considered as validated when included by the Generator in the new block (as, in several implementations, the transactions in M2, once included in the block, would be used as reference only and without being considered as validated and confirmed).
According to step 308, it is determined if the Generator (or Pa1 thereof, in one or more implementations) needs one or more other Enforcers. Indeed, in one or more implementations, it could be judged that an Enforcer would need to get "Enforced" itself in order to increase security. The need to select another Enforcer and the number of Enforcers to select can be determined by various means, according to the implementation of Proof of Justice, such as the Generator (or Enforcer) Level, a Proof of Justice parameter, a ratio of detected malicious activity increase in the network established by analyzing the number of punished entities over a given number of blocks, a recommendation by one or more Enforcers, and/or the like. In one or more implementations, the need for one or more Enforcers is included by the Generator (or the previous Enforcer thereof, if and when applicable) in M1.
According to step 310, in a given implementation, the Generator would then, similarly to step 302, select another Enforcer (PaN+1). In another implementation, PaN (where Pa1 is for the first iteration) would be the one selecting PaN+1 instead of the Generator. This can be done as a mean of additional resilience against malicious activities which could be attempted by Generators (or previous Enforcer(s) thereof) in the network.
According to step 312, once PaN+1 has been selected, PaN sends a message (MN) to PaN+1, wherein MN contains M1 (or a signed version of PT1, according to the implementation). In one or more implementations, MN would also contain information about previously selected Enforcers, the number of Enforcers left to select for the Generator (and/or one of the previous Enforcer(s) thereof), the current chaining information (the Enforcers selection order) and/or the like. Once PaN+1 receives MN, it generates its own Peterson (PN+1) using the abovementioned Peterson -> Generation process. PaN+1 then evaluates MN and determines MN's validity by analyzing it thereof. The analyzing may vary greatly based on the pre-block information included therein, but will always involve PaN+1:
-
Generating its own transaction list (TN+1) from its own mempool;
-
Making sure TN+1 is organized in the same way that T1 (and TN, if and when applicable, thereof) was organized; and
-
Establishing the difference (or indication/proof thereof) (DN+1) between T1 (or TN thereof) and TN+1. In one or more implementations, instead of comparing T1 (or TN thereof) with TN+1, DN is compared with TN+1 instead. In one or more implementations, the result of a comparison between DN+1 and DN is returned instead of DN+1.
In one or more implementations, if DN+1 contains a number of differences above a determined threshold, the block is considered to be invalid, and the process is thus terminated. It is recommended that a plurality of Enforcers must come to similar a conclusion before terminating the process, in order to prevent possible attacks on the network by Enforcers. In one or more implementations, Enforcers reaching anomalous conclusions are eventually punished by one or more rules.
In one or more implementations, the average of each Enforcer conclusion is considered as the final difference according to T1 and TN+X. In one or more implementations, anomalous conclusions are excluded in the average calculation.
One important part of the validation that should be in all Proof of Justice implementations is to determine and evaluate the distance between P1, PN, and PN+1. To do so, PaN+1 would use the abovementioned Peterson -> Tracking process for P1, then determine the distance in blocks between P1 and the block Peterson used in generating PN+1. It would then do the same for PN and PN+1. It will be understood that the latency between the original M1 request as well as subsequent requests is intended to be considered during the determining of DN+1 thereof. As such, in one or more implementations, a latency threshold of acceptance is used, wherein said threshold can be determined via various means. For instance, it could be calculated:
-
Based on the number of Enforcer(s) to use for a given block;
-
Based on the average overall network latency reported by one or more entities with a given specialized role;
-
Based on a Proof of Justice parameter; and/or
any other calculation deemed relevant for a given implementation of Proof of Justice.
According to step 314, PaN+1 then includes DN+1, PN+1 (and/or PN-X, in one or more implementations) (and P1, in one or more implementations) in a response message (MN+1). In a given implementation of Proof of Justice, MN+1 would also comprise additional information, such as the hash of at least one relevant part of M1 (and/or MN, according to the implementation). MN+1 is then signed and provided back to the Generator (or PaN, which would then provide it to PaN-1 and PaN-1 would compile the information before providing it to PaN-2 and so on until Pa1 is reached, wherein Pa1 would provide the compiled information to the Generator).
Then, step 308 is executed again. If it is determined in step 308 that an additional Enforcer is required, then steps 310 to 314 are further repeated. Otherwise, step 316 is processed.
According to step 316, the Generator then compiles the information received by all Enforcers.
Figure 3.