Checking that the transaction fails to verify for duplicate nullifiers voting on the same proposal ID in the same transaction for delegator votes (analogous to spend_duplicate_nullifier_same_transaction added in #2926)
Checking that for delegator votes in DelegatorVote::check_stateful we check that the nullifier has not already been used to vote for that same proposal ID (analogous to spend_duplicate_nullifier_previous_transaction added in #2926)
These are currently hard to write (related to https://github.com/penumbra-zone/penumbra/issues/2754 and https://github.com/penumbra-zone/penumbra/issues/2771). We can't setup the preconditions needed to write the tests for the delegator vote: if we use the existing MockClient-style tests (as added for the duplicate nullifier tests for spends mentioned above), when we try to get the IdentityKey for a validator in order to delegate, there are no validators (because there is no Tendermint), so we can't stake a note. Without a staked note, we can't form a delegator vote.
We lack tests:
spend_duplicate_nullifier_same_transaction
added in #2926)DelegatorVote::check_stateful
we check that the nullifier has not already been used to vote for that same proposal ID (analogous tospend_duplicate_nullifier_previous_transaction
added in #2926)These are currently hard to write (related to https://github.com/penumbra-zone/penumbra/issues/2754 and https://github.com/penumbra-zone/penumbra/issues/2771). We can't setup the preconditions needed to write the tests for the delegator vote: if we use the existing MockClient-style tests (as added for the duplicate nullifier tests for spends mentioned above), when we try to get the
IdentityKey
for a validator in order to delegate, there are no validators (because there is noTendermint
), so we can't stake a note. Without a staked note, we can't form a delegator vote.