Skip to content

Move CC votes mempool check #5022

Open
@lehins

Description

@lehins

There is a check that we added to memepool, since we didn't get it in time for the previous hardfork:

-- Disallow votes by unelected committee members
let
authorizedElectedHotCreds = authorizedElectedHotCommitteeCredentials ledgerState
collectUnelectedCommitteeVotes !unelectedHotCreds voter _ =
case voter of
CommitteeVoter hotCred
| hotCred `Set.notMember` authorizedElectedHotCreds ->
Set.insert hotCred unelectedHotCreds
_ -> unelectedHotCreds
unelectedCommitteeVoters =
Map.foldlWithKey' collectUnelectedCommitteeVotes Set.empty $
unVotingProcedures (tx ^. bodyTxL . votingProceduresTxBodyL)
addPrefix =
("Unelected committee members are not allowed to cast votes: " <>)
failOnNonEmpty unelectedCommitteeVoters $
ConwayMempoolFailure . addPrefix . T.pack . show . NE.toList

We need to add the same check into the GOV rule and enable it for protocol version 11
and also disable the one in MEMPOOL starting with the same protocol version. Check in the MEMEPOOL rule can later be removed once we are in protocol version 11, thus a follow up ticket will need to be created whenever this one is resolved.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions