Skip to content

ticketbuyer does not honor ticketbuyer.votingaccount setting (since v2.0.5) #2481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hb9xar opened this issue Apr 5, 2025 · 0 comments · Fixed by #2482
Closed

ticketbuyer does not honor ticketbuyer.votingaccount setting (since v2.0.5) #2481

hb9xar opened this issue Apr 5, 2025 · 0 comments · Fixed by #2482

Comments

@hb9xar
Copy link

hb9xar commented Apr 5, 2025

Hi there,

Setup:

  • 1x PoS staking wallet with 2x independent voting wallet
  • Account from voting wallet has been imported to staking wallet using getmasterpubkey/importxpub
  • No mixing is active
  • staking wallet is configured with "ticketbuyer.votingaccount=XXXX"

Starting with dcrwallet release-v2.0.5, the internal ticket buyer does no longer honor the ticketbuyer.votingaccount config option for buying tickets, but instead uses the PurchaseAccount to derive the ticket address. As a result, the tickets are "lost" (are sent to wrong wallet and no voting is done).

It seems to have been introduced with commit 5cd89f5 #2416 "wallet: Use purchase acct for voting if not mixing"
Commit Comment:
"In the case where mixing is disabled and no voting account has been set,
the purchase account should be used as a fallback to derive a ticket
voting address."

The description sounds OK, but the actual code change does only consider votingaddress and not votingaccount and finally falls back to PurchaseAccount.

Expected behavior:

  • if votingaccount is set, it should be honored and used for ticket purchases
  • if votingaddress is set, it should be honored - as it seems that votingaddress is going to be eliminated (no longer present in "master") it may not need to be considered
  • fallback to PurchaseAccount

Looking at the code (I'm not fluent in Go), there seems to be a way to force using the votingaccount (UseVotingAccount boolean), but it does not seem to be used anywhere - I did not find a place inside dcrwallet where this boolean is actually set.
Also I believe this issue only shows up if NO mixing is done (-> wallet/createtx.go:1708) as mixing uses the same code path to get the ticket address as with UseVotingAccount=true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant