-
Notifications
You must be signed in to change notification settings - Fork 66
Problem(fix #1043) watch-only mode cannot be used in client-cli #1074
Conversation
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.
lgtm
@@ -123,11 +129,26 @@ impl AddressCommand { | |||
success(&format!("New address: {}", address)); | |||
Ok(()) | |||
} | |||
AddressType::StakingWatch => { | |||
let enckey = ask_seckey(None)?; | |||
let public_key = ask_public_key(None)?; |
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.
public key is not secret stuff, maybe pass it in the argument?
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.
sure
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.
But when creating a normal staking address or transfer address, no need to pass the pubkey, if we pass the pubkey in the arguments, it may make some confusion.
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.
It's more like import an existing address, rather than create an new address?
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.
The state of a staking addres is public, anyone with the staking address is able to check its state.
aee90b6
to
bea1005
Compare
Codecov Report
@@ Coverage Diff @@
## master #1074 +/- ##
==========================================
- Coverage 66.26% 66.24% -0.02%
==========================================
Files 147 145 -2
Lines 18791 18839 +48
==========================================
+ Hits 12451 12480 +29
- Misses 6340 6359 +19
|
Staking, | ||
StakingWatch, |
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 no need for this, as it's public information -- just use "state" command to retrieve it: #1035
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.
Ok
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.
no need for staking address watch, as it's already there / directly queryable
bea1005
to
b81a895
Compare
bors r+ |
1074: Problem(fix #1043) watch-only mode cannot be used in client-cli r=tomtau a=linfeng-crypto solution: add `restore basic wallet ` and `create watch address` in client-cli 1081: Bump sgx_types from `93c76de` to `71a88b6` r=tomtau a=dependabot-preview[bot] Bumps [sgx_types](https://github.com/apache/teaclave-sgx-sdk) from `93c76de` to `71a88b6`. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/71a88b647bb76a16cbc5c3e29403e2afb67f82fd"><code>71a88b6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/apache/teaclave-sgx-sdk/issues/205">#205</a> from volcano0dr/master</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/35a250b62dd8a71425f5dcf41e98e787a053d55a"><code>35a250b</code></a> Fix read/write buffer check</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/8d9f05abd2ebe0a3f1db901f2280513c36325553"><code>8d9f05a</code></a> Fix http_req makefile for default SGX_SDK_RUST location</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/dadd11780ca88893b279cf00469f10d47a083f20"><code>dadd117</code></a> Refine http_req by using in-enclave dns lookup ocall</li> <li>See full diff in <a href="https://github.com/apache/teaclave-sgx-sdk/compare/93c76de88befbfc1f483ce8336c7ee1f0c7f7563...71a88b647bb76a16cbc5c3e29403e2afb67f82fd">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details> 1082: Bump sgx_urts from `93c76de` to `71a88b6` r=tomtau a=dependabot-preview[bot] Bumps [sgx_urts](https://github.com/apache/teaclave-sgx-sdk) from `93c76de` to `71a88b6`. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/71a88b647bb76a16cbc5c3e29403e2afb67f82fd"><code>71a88b6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/apache/teaclave-sgx-sdk/issues/205">#205</a> from volcano0dr/master</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/35a250b62dd8a71425f5dcf41e98e787a053d55a"><code>35a250b</code></a> Fix read/write buffer check</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/8d9f05abd2ebe0a3f1db901f2280513c36325553"><code>8d9f05a</code></a> Fix http_req makefile for default SGX_SDK_RUST location</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/dadd11780ca88893b279cf00469f10d47a083f20"><code>dadd117</code></a> Refine http_req by using in-enclave dns lookup ocall</li> <li>See full diff in <a href="https://github.com/apache/teaclave-sgx-sdk/compare/93c76de88befbfc1f483ce8336c7ee1f0c7f7563...71a88b647bb76a16cbc5c3e29403e2afb67f82fd">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details> 1083: Bump sgx_tcrypto from `93c76de` to `71a88b6` r=tomtau a=dependabot-preview[bot] Bumps [sgx_tcrypto](https://github.com/apache/teaclave-sgx-sdk) from `93c76de` to `71a88b6`. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/71a88b647bb76a16cbc5c3e29403e2afb67f82fd"><code>71a88b6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/apache/teaclave-sgx-sdk/issues/205">#205</a> from volcano0dr/master</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/35a250b62dd8a71425f5dcf41e98e787a053d55a"><code>35a250b</code></a> Fix read/write buffer check</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/8d9f05abd2ebe0a3f1db901f2280513c36325553"><code>8d9f05a</code></a> Fix http_req makefile for default SGX_SDK_RUST location</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/dadd11780ca88893b279cf00469f10d47a083f20"><code>dadd117</code></a> Refine http_req by using in-enclave dns lookup ocall</li> <li>See full diff in <a href="https://github.com/apache/teaclave-sgx-sdk/compare/93c76de88befbfc1f483ce8336c7ee1f0c7f7563...71a88b647bb76a16cbc5c3e29403e2afb67f82fd">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details> Co-authored-by: linfeng <linfeng@crypto.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Build failed (retrying...) |
1074: Problem(fix #1043) watch-only mode cannot be used in client-cli r=tomtau a=linfeng-crypto solution: add `restore basic wallet ` and `create watch address` in client-cli 1081: Bump sgx_types from `93c76de` to `71a88b6` r=tomtau a=dependabot-preview[bot] Bumps [sgx_types](https://github.com/apache/teaclave-sgx-sdk) from `93c76de` to `71a88b6`. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/71a88b647bb76a16cbc5c3e29403e2afb67f82fd"><code>71a88b6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/apache/teaclave-sgx-sdk/issues/205">#205</a> from volcano0dr/master</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/35a250b62dd8a71425f5dcf41e98e787a053d55a"><code>35a250b</code></a> Fix read/write buffer check</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/8d9f05abd2ebe0a3f1db901f2280513c36325553"><code>8d9f05a</code></a> Fix http_req makefile for default SGX_SDK_RUST location</li> <li><a href="https://github.com/apache/incubator-teaclave-sgx-sdk/commit/dadd11780ca88893b279cf00469f10d47a083f20"><code>dadd117</code></a> Refine http_req by using in-enclave dns lookup ocall</li> <li>See full diff in <a href="https://github.com/apache/teaclave-sgx-sdk/compare/93c76de88befbfc1f483ce8336c7ee1f0c7f7563...71a88b647bb76a16cbc5c3e29403e2afb67f82fd">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details> Co-authored-by: linfeng <linfeng@crypto.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Build succeeded |
solution: add
restore basic wallet
andcreate watch address
in client-cli