planetarium / libplanet

Blockchain in C#/.NET for on-chain, decentralized gaming
https://docs.libplanet.io/
GNU Lesser General Public License v2.1
509 stars 143 forks source link

Validate timestamp and `VoteFlag` of Votes #2138

Closed colibrishin closed 1 year ago

colibrishin commented 2 years ago

In PBFT, The vote is for sending whether a proposed/locked block for a round is valid (PreVote) or ready to commit the block (PreCommit).

Timestamp (the actual time)

ConsensusMessage should have a lifespan for preventing unexpected messages.[^1] A timestamp of a message should be verified before handling the message. (see Libplanet.Net.Consensus.Context.ProcessMessage())

[^1]: > The Partial synchrony model (see DLS88) aims to find a middle ground between these two models. The assumption is that there exists some known finite time bound Δ and a special event called GST (Global Stabilization Time) such that: The adversary must cause the GST event to eventually happen after some unknown finite time. Any message sent at time x must be delivered by time Δ+max(x,GST). https://decentralizedthoughts.github.io/2019-06-01-2019-5-31-models/ [^2]: (e.g., ConsensusVote = VoteFlag.Absent, ConsensusCommit = VoteFlag.Commit)

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.