(4) Settler: Signatures #50
Open
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.
Adds instructions that validate Ed25519 signatures on-chain.
Used to add Validator signatures on
Intents, and Axia signature onProposals.Rust program modified, as well as Typescript SDK and Typescript tests.
Instructions
Mainly two instructions were added that work in a very similar fashion.
We use instruction introspection to verify that a proof was submitted with the signature verification.
This uses the Solana Ed25519Program to validate a signature.
Both
add_axia_sigandadd_validator_sigrequire an Ed25519Program preinstruction to be present, and to contain the valid data (i.e., a message related to the element being validated, and signed by an authorized pubkey).More info on this implementation can be found in this repo which was what I based myself off for this PR.
add_axia_sigValidates a
Proposal. Only whitelisted Axia, only if final and not expired (among other checks).add_validator_sigValidates an
Intent. Only whitelisted Validators, only if final and not expired (among other checks).change_whitelist_programUnimplemented, a
TODOfrom the PR split (#41).Will allow to change the Whitelist program that this Settler uses.
NOTE: Some files might have content from future PRs given this series of PRs come from a larger PR that was split (#41). I have tried to keep this to a minimum but bear this in mind.