Ensure correct validator order by using ValidatorInfo from chain rather than from user #425
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.
This addresses #419 by using validator info obtained from the chain, which will always be in the same order, rather than that given by the user.
It also has the advantage that the
ip_address
andx25519_public_key
fields are guaranteed to be correct.Because of this i had to remove the negative test where we check for a bad x25519 public key supplied by the user, as we now always get that information from the chain.
This actually means we no longer need
UserTransactionRequest
to contain ValidatorInfo. It could either be removed completely or replaced with a Vec of tss account ids which we check against the ones from the chain (as we are still doing in this PR). But i haven't done that here as it would be a breaking change.