Skip to content

Commit

Permalink
Merge pull request #191 from nemtech/dev
Browse files Browse the repository at this point in the history
Dev -> Main
  • Loading branch information
fboucquez committed Mar 17, 2021
2 parents 9ed044a + 4c55231 commit 6a37a37
Show file tree
Hide file tree
Showing 76 changed files with 5,148 additions and 6,383 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.

The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [1.0.0] - Mar-16-2021

**Milestone**: Mainnet(1.0.0.0)

| Package | Version | Link |
| ---------------- | ------- | ------------------------------------------------------------------ |
| Symbol Bootstrap | v1.0.0 | [symbol-bootstrap](https://www.npmjs.com/package/symbol-bootstrap) |

- **New `mainnet` preset!!!**
- Removed node from its own `peers-p2p.json` and `peers-api.json` files.
- Voting keys are ephemeral. They cannot be provided, bootstrap will always generate a new one when resetting the configuration. Bootstrap will never store the voting private key in addresses.yml.
- Dropped `PROMPT_MAIN_VOTING` from `privateKeySecurityMode`.
- Added `PROMPT_MAIN_TRANSPORT` to `privateKeySecurityMode`: The transport/node key will be asked when regenerating the certificates or when upgrading a supernode.
- Changed server file permission to 0o600

## [0.4.5] - Mar-5-2021

**Milestone**: Hippopotamus(0.10.0.8)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ $ npm install -g symbol-bootstrap
$ symbol-bootstrap COMMAND
running command...
$ symbol-bootstrap (-v|--version|version)
symbol-bootstrap/0.4.5 linux-x64 node-v10.24.0
symbol-bootstrap/1.0.0 linux-x64 node-v12.18.4
$ symbol-bootstrap --help [COMMAND]
USAGE
$ symbol-bootstrap COMMAND
Expand Down
8 changes: 8 additions & 0 deletions alpha.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
. ./travis/node-functions.sh
VERSION="$(node_load_version)"
echo $VERSION
npm pack && /bin/bash travis/node-functions.sh node_publish_alpha
npm version "$VERSION" --commit-hooks false --git-tag-version false
npm run style:fix
3 changes: 3 additions & 0 deletions cmds/start-mainnet-dual.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
set -e
symbol-bootstrap start -p mainnet -a dual -t target/mainnet-dual -c test/mainnet_preset.yml $1 $2 $3
1 change: 1 addition & 0 deletions config/docker/server/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ echo "RUNNING $application $name $mode"
export LD_LIBRARY_PATH=$catapultAppFolder/lib:$catapultAppFolder/deps

ulimit -c unlimited
umask 077

rm -f "$dataDirectory/$application.started"
rm -f "$dataDirectory/$application-recovery.started"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ extension.mongo = false
extension.zeromq = false

# p2p extensions
extension.eventsource = false
extension.harvesting = {{harvesting}}
extension.syncsource = {{syncsource}}

Expand Down
3 changes: 2 additions & 1 deletion config/rest-gateway/rest.json.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"port": {{{apiNodeBrokerPort}}},
"monitorInterval": {{{apiNodeBrokerPortMonitorInterval}}},
"connectTimeout": {{{apiNodeBrokerConnectTimeout}}},
"monitorLoggingThrottle": {{{apiNodeBrokerMonitorLoggingThrottle}}}
"monitorLoggingThrottle": {{{apiNodeBrokerMonitorLoggingThrottle}}},
"maxSubscriptions": {{{maxSubscriptions}}}
},
"allowOptionalAddress": true
},
Expand Down
2 changes: 1 addition & 1 deletion docs/clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ EXAMPLE
$ symbol-bootstrap clean
```

_See code: [src/commands/clean.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/clean.ts)_
_See code: [src/commands/clean.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/clean.ts)_
2 changes: 1 addition & 1 deletion docs/compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ EXAMPLE
$ symbol-bootstrap compose
```

