Conversation
Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
Also self-sign during aggregation - Introduces ApprovalStore (msm/approvals.go) — an in-memory store of validator approvals for epoch transitions, keyed by (NodeID, PChainHeight). It verifies BLS signatures on ingest, deduplicates by timestamp (newer wins, older is dropped), and prunes per-node entries to at most len(validators) by evicting the oldest timestamp. - Adds Timestamp to ValidatorSetApproval (msm/encoding.go) so the store can order/evict approvals deterministically. - computeNewApprovals (msm/msm.go) now optimistically self-signs the next epoch's P-chain reference height each round and appends its own ValidatorSetApproval to the peer set since the store deduplicates it later. Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
samliok
left a comment
There was a problem hiding this comment.
I realllly like the FSA defined above the state variable. It's clear, and easy to follow. 🎸
I'm concerned that larger comments above the buildBlock... functions will be hard to maintain / get out of sync. I dont think the logic will change much so I think its fine, but they are bulkier function comments that are probably hard to edit manually in the future.
Although claude code can be prompted to do so and it'll do a good job of keeping the formatting.
can we seperate out the comments like the FSA into its own PR?
| // the hash of the sealing block of the previous epoch. | ||
| // This is used to be able to quickly fetch and verify the sealing blocks without having to retrieve the interleaving blocks, | ||
| // which allows to bootstrap the BLS keys of the validator set for each epoch before fully syncing the interleaving blocks. | ||
| PrevSealingBlockHash [32]byte `canoto:"fixed bytes,3"` |
There was a problem hiding this comment.
should this be a simplex.Digest?
There was a problem hiding this comment.
yes but it's unrelated to this PR. I can change it in the PR where I will flatten the protocol metadata
Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
No description provided.