eudico icon indicating copy to clipboard operation
eudico copied to clipboard

Verify block proposer belongs to the shard.

Open adlrocha opened this issue 4 years ago • 1 comments

We currently accept every block from a valid miner that has followed the consensus algorithm we see in the shard's pubsub topic. We should only accept blocks that have been mined by a miner with mining rights in the shard (i.e. it is in the list of miners with enough stake in the shard). We need to add this check to validate blocks. This requires:

  • Getting the state of the shard actor of the shards parent chain.
  • Verifying that the block signer is one of the valid miners.

adlrocha avatar Oct 04 '21 07:10 adlrocha

This may be quite straightforward: use a similar check to the one we use in delegated consensus to verify that the block was created by the designated producer: https://github.com/filecoin-project/eudico/blob/eudico/chain/consensus/delegcns/delegated.go#L120-L125

adlrocha avatar Oct 26 '21 08:10 adlrocha