Skip to content

Commit

Permalink
markdown replace bash with shell
Browse files Browse the repository at this point in the history
  • Loading branch information
assafmo committed Mar 19, 2020
1 parent c545360 commit 88bf578
Show file tree
Hide file tree
Showing 17 changed files with 261 additions and 232 deletions.
12 changes: 6 additions & 6 deletions docs/archive/validator-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ wget https://enigmaco-website.s3.amazonaws.com/enigmachain_0.0.1_amd64.deb

**Note:** If you will be using the same key from testnet you can export it to `stderr` with `enigmacli keys export <key-alias>` and paste it into `my.key` and later import it with `enigmacli keys import <key-alias> my.key`.

```bash
```shell
sudo dpkg -r enigmachain
sudo rm -rf ~/.enigmad ~/.enigmacli
sudo rm -rf ~/.engd ~/.engcli
Expand Down Expand Up @@ -166,7 +166,7 @@ engcli tx staking create-validator \

### 19. Check that you have been added as a validator:

```bash
```shell
engcli q staking validators
```

Expand All @@ -184,24 +184,24 @@ engcli tx staking delegate $(engcli keys show <key-alias> --bech=val -a) 1uscrt

## Seeing your rewards from being a validator

```bash
```shell
engcli q distribution rewards $(engcli keys show -a <key-alias>)
```

## Seeing your commissions from your delegators

```bash
```shell
engcli q distribution commission $(engcli keys show -a <key-alias> --bech=val)
```

## Withdrawing rewards

```bash
```shell
engcli tx distribution withdraw-rewards $(engcli keys show --bech=val -a <key-alias>) --from <key-alias>
```

## Withdrawing rewards+commissions

```bash
```shell
engcli tx distribution withdraw-rewards $(engcli keys show --bech=val -a <key-alias>) --from <key-alias> --commission
```
26 changes: 13 additions & 13 deletions docs/dev/for-enigma-blockchain-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Requirement**: Go version needs to be [1.13 or higher](https://golang.org/dl/).

```bash
```shell
git clone https://github.com/enigmampc/EnigmaBlockchain
cd EnigmaBlockchain
go mod tidy
Expand All @@ -11,7 +11,7 @@ make install # installs enigmad and enigmacli

# Developers Quick Start

```bash
```shell
enigmacli config chain-id enigma-testnet # now we won't need to type --chain-id enigma-testnet every time
enigmacli config output json
enigmacli config indent true
Expand Down Expand Up @@ -48,19 +48,19 @@ enigmad start --pruning nothing # starts a node
Now `a` is a validator with 1 SCRT (1000000uscrt) staked.
This is how `b` can delegate 0.00001 SCRT to `a`:

```bash
```shell
enigmacli tx staking delegate $(enigmacli keys show a --bech=val -a) 10uscrt --from b
```

This is how to see `b`'s rewards from delegating to `a`:

```bash
```shell
enigmacli q distribution rewards $(enigmacli keys show -a b)
```

This is how `b` can withdraw its rewards:

```bash
```shell
enigmacli tx distribution withdraw-rewards $(enigmacli keys show --bech=val -a a) --from b
```

