Towards #nostr smart contracts over hyper…

Towards #nostr smart contracts over hyper…

Towards #nostr smart contracts over hyper nostr



1. Proposal phase: One of the validators is chosen as the proposer for the current round based on a deterministic algorithm, which takes into account the validator's voting power and the previous round information. The proposer creates a event proposal containing transactions and broadcasts it to the other validators.

2. Prevote phase: Validators verify the proposed event's correctness, checking the transactions and ensuring it complies with the network's rules. If the proposed event is valid, validators broadcast a signed "prevote" message for that event. If the event is invalid or not received within a specified time limit, validators broadcast a "nil" prevote.

3. Precommit phase: After receiving prevotes from more than two-thirds of the validators (by voting power), a validator enters the precommit phase. Validators check if the majority of prevotes are for the same event proposal. If so, they broadcast a signed "precommit" message for that event. If there is no majority or the event is not received within the time limit, validators broadcast a "nil" precommit.

4. Commit phase: Once a validator receives precommits for the same event proposal from more than two-thirds of the validators (by voting power), it enters the commit phase. The validator commits the event to its local eventchain, finalizing the consensus process for that event. The validator then moves to the next round or height and begins the process again with the proposal phase.