Home Reference Source
public class | source

PPoWBlockchainVerifier

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

prevProofs: *[]

Method Summary

Public Methods
public

badness(proofs: *): *

Algorithm 5 The badness prover which generates a succinct certificate of badness

public

calculateM(proofPi: *, blockStart: *): *

returns a list of Levels u which have at least m blocks with that level

public

compareProofs(proofs1: *, proofs2: *): boolean

Algorithm 4.

public

predicateD(accountantTree: *, lastBlocks: *)

validate the accountantTree and the lastBlocks

public

predicateQ(C: *): *

predicateQ validates the last blocks L

public

validateChain(proofPi: *, proofXi: *): boolean

Private Methods
private

_bestArg(proofPi: *, b: *): *

Public Constructors

public constructor() source

Public Members

public blockchain: * source

public prevProofs: *[] source

Public Methods

public badness(proofs: *): * source

Algorithm 5 The badness prover which generates a succinct certificate of badness

Params:

NameTypeAttributeDescription
proofs *

Return:

*

public calculateM(proofPi: *, blockStart: *): * source

returns a list of Levels u which have at least m blocks with that level

Params:

NameTypeAttributeDescription
proofPi *
blockStart *

Return:

*

public compareProofs(proofs1: *, proofs2: *): boolean source

Algorithm 4. Compare 2 proofs. aka bestArg

Params:

NameTypeAttributeDescription
proofs1 *
proofs2 *

Return:

boolean

public predicateD(accountantTree: *, lastBlocks: *) source

validate the accountantTree and the lastBlocks

Params:

NameTypeAttributeDescription
accountantTree *
lastBlocks *

public predicateQ(C: *): * source

predicateQ validates the last blocks L

Params:

NameTypeAttributeDescription
C *

Chain

Return:

*

Boolean

public validateChain(proofPi: *, proofXi: *): boolean source

Params:

NameTypeAttributeDescription
proofPi *
proofXi *

Return:

boolean

Private Methods

private _bestArg(proofPi: *, b: *): * source

Params:

NameTypeAttributeDescription
proofPi *
b *

Return:

*