_See code: [src/commands/compose.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/compose.ts)_
_See code: [src/commands/compose.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/compose.ts)_
50 changes: 26 additions & 24 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,47 @@ USAGE
$ symbol-bootstrap config
OPTIONS
-a, --assembly=assembly An optional assembly type, example "dual" for testnet
-a, --assembly=assembly An optional assembly type, example "dual" for testnet
-c, --customPreset=customPreset External preset file. Values in this file will override the provided presets
(optional)
-c, --customPreset=customPreset External preset file. Values in this file will override the provided presets
(optional)
-h, --help It shows the help of this command.
-h, --help It shows the help of this command.
-p, --preset=(bootstrap|testnet) [default: bootstrap] the network preset
-p, --preset=(bootstrap|testnet|mainnet) [default: bootstrap] the network preset
-r, --reset It resets the configuration generating a new one
-r, --reset It resets the configuration generating a new one
-t, --target=target [default: target] The target folder where the symbol-bootstrap network is generated
-t, --target=target [default: target] The target folder where the symbol-bootstrap network is
generated
-u, --user=user [default: current] User used to run docker images when creating configuration files
like certificates or nemesis block. "current" means the current user.
-u, --user=user [default: current] User used to run docker images when creating
configuration files like certificates or nemesis block. "current" means the
current user.
--noPassword When provided, Bootstrap will not use a password, so private keys will be stored in
plain text. Use with caution.
--noPassword When provided, Bootstrap will not use a password, so private keys will be
stored in plain text. Use with caution.
--password=password A password used to encrypt and decrypt private keys in preset files like
addresses.yml and preset.yml. Bootstrap prompts for a password by default, can be
provided in the command line (--password=XXXX) or disabled in the command line
(--noPassword).
--password=password A password used to encrypt and decrypt private keys in preset files like
addresses.yml and preset.yml. Bootstrap prompts for a password by default,
can be provided in the command line (--password=XXXX) or disabled in the
command line (--noPassword).
--pullImages It pulls the utility images from DockerHub when running the configuration. It only
affects alpha/dev docker images.
--pullImages It pulls the utility images from DockerHub when running the configuration.
It only affects alpha/dev docker images.
--report It generates reStructuredText (.rst) reports describing the configuration of each
node.
--report It generates reStructuredText (.rst) reports describing the configuration of
each node.
--upgrade It regenerates the configuration reusing the previous keys. Use this flag when
upgrading the version of bootstrap to keep your node up to date without dropping the
local data. The original preset (-t), assembly (-a), and custom preset (-a) must be
used. Backup the target folder before upgrading.
--upgrade It regenerates the configuration reusing the previous keys. Use this flag
when upgrading the version of bootstrap to keep your node up to date without
dropping the local data. The original preset (-t), assembly (-a), and custom
preset (-a) must be used. Backup the target folder before upgrading.
EXAMPLES
$ symbol-bootstrap config -p bootstrap
$ symbol-bootstrap config -p testnet -a dual --password 1234
$ echo "$MY_ENV_VAR_PASSWORD" | symbol-bootstrap config -p testnet -a dual
```

_See code: [src/commands/config.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/config.ts)_
_See code: [src/commands/config.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/config.ts)_
2 changes: 1 addition & 1 deletion docs/decrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ EXAMPLES
plain-addresses.yml
```

_See code: [src/commands/decrypt.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/decrypt.ts)_
_See code: [src/commands/decrypt.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/decrypt.ts)_
2 changes: 1 addition & 1 deletion docs/encrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ EXAMPLES
encrypted-custom-preset.yml
```

_See code: [src/commands/encrypt.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/encrypt.ts)_
_See code: [src/commands/encrypt.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/encrypt.ts)_
2 changes: 1 addition & 1 deletion docs/enrolRewardProgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ EXAMPLES
$ echo "$MY_ENV_VAR_PASSWORD" | symbol-bootstrap enrolRewardProgram --url http://external-rest:3000
```

_See code: [src/commands/enrolRewardProgram.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/enrolRewardProgram.ts)_
_See code: [src/commands/enrolRewardProgram.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/enrolRewardProgram.ts)_
2 changes: 1 addition & 1 deletion docs/healthCheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ EXAMPLE
$ symbol-bootstrap healthCheck
```

_See code: [src/commands/healthCheck.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/healthCheck.ts)_
_See code: [src/commands/healthCheck.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/healthCheck.ts)_
2 changes: 1 addition & 1 deletion docs/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ EXAMPLES
$ echo "$MY_ENV_VAR_PASSWORD" | symbol-bootstrap link --unlink --useKnownRestGateways
```

_See code: [src/commands/link.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/link.ts)_
_See code: [src/commands/link.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/link.ts)_
11 changes: 7 additions & 4 deletions docs/presetGuides.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ The following sections describe the different ways you can protect your nodes' k
If you know the private keys of your node, you can provide them in a custom preset:

#### **`plain-custom-preset.yml`**

```yaml
nodes:
- voting: true
mainPrivateKey: CA82E7ADAF7AB729A5462A1BD5AA78632390634904A64EB1BB22295E2E1A1BDD
transportPrivateKey: 6154154096354BC3DB522174ACD8BFE553893A0991BD5D105599846F17A3383B
remotePrivateKey: E27AD508907524E2143EF2A3A272DDBEE7558B92550ABA5B82AD65D66B57BD00
vrfPrivateKey: F3C24C153783B683E40FB2671493B54480370BF4E3AB8027D4BF1293E14EB9B8
votingPrivateKey: EFE3F0EF0AB368B8D7AC194D52A8CCFA2D5050B80B9C76E4D2F4D4BF2CD461C1
```

Usage examples:
Expand All @@ -280,6 +280,9 @@ Usage examples:

If your custom preset contains private keys, it's highly recommended to `encrypt` it and provide `--password` when starting or configuring the node with Bootstrap.

Note: Voting keys are ephemeral. They cannot be provided, bootstrap will always generate a new one when resetting the configuration. Bootstrap will only store the public key of the voting key for reference and linking.
If the voting key file in the target folder is lost, bootstrap will generate a new voting key file from a new random key, and you will need to relink it to your main account (`link` command).

