question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Api /wallets sometimes return wrong vote ID

See original GitHub issue

Expected Behavior

api/wallets/ should return correct vote id

Current Behavior

api/wallets/ sometimes return wrong id

Possible Solution

Steps to Reproduce (for bugs)

  1. Retrieve the wallet APYBiT55RHNGJMRENSCmY7fEkjhaT6A6Jg https://api.ark.io/api/wallets/APYBiT55RHNGJMRENSCmY7fEkjhaT6A6Jg
  2. Retrieve the returned (wrong) vote id 02c0b645f19ab304d25aae3add139edd9f6ca9fd0d98e57a808100de0e93832181 https://api.ark.io/api/votes/02c0b645f19ab304d25aae3add139edd9f6ca9fd0d98e57a808100de0e93832181
  3. The only and valid vote transaction for this account is b601cebf7cef600d9af8c02ab9c4cbe194357b1c2ce1d2aac45197873b52c1fe

Context

Your Environment

Tested both official https://api.ark.io/ and my node https://public.arknode.ninja:8443 api

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
alessiodfcommented, Aug 14, 2019

I don’t see any problem here.

https://api.ark.io/api/wallets/APYBiT55RHNGJMRENSCmY7fEkjhaT6A6Jg shows the public key of the delegate the wallet is voting for; in this case the public key is 02c0b645f19ab304d25aae3add139edd9f6ca9fd0d98e57a808100de0e93832181 which corresponds to delegate bioly.

https://api.ark.io/api/votes/02c0b645f19ab304d25aae3add139edd9f6ca9fd0d98e57a808100de0e93832181 yields an Unprocessable Entity error because it’s being fed a public key when it requires a transaction ID.

Instead, if we use https://api.ark.io/api/votes/b601cebf7cef600d9af8c02ab9c4cbe194357b1c2ce1d2aac45197873b52c1fe it again shows the transaction is voting for public key 02c0b645f19ab304d25aae3add139edd9f6ca9fd0d98e57a808100de0e93832181.

So @biolypl I think you are conflating transaction IDs and public keys. api/wallets is showing that the wallet is voting for you based on your public key. It doesn’t show the ID of the transaction that cast the vote.

0reactions
ghostcommented, Aug 14, 2019

This issue has been closed. If you wish to re-open it please provide additional information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Oppose Voter ID Legislation - Fact Sheet - ACLU
BackgroundVoter identification laws are a part of an ongoing strategy to roll back decades of progress on voting rights. Thirty-four states have ...
Read more >
A Guide to Voter ID/Affidavit at the Polls - State of Michigan
Remember to bring an acceptable form of photo identification to the polls on Election Day. If you don't have photo ID you can...
Read more >
Voter ID Laws - National Conference of State Legislatures
Proponents see increasing requirements for identification as a way to prevent in-person voter impersonation and increase public confidence in ...
Read more >
Election Security Rumor vs. Reality - CISA
When a ballot cannot be read by a scanner at a voting site, election officials apply procedures to securely store the ballots until...
Read more >
How to Vote in 2022 Midterm Elections - TIME
From how to register to what to do if you're still in line when the polls close, here's everything you need to know...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found