Signature by some quorum member (validator) that told:
I agree to vote for block B with index I and hash H created by shard leaderL.The previous block hash was P
On a more technical level - the validator that is part of the current quorum when receiving a block proposal from the shard leader generates a signature:
import {crypto} from'web1337';let prevBlockHash ="b5d6a3736a146fe921e40be95b8e41a0f953a20aedb740769440be4b53795ff7";let blockID ="0:9GQ46rqY238rk2neSwgidap9ww5zbAN4dyqyC7j5ZnBK:1618";let blockHash ="36514c7acfd77950b23baced61f70bd7126f5dac4bc7f2eb110f364123901c42";// Epoch Full ID = epoch.hash+"#"+epoch.index// Just concat hash + # + indexlet epochFullID ="0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef#0";let dataThatShouldBeSigned = prevBlockHash+blockID+blockHash+epochFullID;// Imagine that validator holds it locallylet quorumValidatorPrivateKey ="MC4CAQAwBQYDK2VwBCIEILdhTMVYFz2GP8+uKUA+1FnZTEdN8eHFzbb8400cpEU9";let finalizationProof =awaitcrypto.ed25519.signEd25519(dataThatShouldBeSigned,quorumValidatorPrivateKey);
After quorum member generate this signature - it can be handled(by someone - since it proof is public) and aggregated to get the AFP - aggregated finalization proof
AFP - Aggregated Finalization Proof
Aggregation of 2/3N of FPs gives us AFP. This is how it looks like:
In our explorer you can check the AFP on the block page - look at the link next to the status
Clicking on the link will show you the raw version of AFP:
Probably the most interesting field here is proofs - these are just the FP's from the validators that are part of the quorum of the epoch when the block was generated.
You can verify it yourself using this code:
import {crypto} from'web1337';let prevBlockHash ="b5d6a3736a146fe921e40be95b8e41a0f953a20aedb740769440be4b53795ff7";let blockID ="0:9GQ46rqY238rk2neSwgidap9ww5zbAN4dyqyC7j5ZnBK:1618";let blockHash ="36514c7acfd77950b23baced61f70bd7126f5dac4bc7f2eb110f364123901c42";// Epoch Full ID = epoch.hash+"#"+epoch.index// Just concat hash + # + indexlet epochFullID ="0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef#0";let dataThatShouldBeSigned = prevBlockHash+blockID+blockHash+epochFullID;// Let verify FP for quorum member 9GQ46rqY238rk2neSwgidap9ww5zbAN4dyqyC7j5ZnBKlet quorumMember ="9GQ46rqY238rk2neSwgidap9ww5zbAN4dyqyC7j5ZnBK";let fpProof ="0pOSDm2Zr615gDociLowbGD3IU3eXZKqXOpGchHx8pQEBFThgKzRE2Qt+jTw4ikKJruVCMlDHjwaFOJuufJSAA==";let isFinalizationProofOk =awaitcrypto.ed25519.verifyEd25519(dataThatShouldBeSigned,fpProof, quorumMember);// In case 2/3N+1 of quorum created valid FPs - then this AFP is valid
Sometimes, another case is also possible:
If you see something like this in the explorer, it means that the network has finished the epoch on this block. This block is also valid and was included in the state, but indirectly - via the process of voting for ending of epoch. Such AFP is impossible to verify and it used just as a stub for user interface of explorer
LRP - Leader Rotation Proof
Signature by some quorum member (validator) that told:
I agree to finish FPs generation for shard leader L on index I and hash H. The hash of first block by this leader is F
ALRP - Aggregated Leader Rotation Proof
Aggregation of 2/3N of LRPs gives us ALRP. This is how it looks like:
Signature by some quorum member (validator) that told:
I agree to finish epoch X on shard Y. The last shard leader had index Q in leaders sequence. His last block has height W and hash H. His first block has hash F
AEFP - Aggregated Epoch Finalization Proof
Aggregation of 2/3N of EFPs gives us AEFP. This is how it looks like: