Skip to content

Conversation

@GuidoDipietro
Copy link
Member

@GuidoDipietro GuidoDipietro commented Oct 31, 2025

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 Whitelist program and its corresponding SDK (WhitelistSDK) to manage entity whitelisting, similar to the Controller.sol Solidity 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 Intent
  • extend_intent: Adds more data to an Intent PDA
  • claim_stale_intent: Claims an expired, unexecuted Intent by closing the PDA

Proposal Lifecycle

  • create_proposal: Creates a Proposal for an Intent
  • add_instructions_to_proposal: Extends a Proposal by adding more instructions
  • claim_stale_proposal: Claims an expired, unexecuted Proposal by closing the PDA

Signatures

  • add_axia_sig: Adds Axia signature to Proposal
  • add_validator_sig: Adds Validator signature to Intent

Program Misc.

  • initialize: Initializes Settler state
  • set_paused_state: Pauses or unpauses Settler

Other 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 Intent and Proposal creation, as well as adding signatures to them.

How this works

I have used the Ed25519Program to 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 signs Proposals 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.

@GuidoDipietro GuidoDipietro self-assigned this Oct 31, 2025
@GuidoDipietro GuidoDipietro changed the base branch from main to solana/settler October 31, 2025 15:53
@GuidoDipietro GuidoDipietro force-pushed the solana/settler-signatures branch from 8142d49 to 0f66de9 Compare November 4, 2025 19:06
@GuidoDipietro GuidoDipietro force-pushed the solana/settler-signatures branch from 5e98bce to 10e2025 Compare November 5, 2025 19:59
Base automatically changed from solana/settler to main November 12, 2025 15:56
@GuidoDipietro GuidoDipietro changed the base branch from main to solana/settler December 15, 2025 19:54
@GuidoDipietro GuidoDipietro marked this pull request as ready for review December 16, 2025 19:33
@GuidoDipietro
Copy link
Member Author

Back to draft as I will split this PR into multiple smaller ones.

@GuidoDipietro GuidoDipietro marked this pull request as draft December 17, 2025 14:19
@GuidoDipietro
Copy link
Member Author

Splitting this PR in #45, #48, #49 and #50.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants