IntersectMBO / cardano-ledger

The ledger implementation and specifications of the Cardano blockchain.
Apache License 2.0
250 stars 157 forks source link

Improve constrained generators of votes #4366

Open Soupstraw opened 1 month ago

Soupstraw commented 1 month ago

The constrained generator for votes in the GovActionState in the RATIFY rule generates mostly invalid votes. The generators need to be biased more strongly towards generating valid votes.

The problem seems to be that the credentials that are voting are not actually active (e.g. CC votes come from non-CC-members, SPO votes come from pools that are not registered). In order to fix this, the generators should be picking the voter credentials from the corresponding maps of registered voters. It should also sometimes pick completely random credentials like it does now so we can test that our implementation conforms with invalid voters.

teodanciu commented 1 week ago

This is part of the conformance tests for RATIFY: https://github.com/IntersectMBO/cardano-ledger/issues/4434