@ethereumjs/blockchain / Consensus
Defined in: types.ts:220
Interface that a consensus class needs to implement.
algorithm:
string
Defined in: types.ts:221
genesisInit(
genesisBlock):Promise<void>
Defined in: types.ts:226
Initialize genesis for consensus mechanism
genesis block
Promise<void>
newBlock(
block,commonAncestor?,ancientHeaders?):Promise<void>
Defined in: types.ts:248
Update consensus on new block
new block
common ancestor block header (optional)
array of ancestor block headers (optional)
Promise<void>
setup(
__namedParameters):Promise<void>
Defined in: types.ts:231
Set up consensus mechanism
Promise<void>
validateConsensus(
block):Promise<void>
Defined in: types.ts:237
Validate block consensus parameters
block to be validated
Promise<void>
validateDifficulty(
header):Promise<void>
Defined in: types.ts:240
Validates header difficulty against parent and consensus rules.
Promise<void>