Grandpa::Call

Variant 125 v393

pallet_grandpa::pallet::Call

Contains a variant per dispatchable extrinsic that this pallet has.

About This Type

Call enum for the Call pallet.

Contains all dispatchable functions (extrinsics) for the Call pallet. Each variant represents a different callable function with its parameters.

Variants (3)

IndexNameFieldsDocs
0report_equivocation
equivocation_proof: EquivocationProof
key_owner_proof: Void
Report voter equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will be reported.
1report_equivocation_unsigned
equivocation_proof: EquivocationProof
key_owner_proof: Void
Report voter equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will be reported. This extrinsic must be called unsigned and it is expected that only block authors will call it (validated in `ValidateUnsigned`), as such if the block author is defined it will be defined as the equivocation reporter.
2note_stalled
delay: u32
best_finalized_block_number: u32
Note that the current authority set of the GRANDPA finality gadget has stalled. This will trigger a forced authority set change at the beginning of the next session, to be enacted `delay` blocks after that. The `delay` should be high enough to safely assume that the block signalling the forced change will not be re-orged e.g. 1000 blocks. The block production rate (which may be slowed down because of finality lagging) should be taken into account when choosing the `delay`. The GRANDPA voters based on the new authority will start voting on top of `best_finalized_block_number` for new finalized blocks. `best_finalized_block_number` should be the highest of the latest finalized block of all validators of the new authority set. Only callable by root.

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 3 possible variants.
Size
variable (1+ bytes)

Examples

report_equivocation = report_equivocation(equivocation_proof, key_owner_proof)
0x00<field0><field1>
00 Variant index 0 = report_equivocation
field 0 equivocation_proof: EquivocationProof
field 1 key_owner_proof: Void
report_equivocation_unsigned = report_equivocation_unsigned(equivocation_proof, key_owner_proof)
0x01<field0><field1>
01 Variant index 1 = report_equivocation_unsigned
field 0 equivocation_proof: EquivocationProof
field 1 key_owner_proof: Void
note_stalled = note_stalled(delay, best_finalized_block_number)
0x02<field0><field1>
02 Variant index 2 = note_stalled
field 0 delay: u32
field 1 best_finalized_block_number: u32

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode Grandpa::Call — variant "report_equivocation"
const value = registry.createType("Grandpa::Call", { report_equivocation: { equivocation_proof: 0, key_owner_proof: 0 } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
125
Kind
Variant
Path
pallet_grandpa::pallet::Call
Runtime
v393