Expand All @@ -69,19 +69,19 @@ enigmacli tx distribution withdraw-rewards $(enigmacli keys show --bech=val -a a
`a` was set up as a validator from genesis.
This is how to see `a`'s rewards from being a validator:

```bash
```shell
enigmacli q distribution rewards $(enigmacli keys show -a a)
```

This is how to see `a`'s commissions from being a validator:

```bash
```shell
enigmacli q distribution commission $(enigmacli keys show -a --bech=val a)
```

This is how `a` can withdraw its rewards + its commissions from being a validator:

```bash
```shell
enigmacli tx distribution withdraw-rewards $(enigmacli keys show --bech=val -a a) --from a --commission
```

Expand All @@ -91,21 +91,21 @@ enigmacli tx distribution withdraw-rewards $(enigmacli keys show --bech=val -a a

First, init your environment:

```bash
```shell
enigmad init [moniker] --chain-id enigma-testnet
```

Now you need a valid running node to send you their `genesis.json` file (usually at `~/.enigmad/config/genesis.json`).
Once you have the valid `genesis.json`, put it in `~/.enigmad/config/genesis.json` (overwrite the existing file if needed).
Next, edit your `~/.enigmad/config/config.toml`, set the `persistent_peers`:

```bash
```shell
persistent_peers = "[id]@[peer_node_ip]:26656" # `id` can be aquired from your first peer by running `enigmacli status`
```

That's it! Once you're done, just run:

```bash
```shell
enigmad start --pruning nothing
```

Expand All @@ -120,7 +120,7 @@ Congrats, you are now up and running!

After you have a private node up and running, run the following command:

```bash
```shell
enigmacli tx staking create-validator \
--amount=<num of coins> \ # This is the amount of coins you put at stake. i.e. 100000uscrt
--pubkey=$(enigmad tendermint show-validator) \
Expand All @@ -137,6 +137,6 @@ enigmacli tx staking create-validator \

To check if you got added to the validator-set by running:

```bash
```shell
enigmacli q tendermint-validator-set
```
10 changes: 5 additions & 5 deletions docs/dev/init-node-testnet-dev.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
### Download Release 0.0.1

```bash
```shell
wget https://github.com/enigmampc/EnigmaBlockchain/releases/download/v0.0.2/enigmachain_0.0.2_amd64.deb
```

### Remove old installations

```bash
```shell
sudo dpkg -r enigmachain
sudo rm -rf ~/.enigmad ~/.enigmacli
sudo rm -rf ~/.engd ~/.engcli
Expand All @@ -21,7 +21,7 @@ sudo rm -rf "$(which engd)"
- Attach storage to instance
- Run the following

```bash
```shell
# Create volumes and groups
sudo pvcreate /dev/xvdf
sudo vgcreate chainstate /dev/xvdf
Expand All @@ -43,13 +43,13 @@ sudo chown -R ubuntu .enigmad/

### Install the `.deb` file

```bash
```shell
sudo dpkg -i enigmachain_0.0.2_amd64.deb
```

### Config local node

```bash
```shell
enigmacli config chain-id "enigma-testnet"
enigmacli config output json
enigmacli config indent true
Expand Down
8 changes: 4 additions & 4 deletions docs/dev/setup-sgx.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ First, make sure you have rust installed: https://www.rust-lang.org/tools/instal

Then you can use this script (or run the commands one-by-one), which was tested on Ubuntu 20.04 with SGX driver/sdk version 2.9 intended for Ubuntu 18.04:

```bash
```shell
echo "\n\n#######################################"
echo "##### Installing missing packages #####"
echo "#######################################\n\n"
Expand Down Expand Up @@ -89,7 +89,7 @@ sudo apt install -y libsgx-enclave-common libsgx-enclave-common-dev libsgx-urts

Note that sometimes after a system reboot you'll need to reinstall the driver (usually after a kernel upgrade):

```bash
```shell
sudo $HOME/.sgxsdk/sgx_linux_x64_driver_*.bin
sudo mount -o remount,exec /dev
```
Expand All @@ -98,7 +98,7 @@ sudo mount -o remount,exec /dev

1. Using `sgx-detect`:

```bash
```shell
sudo apt install -y libssl-dev protobuf-compiler
cargo +nightly install fortanix-sgx-tools sgxs-tools

Expand All @@ -117,7 +117,7 @@ sudo mount -o remount,exec /dev
2. Compiling a `hello-rust` project:
```bash
```shell
git clone --depth 1 -b v1.1.1-testing [email protected]:apache/incubator-teaclave-sgx-sdk.git
cd incubator-teaclave-sgx-sdk/samplecode/hello-rust
Expand Down
Loading

0 comments on commit 88bf578

Please sign in to comment.