```
symbol-bootstrap encrypt --password 1234 --source plain-custom-preset.yml --destination encrypted-custom-preset.yml
rm plain-custom-preset.yml
Expand All @@ -297,14 +300,14 @@ Bootstrap will request them when performing the different operations requiring u
Example:

#### **`plain-custom-preset.yml`**

```yaml
nodes:
- voting: true
mainPublicKey: 93F9D99300DD04B66E727CA72667E5A2F6549A28AB8676B69ECAF30455C332E6
transportPublicKey: C9767496987222790518114049299DD52114BF2A8F7E5F4B70BB2B6365FAFD34
remotePublicKey: 2350F44F043DB9290390C59F1E1C2F06FCC1675E8B5F4CBDC00DD9DF4428E8FE
vrfPublicKey: 7834C8AAEFB09402DA32B22768D7CF9DCAC78A7774392E4452F07DDF776E088D
votingPublicKey: 4558724BE79FD0FD08A279878AF92F999B28D5622D3531CE9EFBC06466CDDF9C
```

In this case, this custom preset does not need to be encrypted as it doesn't contain any private information. Bootstrap will prompt for all private keys.
Expand All @@ -328,7 +331,7 @@ If this is you case, you can tell Bootstrap to not store these keys with the `pr
The `privateKeySecurityMode` defines which Private Keys can be encrypted and stored in the `target/addresses.yml`:
- `ENCRYPT`: All private Keys are encrypted and stored in the target's `addresses.yml` file. Bootstrap will have them to be used when required. This is Bootstrap's default behaviour.
- `PROMPT_MAIN`: Main Private Keys are not stored in the target's `addresses.yml` file. Bootstrap will prompt for the Main Private Key when generating certificates, or transactions need to be signed in the `link` and `enrolProgram` commands.
- `PROMPT_MAIN_VOTING`: Main and voting private keys are not stored in the target's `addresses.yml` file. Bootstrap will request the main private key when certificates are generated, or transactions need to be signed by the `link` and `enrolProgram` commands. The voting private key will be requested when generating the voting key file.
- `PROMPT_MAIN_TRANSPORT`: Main and transport private keys are not stored in the target's `addresses.yml` file. Bootstrap will request the main private key when certificates are generated, or transactions need to be signed by the `link` and `enrolProgram` commands. The transport private key will be asked when upgrading supernode agents.
- `PROMPT_ALL`: No Private Key is stored in the target's `addresses.yml` file. Bootstrap will prompt for the Private Keys when they are required in the different commands.

When using the `PROMPT` security modes Bootstrap may ask for private keys when running the different commands. This may not be suitable for automatic scripting.
Expand All @@ -342,6 +345,7 @@ Bootstrap will reject `PROMPT` security modes when an account is being randomly
A useful combination is enabling `PROMPT_MAIN`, which stores the main account public key in the preset, but encrypts the rest of the private keys.

#### **`plain-custom-preset.yml`**

```yaml
privateKeySecurityMode: PROMPT_MAIN
nodes:
Expand All @@ -350,7 +354,6 @@ nodes:
transportPrivateKey: 6154154096354BC3DB522174ACD8BFE553893A0991BD5D105599846F17A3383B
remotePrivateKey: E27AD508907524E2143EF2A3A272DDBEE7558B92550ABA5B82AD65D66B57BD00
vrfPrivateKey: F3C24C153783B683E40FB2671493B54480370BF4E3AB8027D4BF1293E14EB9B8
votingPrivateKey: EFE3F0EF0AB368B8D7AC194D52A8CCFA2D5050B80B9C76E4D2F4D4BF2CD461C1
```

```
Expand Down
2 changes: 1 addition & 1 deletion docs/report.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ EXAMPLE
$ symbol-bootstrap report
```

_See code: [src/commands/report.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/report.ts)_
_See code: [src/commands/report.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/report.ts)_
2 changes: 1 addition & 1 deletion docs/resetData.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ EXAMPLE
$ symbol-bootstrap resetData
```

_See code: [src/commands/resetData.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/resetData.ts)_
_See code: [src/commands/resetData.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/resetData.ts)_
2 changes: 1 addition & 1 deletion docs/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ EXAMPLE
$ symbol-bootstrap run
```

_See code: [src/commands/run.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/run.ts)_
_See code: [src/commands/run.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/run.ts)_
4 changes: 2 additions & 2 deletions docs/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ OPTIONS
-h, --help
It shows the help of this command.
-p, --preset=(bootstrap|testnet)
-p, --preset=(bootstrap|testnet|mainnet)
[default: bootstrap] the network preset
-r, --reset
Expand Down Expand Up @@ -89,4 +89,4 @@ EXAMPLES
$ echo "$MY_ENV_VAR_PASSWORD" | symbol-bootstrap start -p testnet -a dual
```

_See code: [src/commands/start.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/start.ts)_
_See code: [src/commands/start.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/start.ts)_
2 changes: 1 addition & 1 deletion docs/stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ EXAMPLE
$ symbol-bootstrap stop
```

_See code: [src/commands/stop.ts](https://github.com/nemtech/symbol-bootstrap/blob/v0.4.5/src/commands/stop.ts)_
_See code: [src/commands/stop.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.0/src/commands/stop.ts)_
Loading

0 comments on commit 6a37a37

Please sign in to comment.