massalabs / massa

The Decentralized and Scaled Blockchain
https://massa.net
5.56k stars 713 forks source link

Refactor Block/Header #2298

Closed gterzian closed 2 years ago

gterzian commented 2 years ago

From the point of view of network propagation and multistake protection, a block comes in two parts:

the header + denunciations : they are propagated as an announcement
endorsements + operations : they should be downloaded after asking explicitly, no need to send the header again as the asker has it already. Also in case of multistake they could be dropped from existing blocks and/or not downloaded.

From the point of view of consensus/graph and execution, a block has two conceptually different parts:

header + denunciations + endorsements => required to integrate the block in the graph and compute finesses
operations => only taken care of by the Execution module, not by consensus

We should think about both those separations and see what could be the optimal split

(source: https://github.com/massalabs/massa/issues/2264#issuecomment-1040130774)

gterzian commented 2 years ago

We should think about both those separations and see what could be the optimal split

How about we focus on moving the Vec<Endorsement> out of the current BlockHeaderContent, and replacing it with a Vec<Denunciation>? @damip

damip commented 2 years ago

After thinking more about it, I still don't have a definitive answer to this problem. So I would vote for keeping both denunciations and endorsements in the header for now, and postpone this split for later (after the optimization of network messages and integration).

github-actions[bot] commented 2 years ago

This issue is stale! (no activity for 60 days)