Closed hackfisher closed 3 years ago
André
any block that changes the authorities will have this (unless it has not been finalized yet)
there is no other guarantees of other blocks having this, we will store justifications "randomly" every justification_period blocks, which is only useful for syncing purposes
(so that you don't have long periods of unfinalized blocks)
but we have the grandpa_proveFinality endpoint which should be able to give you the latest justification available for a given block
André
and also there is a pubsub where we can stream these justifications
> Xavier - Darwinia.Network
> Interesting. Let me check prev-justification_period-block.
but it's not guaranteed to be the same across different nodes
and also grandpa does not guarantee that all blocks will ever have a justification, because grandpa finalizes chains and not blocks
e.g. imagine that grandpa slows down for some reason and in the meantime we already made 10 new blocks
on the next grandpa round we'll just skip ahead and vote for the latest block
We found that the block emitting Grandpa.newAuthorities will store justifications, but also some other headers such as following header on pangolin.
For the finality loop, if there is no authority changes, the relay will loop until the best block number on source chain to retrieve all the justifications.
https://github.com/darwinia-network/parity-bridges-common/blob/7be2b478b49bc8e87ddfe034076e9e80e2f126f6/relays/finality/src/finality_loop.rs#L471
It currently does not print anything, and take a long time to sync if the header relay was not syncing. may cause confuse to relayers.
We may need to learn more about the justifications provided by client, is it deterministic behavior for every nodes? The finality in telemetry changes fast, but it seems only sparsely block store the justification.