Skip to content

(pausable option C) Pausable sapient signer#96

Open
Agusx1211 wants to merge 7 commits into
masterfrom
pausable-sapient
Open

(pausable option C) Pausable sapient signer#96
Agusx1211 wants to merge 7 commits into
masterfrom
pausable-sapient

Conversation

@Agusx1211

Copy link
Copy Markdown
Member

Pausable sapient signer that must be used alongside a NESTED_TREE leaf to add "pausable" functionality into any section of a sequence configuration tree.

@Agusx1211 Agusx1211 requested a review from a team April 15, 2026 07:34
Comment thread src/pausable/PausableSapient.sol Outdated
Comment thread src/pausable/Pausable.sol Outdated
@Agusx1211 Agusx1211 requested a review from ScreamingHawk April 21, 2026 07:29
ScreamingHawk
ScreamingHawk previously approved these changes Apr 21, 2026

@ScreamingHawk ScreamingHawk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread src/pausable/Pausable.sol
Comment thread src/pausable/Pausable.sol Outdated
Comment thread src/pausable/PausableSapient.sol
/// @title PausableSapient
/// @notice Compact sapient signer that returns a fixed image hash unless paused.
/// @dev Reverts with `EnforcedPause` while paused.
contract PausableSapient is ISapientCompact, Pausable {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if the configuration route goes through the same NESTED_TREE that includes PausableSapient to avoid a situation of deadlock (unable to reconfigure).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There shouldn't be a risk of a deadlock, because at the end of the day pausable can be paused/unpaused independently from the wallet. Meaning that even if the wallet cannot sign, then the owner can still unpause the wallet, they are two different mechanism.

Additionally, there is not a direct way for PausableSapient to enforce its own position within the tree, it is never called when the tree is created (the tree is defined counterfactually), so it could never implement any rules on it.

Comment thread src/pausable/PausableSapient.sol

@ScreamingHawk ScreamingHawk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

shunkakinoki added a commit that referenced this pull request Jun 5, 2026
OIFSapient: EIP-712 quote attestation verification for OIF PDAs.
Verifies that a trusted signer (solver/aggregator) committed to the
quote's economic terms via ECDSA. Modeled after RelaySapient.

PausableSapient: compact sapient signer for emergency pause capability.
Returns UNPAUSED_IMAGE_HASH when active, reverts when paused.
Used in wallet config tree with threshold=2: PausableSapient (weight=1)
+ provider sapient (weight=1) = 2 >= threshold. Owner (weight=2)
bypasses pause for recovery.

From trails-contracts PR #96 (pausable-sapient branch).
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.

3 participants