Skip to main content
. 2023 Feb 1;25(2):270. doi: 10.3390/e25020270
Algorithm 2 Verifying cPoW Algorithm VerifycPoW
  • Input: 

    weight w, proof info, the voting weight function F, linkable tag L, and information identification id

  • Output: 

    0 or 1

  •    1:

    parse info:=(ph,tm,ne,mt,tv,lid,R), c:=0, the hash value of the chain head at tm1 slot is ph, the start timestamp of round r is sl;

  •    2:

    for each info do

  •    3:

       if H(tm,ph,ne,mt,H(lid||R))<tvph=phL=H2(id)lidtm[sl,sl+q+Δ) then

  •    4:

        c=c+F(tv);

  •    5:

    if c=w then

  •    6:

       return 1;

  •    7:

    return 0;