-
Notifications
You must be signed in to change notification settings - Fork 209
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
keyreg transactions with voteFirst: 0
fail to send
#925
Comments
voteFirst == 0 doesn't really make sense, since it's supposed to be a round in which the given key can vote. But 0 is not an actual round. (Even if you call the genesis round 0, there's no voting there.) However, the protocol does not require voteFirst to not be 0, so at the very least, I agree the sdk should decode such transactions. Do we really want to stop erroring on trying to send them though? It seems like this is likely to catch more problems than it causes, since 0 is never needed to send. |
@nullun What's the scenario you had for sending a |
I encounted this specifically when working with a local network, running tests, and trying to view the results on Lora. I started a fresh network and immediately generated a partkey for a genesis funded account using I'm aware I could set the |
So we want Lora (through the sdk) to be able to read such a transaction, but I'm not hearing enthusiasm for sending such transactions. |
That sounds reasonable. I agree it probably shouldn't be encouraged to create a transaction with the first valid round set to 0, but in the event a transaction like that appears, the SDK should be able to handle it. |
Subject of the issue
An online key registration transaction with
voteFirst: 0
fails to send to the network.Your environment
Steps to reproduce
voteFirst: 0
. The transaction is created without any issues.Expected behaviour
The transaction is successfully sent.
Actual behaviour
An exception with message "Online key registration missing at least one of the following fields: voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution" is thrown when sending
Additionally, the same error is thrown when fetching a block containing a keyreg transaction sent (via another mechanism) with
voteFirst: 0
.For example:
The text was updated successfully, but these errors were encountered: