-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/seq bump #1909
base: main
Are you sure you want to change the base?
Feat/seq bump #1909
Conversation
}; | ||
|
||
#[derive(clap::Parser, Debug, Clone)] | ||
pub struct Cmd {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add an optional flag for seq number increment.
Sometimes (if you want to create multiple transactions) you want to increment to more than 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the interface should change slightly by avoiding the term bump.
It looks like it bumps relatively.
The stellar network has an operation called bump sequence that bumps an account seq absolutely not relatively.
Because of the similar names and concepts on first read I thought it behaved differently than it does.
Can I suggest using a name that unambiguously implies it increases the value, by using the term increment?
Separately we probably need a sub command to set the seq num, not modify it relatively.
In regards to doing the commands piecemeal, that sgtm, but we should have a plan for all the commands so that the UX we build piecemeal is consistent and we don't use patterns for the earlier commands that don't fit the latter ones.
We could keep this as The upside is that there are less commands and we can reuse the pattern elsewhere, such as modifying times. The downside would be if someone wanted to build a tx for SEP-10 that has a negative seq number, they'd have to set 0 then set -1. |
@leighmcculloch Good call, this totally makes sense to differentiate it from the bump seq operation. I like the idea of either using When I was just spiking out what using Or, we could use
That makes sense! I can turn the existing tx set issue (#1643) into an "epic" and add some subtasks so we can make sure to keep track of our plan for these commands, and keep things consistent.
👍 Sounds good! |
I think we should simplify this even further. I'd call this |
I agree with keeping things simple for now to see if people use/like this feature. I like keeping the flexibility of allowing users to increment by more than one, as Gleb suggested above. And to me, |
I'm looking to simplify the most common usage of sequence numbers which is getting the next one. I think it's fine to have a more generic way of setting sequence numbers (you're already doing it with |
Good call on Anyone doing something advanced with seq numbers is likely going to want to set a specific value, rather than increment it. And for the more common case of updating a tx to have a new next seq, then that probably fits in a more general command like |
Thanks for the feedback, all! Great conversation. Summarizing what I'm seeing in the feedback - the different use cases that we're trying to cover are (not necessarily in this pr):
I wonder if going back to I guess I'm leaning toward a |
8a343df
to
3a6473c
Compare
|
||
Update the transaction | ||
|
||
**Usage:** `stellar tx update <COMMAND>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to put this command under stellar tx update
instead of stellar tx edit
, since it does feel like a different set of commands than the current edit command, that opens an editor and allows the users to edit the tx json.
What
Add a command to allow for bumping a transaction's sequence number.
Why
After talking about
tx set
in our DevX meeting yesterday, we determined that maybe we should release one feature at a time, as the community finds them useful.tx edit seq-num bump
seems like it would be useful right off the bat, and will be good for starting to establish the foundation for this type of subcommand.Known limitations
This PR will need to be merged in after #1893 and may require a few updates.
The failing cargo deny advisories should be fixed in #1931