-
Notifications
You must be signed in to change notification settings - Fork 0
Solana: Add Settler (sig verify only) #41
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
Closed
Closed
Conversation
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
8142d49 to
0f66de9
Compare
5e98bce to
10e2025
Compare
Member
Author
|
Back to draft as I will split this PR into multiple smaller ones. |
Member
Author
This was referenced Dec 18, 2025
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.
Adds multiple program instructions with the idea of verifying Validator and Axia signatures on chain.
Adds an SDK (
SettlerSDK) to build Anchor instructions a bit more easily.Adds the
Whitelistprogram and its corresponding SDK (WhitelistSDK) to manage entity whitelisting, similar to theController.solSolidity contract.This is a work in progress for the Settler as a whole, but adds a significant number of features and components.
This PR was based off this Notion issue, however several modifications took place, especially in the instruction APIs. I highly suggest that you read the Notion issue first if you haven't already. Proper documentation will be added once the programs are closer to finished.
Settler Instructions
Intent Lifecycle
create_intent: Creates an Intentextend_intent: Adds more data to an Intent PDAclaim_stale_intent: Claims an expired, unexecuted Intent by closing the PDAProposal Lifecycle
create_proposal: Creates a Proposal for an Intentadd_instructions_to_proposal: Extends a Proposal by adding more instructionsclaim_stale_proposal: Claims an expired, unexecuted Proposal by closing the PDASignatures
add_axia_sig: Adds Axia signature to Proposaladd_validator_sig: Adds Validator signature to IntentProgram Misc.
initialize: Initializes Settler stateset_paused_state: Pauses or unpauses SettlerOther instructions are added or scaffolded, as well as state types (
src/state), types, and utils, but everything is subject to a final revision before merging to main.The milestone of this PR is
IntentandProposalcreation, as well as adding signatures to them.How this works
I have used the
Ed25519Programto verify a single signature in a similar fashion to this old repo I had.I have revisited that implementation and simplified it a bit, namely removing instruction parameters that can be retrieved from the embedded preinstruction per a suggestion by someone in an open issue in that repo some years ago.
For now, Validators sign
Intents by signing their hash, and Axia signsProposals by signing their pubkey. This can change in the (near) future.Tests were added to verify happy and unhappy paths of this implementation. I ran a Cursor agent to tidy up the test file, since it got a bit messy over time.
There is also technical debt in the Rust code that will have to be addressed later.