Skip to content

feat(stake): add --relay for MEV Shield outer signer on stake commands#918

Open
claytonlin1110 wants to merge 1 commit intolatent-to:stagingfrom
claytonlin1110:feat/stake-relay-mev-shield
Open

feat(stake): add --relay for MEV Shield outer signer on stake commands#918
claytonlin1110 wants to merge 1 commit intolatent-to:stagingfrom
claytonlin1110:feat/stake-relay-mev-shield

Conversation

@claytonlin1110
Copy link
Copy Markdown

Summary

Implements --relay for btcli stake add/remove/move/transfer/swap commands to allow a separate coldkey (“relay”) to sign the outer MevShield.submit_encrypted extrinsic, while the staking coldkey continues to sign the inner staking extrinsic.

Closes #824

Motivation

Some users need operational separation:

  • the staking wallet signs the actual stake call (inner extrinsic),
  • while a designated relay wallet signs only the MEV Shield wrapper (outer extrinsic), so the staking wallet’s coldkey is not the outer signer.

User-facing Changes

New CLI flag

--relay <wallet name | coldkey SS58>

  • `Resolves to a coldkey wallet whose coldkey is used to sign the outer MEV Shield submission.

Commands updated

  • btcli stake add
  • btcli stake remove
  • btcli stake move
  • btcli stake transfer
  • btcli stake swap

Validation / Rules

  • --relay requires MEV protection.
    If --relay is used with --no-mev-protection, the CLI fails with an error.
  • The relay wallet is validated/resolved from the same wallet base path as the staking wallet:
    coldkey SS58: must match a coldkey present under that wallet path,
    wallet name: must exist as a wallet directory under that wallet path.

Testing

  • I ran py_compile (syntax check) on the modified files to ensure there are no syntax errors.
  • Full pytest tests/ could not be executed in this environment due to a missing system dependency (curses/_curses import failure during test collection).

@claytonlin1110
Copy link
Copy Markdown
Author

@thewhaleking Hi, my first contribution here, Would you please review and comment feedback? Thanks.

@claytonlin1110
Copy link
Copy Markdown
Author

@ibraheem-abe Sorry for pinging as i'm not sure who is the reviewer here... Thanks in advance.

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.

1 participant