Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop' into huangminghuang/duplicate-connection-fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
huangminghuang committed Feb 10, 2021
2 parents 614b928 + 585a07a commit d3faf27
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 59 deletions.
18 changes: 9 additions & 9 deletions .cicd/generate-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ echo $PLATFORMS_JSON_ARRAY | jq -cr '.[]' | while read -r PLATFORM_JSON; do
agents:
queue: "$BUILDKITE_BUILD_AGENT_QUEUE"
timeout: ${TIMEOUT:-180}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.]')${SKIP_BUILD}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.] // empty')${SKIP_BUILD}
EOF
else
Expand Down Expand Up @@ -169,7 +169,7 @@ EOF
PROJECT_TAG: $(echo "$PLATFORM_JSON" | jq -r .HASHED_IMAGE_TAG)
timeout: ${TIMEOUT:-180}
agents: "queue=mac-anka-large-node-fleet"
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.]')${SKIP_BUILD}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.] // empty')${SKIP_BUILD}
EOF
fi
Expand Down Expand Up @@ -213,7 +213,7 @@ if [[ "$DCMAKE_BUILD_TYPE" != 'Debug' ]]; then
manual:
permit_on_passed: true
timeout: ${TIMEOUT:-30}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.]')${SKIP_UNIT_TESTS}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.] // empty')${SKIP_UNIT_TESTS}
EOF
else
Expand Down Expand Up @@ -242,7 +242,7 @@ EOF
manual:
permit_on_passed: true
timeout: ${TIMEOUT:-60}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.]')${SKIP_UNIT_TESTS}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.] // empty')${SKIP_UNIT_TESTS}
EOF
fi
Expand All @@ -266,7 +266,7 @@ EOF
manual:
permit_on_passed: true
timeout: ${TIMEOUT:-30}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.]')${SKIP_WASM_SPEC_TESTS}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.] // empty')${SKIP_WASM_SPEC_TESTS}
EOF
else
Expand Down Expand Up @@ -295,7 +295,7 @@ EOF
manual:
permit_on_passed: true
timeout: ${TIMEOUT:-60}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.]')${SKIP_WASM_SPEC_TESTS}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.] // empty')${SKIP_WASM_SPEC_TESTS}
EOF
fi
Expand Down Expand Up @@ -351,7 +351,7 @@ EOF
manual:
permit_on_passed: true
timeout: ${TIMEOUT:-60}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.]')${SKIP_SERIAL_TESTS}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.] // empty')${SKIP_SERIAL_TESTS}
EOF
fi
Expand Down Expand Up @@ -380,7 +380,7 @@ EOF
manual:
permit_on_passed: true
timeout: ${TIMEOUT:-180}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.]')${SKIP_LONG_RUNNING_TESTS:-true}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.] // empty')${SKIP_LONG_RUNNING_TESTS:-true}
EOF
else
Expand Down Expand Up @@ -409,7 +409,7 @@ EOF
manual:
permit_on_passed: true
timeout: ${TIMEOUT:-180}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.]')${SKIP_LONG_RUNNING_TESTS:-true}
skip: $(echo "$PLATFORM_JSON" | jq -r '.PLATFORM_SKIP_VAR | env[.] // empty')${SKIP_LONG_RUNNING_TESTS:-true}
EOF
fi
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ To uninstall the EOSIO built/installed binaries and dependencies, run:
1. [Roadmap](https://github.com/EOSIO/Documentation/blob/master/Roadmap.md)

## Getting Started
Instructions detailing the process of getting the software, building it, running a simple test network that produces blocks, account creation and uploading a sample contract to the blockchain can be found in the [Getting Started](https://developers.eos.io/welcome/latest/getting-started) walkthrough.
Instructions detailing the process of getting the software, building it, running a simple test network that produces blocks, account creation and uploading a sample contract to the blockchain can be found in the [Getting Started](https://developers.eos.io/welcome/latest/getting-started-guide) walkthrough.

## Contributing

Expand Down
49 changes: 33 additions & 16 deletions docs/02_cleos/02_how-to-guides/how-to-create-a-wallet.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,60 @@
## Goal

Create a `keosd` wallet
Create a wallet using `keosd`.

## Before you begin

* Install the currently supported version of `cleos`
Make sure you meet the following requirements:

* Understand the following:
* What is an account
* What is a public and private key pair
* Familiarize with the [`cleos wallet create`](../03_command-reference/wallet/create.md) command and its parameters.
* Familiarize with the other [`cleos wallet`](../03_command-reference/wallet/index.md) commands.
* Install the currently supported version of `cleos`.

[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.

* Understand what an [account](https://developers.eos.io/welcome/latest/glossary/index/#account) is and its role in the blockchain.
* Understand [Accounts and Permissions](https://developers.eos.io/welcome/latest/protocol-guides/accounts_and_permissions) in the protocol documents.
* Understand what a [public](https://developers.eos.io/welcome/latest/glossary/index/#public-key) and [private](https://developers.eos.io/welcome/latest/glossary/index/#private-key) key pair is.

## Steps

Create a wallet and save the password to a file:
Perform the step below:

Create a default or named wallet and save the wallet password to a file:

```sh
cleos wallet create --file password.pwd
cleos wallet create [-n named_wallet] -f <file_to_save_pwd>
```

This should produce similar output as below. Note the wallet is named `default` if no name is provided.
Where `file_to_save_pwd` is the name of the file to write the wallet password to and `named_wallet` is an optional parameter to assign a name to the wallet.

Some examples are provided below:

* Create a default wallet and save the password to the file `default_wallet.pwd`:

**Example Output**

```sh
cleos wallet create -f default_wallet.pwd
```
```console
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
saving password to password.pwd
saving password to default_wallet.pwd
```

Alternatively, you can name a wallet with `-n` option:
* Create a named wallet `my_wallet` and save the password to the file `my_wallet.pwd`:

**Example Output**

```sh
cleos wallet create -n named_wallet -f passwd
cleos wallet create -n my_wallet -f my_wallet.pwd
```

You should see something like the output below:

```console
Creating wallet: named_wallet
Creating wallet: my_wallet
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
saving password to passwd
saving password to my_wallet.pwd
```
41 changes: 28 additions & 13 deletions docs/02_cleos/02_how-to-guides/how-to-delegate-CPU-resource.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,47 @@
## Goal

Delegate resource for an account or application
Delegate CPU bandwidth for an account or application.

## Before you begin

* Install the currently supported version of `cleos`
Make sure you meet the following requirements:

* Ensure the reference system contracts from `eosio.contracts` repository is deployed and used to manage system resources
* Familiarize with the [`cleos system delegatebw`](../03_command-reference/system/system-delegatebw.md) command and its parameters.
* Install the currently supported version of `cleos`.

* Understand the following:
* What is an account
* What is network bandwidth
* What is CPU bandwidth
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.

* Ensure the reference system contracts from [`eosio.contracts`](https://github.com/EOSIO/eosio.contracts) repository is deployed and used to manage system resources.
* Understand what an [account](https://developers.eos.io/welcome/latest/glossary/index/#account) is and its role in the blockchain.
* Understand [CPU bandwidth](https://developers.eos.io/welcome/latest/glossary/index/#cpu) in an EOSIO blockchain.
* Understand [NET bandwidth](https://developers.eos.io/welcome/latest/glossary/index/#net) in an EOSIO blockchain.

## Steps

Delegate 0.01 SYS CPU bandwidth from `bob` to `alice`
Perform the step below:

Delegate CPU bandwidth from a source account to a receiver account:

```sh
cleos system delegatebw bob alice "0 SYS" "0.01 SYS"
cleos system delegatebw <from> <receiver> <stake_net_quantity> <stake_cpu_quantity>
```

You should see something below:
Where `from` is the account to delegate bandwidth from, `receiver` is the account to receive the delegated bandwidth, and `stake_net_quantity` and/or `stake_cpu_quantity` is the amount of tokens to stake for network (NET) bandwidth and/or CPU bandwidth, respectively.

Some examples are provided below:

* Delegate 0.01 SYS CPU bandwidth from `bob` to `alice`:

```console
**Example Output**

```sh
cleos system delegatebw bob alice "0 SYS" "0.01 SYS"
```
```json
executed transaction: 5487afafd67bf459a20fcc2dbc5d0c2f0d1f10e33123eaaa07088046fd18e3ae 192 bytes 503 us
# eosio <= eosio::delegatebw {"from":"bob","receiver":"alice","stake_net_quantity":"0.0000 SYS","stake_cpu_quanti...
# eosio.token <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.0010 EOS","memo":"stake bandwidth"}
# eosio <= eosio::delegatebw {"from":"bob","receiver":"alice","stake_net_quantity":"0.0000 SYS","stake_cpu_quantity":"0.0100 SYS"...
# eosio.token <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.0010 SYS","memo":"stake bandwidth"}
# bob <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.0010 SYS","memo":"stake bandwidth"}
# eosio.stake <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.0010 SYS","memo":"stake bandwidth"}
```
39 changes: 26 additions & 13 deletions docs/02_cleos/02_how-to-guides/how-to-delegate-net-resource.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
## Goal

Delegate resource for an account or application
Delegate network bandwidth for an account or application.

## Before you begin

* Install the currently supported version of `cleos`
Make sure you meet the following requirements:

* Ensure the reference system contracts from `eosio.contracts` repository is deployed and used to manage system resources

* Understand the following:
* What is an account
* What is network bandwidth
* What is CPU bandwidth
* Familiarize with the [`cleos system delegatebw`](../03_command-reference/system/system-delegatebw.md) command and its parameters.
* Install the currently supported version of `cleos`.

[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.

* Ensure the reference system contracts from [`eosio.contracts`](https://github.com/EOSIO/eosio.contracts) repository is deployed and used to manage system resources.
* Understand what an [account](https://developers.eos.io/welcome/latest/glossary/index/#account) is and its role in the blockchain.
* Understand [NET bandwidth](https://developers.eos.io/welcome/latest/glossary/index/#net) in an EOSIO blockchain.
* Understand [CPU bandwidth](https://developers.eos.io/welcome/latest/glossary/index/#cpu) in an EOSIO blockchain.

## Steps

Delegate 0.01 SYS network bandwidth from `bob` to `alice`
Perform the step below:

Delegate CPU bandwidth from a source account to a receiver account:

```sh
cleos system delegatebw bob alice "0.01 SYS" "0 SYS"
cleos system delegatebw <from> <receiver> <stake_net_quantity> <stake_cpu_quantity>
```

You should see something below:
Where `from` is the account to delegate bandwidth from, `receiver` is the account to receive the delegated bandwidth, and `stake_net_quantity` and/or `stake_cpu_quantity` is the amount of tokens to stake for network (NET) bandwidth and/or CPU bandwidth, respectively.

Some examples are provided below:

* Delegate 0.01 SYS network bandwidth from `bob` to `alice`:

```console
**Example Output**

```sh
cleos system delegatebw bob alice "0.01 SYS" "0 SYS"
```
```json
executed transaction: 5487afafd67bf459a20fcc2dbc5d0c2f0d1f10e33123eaaa07088046fd18e3ae 192 bytes 503 us
# eosio <= eosio::delegatebw {"from":"bob","receiver":"alice","stake_net_quantity":"0.0100 SYS","stake_cpu_quanti...
# eosio <= eosio::delegatebw {"from":"bob","receiver":"alice","stake_net_quantity":"0.0100 SYS","stake_cpu_quantity":"0.0000 SYS"...
# eosio.token <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.0010 SYS","memo":"stake bandwidth"}
# bob <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.0010 SYS","memo":"stake bandwidth"}
# eosio.stake <= eosio.token::transfer {"from":"bob","to":"eosio.stake","quantity":"0.0010 SYS","memo":"stake bandwidth"}
Expand Down
Loading

0 comments on commit d3faf27

Please sign in to comment.