IntersectMBO / cardano-ledger

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

Change how SPO votes are counted #4659

Closed Lucsanszky closed 2 months ago

Lucsanszky commented 2 months ago

Description

Resolves #4645

Checklist

Lucsanszky commented 2 months ago

~I had to disable the ratify conformance test until https://github.com/IntersectMBO/formal-ledger-specifications/issues/578 is resolved, since now the spec and the implementation differs with regards to the SPO vote counts.~ I managed to tweak the SPO votes for conformance tests to make the tests pass until the spec is up-to-date. I'll probably add some more comments why I needed to adjust some of the stake amounts in pools for the tests (electBasicCommittee registers a stake pool and with the vote count changes we didn't always reach the threshold post-bootstrap). Other than that, this is ready for review and I'll add some tests in a separate PR.

Lucsanszky commented 2 months ago

This looks great! We'll definitely need to a few Imp tests for this and re-enable RATIFY conformance test once spec catches up. But, it is definitely OK to postpone that work until after this PR is merged.

Sounds good! I managed to tweak the conformance tests to filter for Abstain votes for SPOs, which is slightly better than disabling the RATIFY conformance tests altogether.