referrerpolicy=no-referrer-when-downgrade

Module pallet_bridge_grandpa::benchmarking

source ·
Expand description

Benchmarks for the GRANDPA Pallet.

The main dispatchable for the GRANDPA pallet is submit_finality_proof_ex. Our benchmarks are based around submit_finality_proof, though - from weight PoV they are the same calls. There are to main factors which affect finality proof verification:

  1. The number of votes-ancestries in the justification
  2. The number of pre-commits in the justification

Vote ancestries are the headers between (finality_target, head_of_chain], where header_of_chain is a descendant of finality_target.

Pre-commits are messages which are signed by validators at the head of the chain they think is the best.

Consider the following:

/ B <- C’ A <- B <- C

The common ancestor of both forks is block A, so this is what GRANDPA will finalize. In order to verify this we will have vote ancestries of [B, C, B', C'] and pre-commits [C, C'].

Note that the worst case scenario here would be a justification where each validator has it’s own fork which is SESSION_LENGTH blocks long.