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.
validUntil
field of payment transaction (from0
tomax_uint32
).This was tested by running the construction tests on the mina rosetta server with both payment and delegation transactions.
Solution
Delegation transactions
The
Transaction
type could already handle various types of transaction and distinguish between them using theTag
field.{false, false, false}
is the first case (payments) and{false,false,true}
the second one (stake delegation).However the parsing step in
signer_pallas.go
could only handlePayment
transaction so far so I added theStakeDelelegation
case.The valid_until field
If the
valid_until
field is not specified in the preprocess step, the rosetta server uses the greatestuint32
as a default value. The pallas signer ofrosetta-sdk-go
was defaulting to zero when building the signing payload which resulted in aninvalid signature
error. The greatestuint32
is now used in both cases.