dcrwallet icon indicating copy to clipboard operation
dcrwallet copied to clipboard

Votes transactions are sent with votes for agendas that are already complete

Open raedah opened this issue 7 years ago • 1 comments

Currently votes are being sent on the network with the inclusion of 'lnfeatures' agenda choices. The vote window for this agenda item has long passed. To resolve this for all future cases, voting on agenda items would not be sent after a safe number of blocks have passed from when that agenda window ends.

raedah avatar Jun 01 '18 05:06 raedah

This is blocked on decred/dcrd#971.

The issue is that the wallet doesn't know the outcome of a vote if the vote passes before the agenda expires. The lnfeatures agenda has not yet expired (and won't until September 13, 2018), and even after a vote expires, the wallet is unable to determine the final outcome.

This is more of a problem of the wallet not following consensus changes than simply providing unnecessary options to users. Votes that modify the consensus rules can not automatically apply to the wallet at this time. For example, while the OP_SHA256 opcode was activated in the most recent vote, the wallet is still unaware of this change and does not include the flag to enable the opcode when performing transaction script execution sanity checks.

Header commitments will allow us to solve this by committing to additional data that a SPV wallet wouldn't otherwise know about the state of a vote. Most simply, it could commit to a final result if one has been met.

jrick avatar Jun 01 '18 13:06 jrick