Open
Conversation
Author
|
This is the duplicate of #457 , which should be closed in favour of this PR. The reason for this is that @ylecornec no longer works on it and we won't be able to make changes to his PR if so requested. |
This was referenced Jan 11, 2023
When the `validUntil` field is not specified in a transaction, `mina` will use the greatest possible one.
e9d9f74 to
0e6a446
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The following PR updates the pallas signer used for mina.
validUntilfield of payment transaction (from0tomax_uint32).This was tested by running the construction tests on the mina rosetta server with both payment and delegation transactions.
Solution
Delegation transactions
The
Transactiontype could already handle various types of transaction and distinguish between them using theTagfield.{false, false, false}is the first case (payments) and{false,false,true}the second one (stake delegation).However the parsing step in
signer_pallas.gocould only handlePaymenttransaction so far so I added theStakeDelelegationcase.The valid_until field
If the
valid_untilfield is not specified in the preprocess step, the rosetta server uses the greatestuint32as a default value. The pallas signer ofrosetta-sdk-gowas defaulting to zero when building the signing payload which resulted in aninvalid signatureerror. The greatestuint32is now used in both cases.