Skip to content

Commit

Permalink
Merge #627
Browse files Browse the repository at this point in the history
627: Changing default client port to 7777 for release 0.2.1 r=sacherjj a=sacherjj

Client port for users is defaulting to 50101 when it should be 7777.  I believe this is about local tests.

Co-authored-by: Joe Sacher <[email protected]>
  • Loading branch information
bors[bot] and sacherjj authored Dec 8, 2020
2 parents 23a4768 + c5faf19 commit e739e96
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ Ensure the network has fully started before running client commands. This can be
`nctl-view-node-peers` and checking each node has connections to all others.

For client commands requiring a node address (specified via the `--node-address` or `-n` arg), the default value is
`http://localhost:50101`, which should match the address of the first node of a testnet started via `nctl`, and thus
can usually be omitted.
`http://localhost:7777`, which is the address for a real network node. The `--node-address=http://localhost:50101`
argument must be included for the address of the first node of a testnet started via `nctl`.


### Transfer funds between purses
Expand All @@ -115,10 +115,11 @@ PUBLIC_KEY=$(cat $HOME/.client_keys/public_key_hex)
```

Then execute the `transfer` subcommand. We'll specify that we want to transfer 1,234,567 tokens from the main purse of
node 3, and that we'll pay a maximum of 10,000 tokens to execute this deploy:
node 3, and that we'll pay a maximum of 10,000 tokens to execute this deploy:

```
cargo run --release -- transfer \
--node-address=http://localhost:50101 \
--secret-key=../utils/nctl/assets/net-1/nodes/node-3/keys/secret_key.pem \
--amount=1234567 \
--target-account=$PUBLIC_KEY \
Expand Down Expand Up @@ -151,7 +152,7 @@ To see information about a deploy sent to the network via `transfer`, `put-deplo
For example, to see if our previous `transfer` command generated a deploy which was executed by the network:

```
cargo run --release -- get-deploy c42210759368a07a1b1ff4f019f7e77e7c9eaf2961b8c9dfc4237ea2218246c9
cargo run --release -- get-deploy --node-address=http://localhost:50101 c42210759368a07a1b1ff4f019f7e77e7c9eaf2961b8c9dfc4237ea2218246c9
```

<details><summary>example output</summary>
Expand Down Expand Up @@ -259,7 +260,9 @@ the deploy is included. If the deploy was successfully received and parsed by th
To see information about a `Block` created by the network, you can use `get-block`. For example:

```
cargo run --release -- get-block --block-hash=80a09df67f45bfb290c8f36021daf2fb898587a48fa0e4f7c506202ae8f791b8
cargo run --release -- get-block \
--node-address=http://localhost:50101 \
--block-hash=80a09df67f45bfb290c8f36021daf2fb898587a48fa0e4f7c506202ae8f791b8
```

<details><summary>example output</summary>
Expand Down Expand Up @@ -308,6 +311,7 @@ stored under our new account's public key:

```
cargo run --release -- query-state \
--node-address=http://localhost:50101 \
--state-root-hash=242666f5959e6a51b7a75c23264f3cb326eecd6bec6dbab147f5801ec23daed6 \
--key=$PUBLIC_KEY
```
Expand Down Expand Up @@ -351,6 +355,7 @@ This can be done via `get-balance`. For example, to get the balance of the main

```
cargo run --release -- get-balance \
--node-address=http://localhost:50101 \
--state-root-hash=242666f5959e6a51b7a75c23264f3cb326eecd6bec6dbab147f5801ec23daed6 \
--purse-uref=uref-09480c3248ef76b603d386f3f4f8a5f87f597d4eaffd475433f861af187ab5db-007
```
Expand All @@ -371,7 +376,7 @@ cargo run --release -- get-balance \

Note that the system mint contract is required to retrieve the balance of any given purse. If you execute a
`query-state` specifying a purse `URef` as the `--key` argument, you'll find that the actual value stored there is a
unit value `()`. This makes the `get-balance` subcommand particularly useful.
unit value `()`. This makes the `get-balance` subcommand particularly useful.

---

Expand Down
2 changes: 1 addition & 1 deletion client/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub mod node_address {
const ARG_NAME: &str = "node-address";
const ARG_SHORT: &str = "n";
const ARG_VALUE_NAME: &str = "HOST:PORT";
const ARG_DEFAULT: &str = "http://localhost:50101";
const ARG_DEFAULT: &str = "http://localhost:7777";
const ARG_HELP: &str = "Hostname or IP and port of node on which HTTP service is running";

pub fn arg(order: usize) -> Arg<'static, 'static> {
Expand Down

0 comments on commit e739e96

Please sign in to comment.