Repository navigation
Fix/settle cap terminate hardening - #201
Merged
Merged
Conversation
… set_settle_epoch_cap The midrib program's `Deposit` and `WithdrawVoucher` accounts structs now end with the instance's Termination PDA (`[b"terminated", instance]`, read-only, must be empty). Anchor binds accounts positionally, so without it every Solana deposit and voucher withdrawal fails account validation. - deposit_ix: termination appended after the rent sysvar (11 accounts). - withdraw_voucher_ix: termination appended after system_program (14). - set_settle_epoch_cap_ix + derive_settle_epoch_pda: the operator-admin-signed per-(instance, mint) settlement cap, same shape as set_withdraw_epoch_cap. - fetch_settle_epoch / SettleEpochState (settled is u128 on chain). - explain_midrib_error: submit errors carrying Terminated, TerminationDelayPending, WithdrawEpochCapExceeded or OperatorAdminIsSigner gain a plain-English line. Account-list tests pin deposit, withdraw_voucher and set_settle_epoch_cap against the program structs, and the two new seeds against the program's literals.
Rebuilt with forge 1.7.1 from arborter fix/settle-cap-terminate-hardening
(7a8e4a1). Purely additive to the ABI — no existing function, event or
error changed:
MidribV3
functions setSettleEpochCap(address,uint256), settleEpochCap(address),
settledInEpoch(address,uint256), terminatedAt(),
TERMINATION_DELAY()
events SettleEpochCapSet
errors SETTLE_RATE_LIMITED(uint256,uint256),
TERMINATION_DELAY_PENDING(uint256), OPERATOR_ADMIN_IS_SIGNER
MidribFactory
errors OPERATOR_ADMIN_IS_SIGNER
No sdk code calls the new entries yet.
…n rules - aspens::operator::set_settle_epoch_cap and `aspens-cli set-settle-epoch-cap <network> <token> <cap>`: arm the Solana settlement cap with the offline operator-admin key, pre-flighted and read back like set-withdraw-epoch-cap (the shared pre-flight is now one helper). - The operator admin can no longer equal the TEE signer (program, factory and deployer all refuse it), so the "default deploy shape" wording is gone; the warning remains for an instance created before that check. - set-operator-fee / rotate-operator-admin docs: the arborter submits these with its own key, so they fail on-chain against any instance the current contracts mint. - README and CHANGELOG.
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
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.
No description provided.