anoma / namada

Rust implementation of Namada, a Proof-of-Stake L1 for interchain asset-agnostic privacy
https://namada.net
GNU General Public License v3.0
2.38k stars 951 forks source link

Remove genesis block checks for vote extensions #239

Closed sug0 closed 1 year ago

sug0 commented 1 year ago

Tendermint shouldn't give us vote extensions issued during the genesis block, so some of our checks in the ledger are probably redundant.

Example 1 Example 2

If possible, we should remove this logic to clean up the ledger code a bit.

cwgoes commented 1 year ago

@sug0 is this still relevant?

sug0 commented 1 year ago

@cwgoes there was some confusion for a while with the fact Tendermint has no concept of a genesis block. the first block is decided through consensus, with height 1. we made a distinction in Namada where the first block would have height 0, i.e. the genesis block, and sprinkled some logic around our code to handle it.

I'd say we should keep some of the logic anyway, because it is possible for Byzantine validators to fill in H=0 in a vote extension. the first height where they can vote for these protocol txs is at H=1. maybe we could rename error types, though, to lessen the confusion.