Skip to content

fix: thread --announce-only through stake/liquidity/crowd submission paths#899

Merged
thewhaleking merged 1 commit intolatent-to:stagingfrom
bitloi:fix/issue-2-announce-only-stake-liquidity-crowd
Apr 8, 2026
Merged

fix: thread --announce-only through stake/liquidity/crowd submission paths#899
thewhaleking merged 1 commit intolatent-to:stagingfrom
bitloi:fix/issue-2-announce-only-stake-liquidity-crowd

Conversation

@bitloi
Copy link
Copy Markdown
Contributor

@bitloi bitloi commented Apr 3, 2026

Closes #898

--announce-only was accepted at the CLI layer but dropped on multiple stake/liquidity/crowd paths before extrinsic submission.

This change:

  • threads announce_only from CLI handlers into downstream command functions
  • passes announce_only to sign_and_send_extrinsic / sign_and_send_batch_extrinsic
  • fixes the interactive unstake -> unstake_all path to forward proxy + announce_only
  • keeps announce-only behavior consistent by disabling MEV shielding when announcing
  • adds regression tests for CLI forwarding and command-level forwarding across stake, liquidity, and crowd flows

@bitloi bitloi changed the base branch from main to staging April 3, 2026 00:36
@bitloi bitloi force-pushed the fix/issue-2-announce-only-stake-liquidity-crowd branch 3 times, most recently from b4807ac to c420a37 Compare April 3, 2026 02:35
@bitloi
Copy link
Copy Markdown
Contributor Author

bitloi commented Apr 6, 2026

@ibraheem-abe Thanks for your review. I just fixed the conflict, would you please review this PR as well?

Copy link
Copy Markdown
Contributor

@thewhaleking thewhaleking left a comment

Choose a reason for hiding this comment

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

LGTM but want @ibraheem-abe to verify

@ibraheem-abe
Copy link
Copy Markdown
Contributor

The forwarding looks right to me, but I think the success UX is still a bit off for --announce-only.

In that mode we’re only submitting Proxy.announce, not actually executing the underlying stake/liquidity/crowd call yet.
Execution only happens later.

Some of these paths still seem to report success as if the real action already happened, which feels misleading.
(For example, stake added, crowdloan funded etc)

Ideally we should branch the success handling for announce_only=True so we say “announcement submitted” instead of showing finalized-style messaging for the underlying operation (Eg: Stake added, Stake removed).

A disclaimer might be useful too in cases where we interact with staking calls and show the slippage table etc
(eg: this is the expected receivable xyz right now; not guaranteed when the call actually executes)

@thewhaleking wdyt

@thewhaleking
Copy link
Copy Markdown
Contributor

The forwarding looks right to me, but I think the success UX is still a bit off for --announce-only.

In that mode we’re only submitting Proxy.announce, not actually executing the underlying stake/liquidity/crowd call yet. Execution only happens later.

Some of these paths still seem to report success as if the real action already happened, which feels misleading. (For example, stake added, crowdloan funded etc)

Ideally we should branch the success handling for announce_only=True so we say “announcement submitted” instead of showing finalized-style messaging for the underlying operation (Eg: Stake added, Stake removed).

A disclaimer might be useful too in cases where we interact with staking calls and show the slippage table etc (eg: this is the expected receivable xyz right now; not guaranteed when the call actually executes)

@thewhaleking wdyt

Now that you mention it, that is probably why I didn't fully implement this.

@ibraheem-abe
Copy link
Copy Markdown
Contributor

ibraheem-abe commented Apr 7, 2026

The forwarding looks right to me, but I think the success UX is still a bit off for --announce-only.
In that mode we’re only submitting Proxy.announce, not actually executing the underlying stake/liquidity/crowd call yet. Execution only happens later.
Some of these paths still seem to report success as if the real action already happened, which feels misleading. (For example, stake added, crowdloan funded etc)
Ideally we should branch the success handling for announce_only=True so we say “announcement submitted” instead of showing finalized-style messaging for the underlying operation (Eg: Stake added, Stake removed).
A disclaimer might be useful too in cases where we interact with staking calls and show the slippage table etc (eg: this is the expected receivable xyz right now; not guaranteed when the call actually executes)
@thewhaleking wdyt

Now that you mention it, that is probably why I didn't fully implement this.

Should effort be made to add this branching right now or during/after V10?
We probably need to handle this cmd to cmd basis as well if we wanna have a great UX for this module.

@bitloi
Copy link
Copy Markdown
Contributor Author

bitloi commented Apr 7, 2026

@thewhaleking @ibraheem-abe Do you want me to add announce-only success messaging in this PR or as a follow-up?

@thewhaleking
Copy link
Copy Markdown
Contributor

@ibraheem-abe raises a good point. Because of the large refactor this is going to require, I think we'll hold off on this until v10. Adding it to the RFC.

Copy link
Copy Markdown
Contributor

@thewhaleking thewhaleking left a comment

Choose a reason for hiding this comment

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

@bitloi if you want to salvage this PR until we implement this in v10, instead just remove all the --announce-only args of cli.py methods which take them (e.g. the ones in here where you added the passthrough of those args).

@bitloi
Copy link
Copy Markdown
Contributor Author

bitloi commented Apr 8, 2026

@bitloi if you want to salvage this PR until we implement this in v10, instead just remove all the --announce-only args of cli.py methods which take them (e.g. the ones in here where you added the passthrough of those args).

Okay, I will update soon.

Remove the --announce-only flag from 37 CLI methods where it was
accepted but never passed to the underlying command functions.

Only wallet_transfer and proxy_kill retain the flag (they already
thread it through to the extrinsic layer).

The full announce-only UX (branched success messaging, slippage
disclaimers) is deferred to v10 per maintainer decision.
@bitloi bitloi force-pushed the fix/issue-2-announce-only-stake-liquidity-crowd branch from 4db4ff5 to af5c2ca Compare April 8, 2026 14:29
@bitloi bitloi requested a review from thewhaleking April 8, 2026 14:30
@bitloi
Copy link
Copy Markdown
Contributor Author

bitloi commented Apr 8, 2026

Ready for review! @thewhaleking

@thewhaleking thewhaleking merged commit 513e4a5 into latent-to:staging Apr 8, 2026
88 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: --announce-only is silently dropped in stake/liquidity/crowd commands

3 participants