Skip to content
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

[cli/alias] Keytool update alias #15162

Merged
merged 9 commits into from
Dec 11, 2023

Conversation

stefan-mysten
Copy link
Contributor

@stefan-mysten stefan-mysten commented Dec 2, 2023

Description

Provide a new command for updating the alias of an address. The new command keytool alias has one flag --update, followed by an old alias that needs to be updated, and optionally, a new alias name. If there is no new alias given, a new random alias will be generated.

An example for using this command is:
sui keytool update-alias test high_yield_address, which outputs the following text:

Old alias test was updated to high_yield_address

Test Plan

Two new tests for FileBasedKeystore and InMemKeystore.
image


If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.

Type of Change (Check all that apply)

  • protocol change
  • user-visible impact
  • breaking change for a client SDKs
  • breaking change for FNs (FN binary must upgrade)
  • breaking change for validators or node operators (must upgrade binaries)
  • breaking change for on-chain data layout
  • necessitate either a data wipe or data migration

Release notes

Added support for updating an alias of an address in the Sui CLI. See the console help for this command using: sui keytool update-alias --help.

@stefan-mysten stefan-mysten requested review from amnn and removed request for patrickkuo and joyqvq December 2, 2023 17:25
Copy link

vercel bot commented Dec 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mysten-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2023 9:49pm
sui-core ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2023 9:49pm
sui-typescript-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2023 9:49pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
explorer ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2023 9:49pm
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2023 9:49pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2023 9:49pm

@stefan-mysten stefan-mysten merged commit 0eeecff into MystenLabs:main Dec 11, 2023
39 checks passed
@stefan-mysten stefan-mysten deleted the keytool_update_alias branch December 11, 2023 22:47
gdanezis pushed a commit that referenced this pull request Dec 15, 2023
## Description 

Provide a new command for updating the alias of an address. The new
command `keytool update-alias` takes an old
alias that needs to be updated, and optionally, a new alias name. If
there is no new alias given, a new random alias will be generated. 
Furthermore, the alias must start with a letter and can contain only letters, digits, hyphens (-), or underscores (_).

An example for using this command is: 
`sui keytool update-alias test high_yield_address`, which outputs the
following text:

`Old alias test was updated to high_yield_address`

## Test Plan 

Two new tests for FileBasedKeystore and InMemKeystore.
<img width="869" alt="image"
src="https://github.com/MystenLabs/sui/assets/135084671/2f3cecd1-d283-4a9d-8995-d3999888a9e9">

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] protocol change
- [x] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
Added support for updating an alias of an address in the Sui CLI. The alias must start with a letter and can contain only letters, digits, hyphens (-), or underscores (_). Try it out through this command: `sui keytool update-alias --help`
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.

None yet

3 participants