diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..e4b38f399 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +/test/reports/**/*.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 43f17bbc4..a234b9e86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,20 @@ 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.5] - NEXT +## [1.0.6] - Next + +**Milestone**: Mainnet(1.0.0.0) + +| Package | Version | Link | +| ---------------- | ------- | ------------------------------------------------------------------ | +| Symbol Bootstrap | v1.0.6 | [symbol-bootstrap](https://www.npmjs.com/package/symbol-bootstrap) | + +- Reward Program Agent `2.0.0` upgrade. +- Added `MonitorOnly` reward program. +- The `link` and `enrollRewardProgram` commands allow `--customPreset` to avoid password prompt when main private key is not stored in the target folder. +- Symbol rest `3.5.6` upgrade. + +## [1.0.5] - May-3-2021 **Milestone**: Mainnet(1.0.0.0) diff --git a/README.md b/README.md index 46f420a06..7cf4bf0b3 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ $ npm install -g symbol-bootstrap $ symbol-bootstrap COMMAND running command... $ symbol-bootstrap (-v|--version|version) -symbol-bootstrap/1.0.5 linux-x64 node-v12.22.1 +symbol-bootstrap/1.0.6 linux-x64 node-v12.22.1 $ symbol-bootstrap --help [COMMAND] USAGE $ symbol-bootstrap COMMAND diff --git a/config/rest-gateway/rest.json.mustache b/config/rest-gateway/rest.json.mustache index 5054b8210..045a000c5 100644 --- a/config/rest-gateway/rest.json.mustache +++ b/config/rest-gateway/rest.json.mustache @@ -9,19 +9,7 @@ "allowedHosts": ["*"], "allowedMethods": ["GET", "POST", "PUT", "OPTIONS"] }, - "extensions": [ - "accountLink", - "aggregate", - "lockHash", - "lockSecret", - "mosaic", - "metadata", - "multisig", - "namespace", - "receipts", - "restrictions", - "transfer" - ], + "extensions": {{{toJson (splitCsv restExtensions)}}}, "db": { "url": "mongodb://{{{databaseHost}}}:27017/", "name": "catapult", @@ -79,5 +67,11 @@ } }, - "numBlocksTransactionFeeStats": 300 + "numBlocksTransactionFeeStats": 300, + + "deployment": { + "deploymentTool": "{{{restDeploymentTool}}}", + "deploymentToolVersion": "{{{restDeploymentToolVersion}}}", + "lastUpdatedDate": "{{{restDeploymentToolLastUpdatedDate}}}" + } } diff --git a/docs/clean.md b/docs/clean.md index fbf497a83..1c035be61 100644 --- a/docs/clean.md +++ b/docs/clean.md @@ -21,4 +21,4 @@ EXAMPLE $ symbol-bootstrap clean ``` -_See code: [src/commands/clean.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/clean.ts)_ +_See code: [src/commands/clean.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/clean.ts)_ diff --git a/docs/compose.md b/docs/compose.md index a0a9ba0e1..9b07a3431 100644 --- a/docs/compose.md +++ b/docs/compose.md @@ -33,4 +33,4 @@ EXAMPLE $ symbol-bootstrap compose ``` -_See code: [src/commands/compose.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/compose.ts)_ +_See code: [src/commands/compose.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/compose.ts)_ diff --git a/docs/config.md b/docs/config.md index 5545e90d4..5874fbac0 100644 --- a/docs/config.md +++ b/docs/config.md @@ -18,7 +18,6 @@ OPTIONS resolved from the target/preset.yml file. -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. @@ -59,4 +58,4 @@ EXAMPLES $ 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/v1.0.5/src/commands/config.ts)_ +_See code: [src/commands/config.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/config.ts)_ diff --git a/docs/decrypt.md b/docs/decrypt.md index 17c2e26f4..3a4fd8bac 100644 --- a/docs/decrypt.md +++ b/docs/decrypt.md @@ -56,4 +56,4 @@ EXAMPLES plain-addresses.yml ``` -_See code: [src/commands/decrypt.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/decrypt.ts)_ +_See code: [src/commands/decrypt.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/decrypt.ts)_ diff --git a/docs/encrypt.md b/docs/encrypt.md index 7a0f060af..c53cc0deb 100644 --- a/docs/encrypt.md +++ b/docs/encrypt.md @@ -46,4 +46,4 @@ EXAMPLES encrypted-custom-preset.yml ``` -_See code: [src/commands/encrypt.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/encrypt.ts)_ +_See code: [src/commands/encrypt.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/encrypt.ts)_ diff --git a/docs/enrollRewardProgram.md b/docs/enrollRewardProgram.md index d53e80a72..c07b759b6 100644 --- a/docs/enrollRewardProgram.md +++ b/docs/enrollRewardProgram.md @@ -16,25 +16,32 @@ USAGE $ symbol-bootstrap enrollRewardProgram OPTIONS - -h, --help It shows the help of this command. - -t, --target=target [default: target] The target folder where the symbol-bootstrap network is generated - -u, --url=url [default: http://localhost:3000] the network url + -c, --customPreset=customPreset This command uses the encrypted addresses.yml to resolve the main private key. If the + main private is only stored in the custom preset, you can provide it using this + param. Otherwise, the command may ask for it when required. - --maxFee=maxFee the max fee used when announcing (absolute). The node min multiplier will be used if it is not - provided. + -h, --help It shows the help of this command. - --noPassword When provided, Bootstrap will not use a password, so private keys will be stored in plain - text. Use with caution. + -t, --target=target [default: target] The target folder where the symbol-bootstrap network is generated - --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). + -u, --url=url [default: http://localhost:3000] the network url - --ready If --ready is provided, the command will not ask for confirmation when announcing - transactions. + --maxFee=maxFee the max fee used when announcing (absolute). The node min multiplier will be used if + it is not provided. - --useKnownRestGateways Use the best NEM node available when announcing. Otherwise the command will use the node - provided by the --url parameter. + --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). + + --ready If --ready is provided, the command will not ask for confirmation when announcing + transactions. + + --useKnownRestGateways Use the best NEM node available when announcing. Otherwise the command will use the + node provided by the --url parameter. DESCRIPTION Currently, the only program that can be enrolled post-launch is 'SuperNode'. @@ -47,4 +54,4 @@ EXAMPLES $ echo "$MY_ENV_VAR_PASSWORD" | symbol-bootstrap enrollRewardProgram --url http://external-rest:3000 ``` -_See code: [src/commands/enrollRewardProgram.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/enrollRewardProgram.ts)_ +_See code: [src/commands/enrollRewardProgram.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/enrollRewardProgram.ts)_ diff --git a/docs/healthCheck.md b/docs/healthCheck.md index b442137b6..bbc8d8682 100644 --- a/docs/healthCheck.md +++ b/docs/healthCheck.md @@ -36,4 +36,4 @@ EXAMPLE $ symbol-bootstrap healthCheck ``` -_See code: [src/commands/healthCheck.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/healthCheck.ts)_ +_See code: [src/commands/healthCheck.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/healthCheck.ts)_ diff --git a/docs/link.md b/docs/link.md index 06d77047e..1c151a6c8 100644 --- a/docs/link.md +++ b/docs/link.md @@ -14,31 +14,39 @@ USAGE $ symbol-bootstrap link OPTIONS - -h, --help It shows the help of this command. - -t, --target=target [default: target] The target folder where the symbol-bootstrap network is generated - -u, --url=url [default: http://localhost:3000] the network url + -c, --customPreset=customPreset This command uses the encrypted addresses.yml to resolve the main private key. If the + main private is only stored in the custom preset, you can provide it using this + param. Otherwise, the command may ask for it when required. - --maxFee=maxFee the max fee used when announcing (absolute). The node min multiplier will be used if it is not - provided. + -h, --help It shows the help of this command. - --noPassword When provided, Bootstrap will not use a password, so private keys will be stored in plain - text. Use with caution. + -t, --target=target [default: target] The target folder where the symbol-bootstrap network is generated - --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). + -u, --url=url [default: http://localhost:3000] the network url - --ready If --ready is provided, the command will not ask for confirmation when announcing - transactions. + --maxFee=maxFee the max fee used when announcing (absolute). The node min multiplier will be used if + it is not provided. - --unlink Perform "Unlink" transactions unlinking the voting and VRF keys from the node signer account + --noPassword When provided, Bootstrap will not use a password, so private keys will be stored in + plain text. Use with caution. - --useKnownRestGateways Use the best NEM node available when announcing. Otherwise the command will use the node - provided by the --url parameter. + --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). + + --ready If --ready is provided, the command will not ask for confirmation when announcing + transactions. + + --unlink Perform "Unlink" transactions unlinking the voting and VRF keys from the node signer + account + + --useKnownRestGateways Use the best NEM node available when announcing. Otherwise the command will use the + node provided by the --url parameter. EXAMPLES $ symbol-bootstrap link $ echo "$MY_ENV_VAR_PASSWORD" | symbol-bootstrap link --unlink --useKnownRestGateways ``` -_See code: [src/commands/link.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/link.ts)_ +_See code: [src/commands/link.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/link.ts)_ diff --git a/docs/presetGuides.md b/docs/presetGuides.md index d774b87da..68397fbea 100644 --- a/docs/presetGuides.md +++ b/docs/presetGuides.md @@ -142,7 +142,7 @@ will generate a docker service like: ```yaml peer-node-0: container_name: peer-node-0 - image: 'symbolplatform/symbol-server:gcc-0.10.0.6' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' ....... cpu_count: 4 shm_size: 64M diff --git a/docs/report.md b/docs/report.md index 3a9b2c472..155672008 100644 --- a/docs/report.md +++ b/docs/report.md @@ -21,4 +21,4 @@ EXAMPLE $ symbol-bootstrap report ``` -_See code: [src/commands/report.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/report.ts)_ +_See code: [src/commands/report.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/report.ts)_ diff --git a/docs/resetData.md b/docs/resetData.md index f2cdb5128..cb6332071 100644 --- a/docs/resetData.md +++ b/docs/resetData.md @@ -21,4 +21,4 @@ EXAMPLE $ symbol-bootstrap resetData ``` -_See code: [src/commands/resetData.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/resetData.ts)_ +_See code: [src/commands/resetData.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/resetData.ts)_ diff --git a/docs/run.md b/docs/run.md index fb6f657c9..58f1b3097 100644 --- a/docs/run.md +++ b/docs/run.md @@ -53,4 +53,4 @@ EXAMPLE $ symbol-bootstrap run ``` -_See code: [src/commands/run.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/run.ts)_ +_See code: [src/commands/run.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/run.ts)_ diff --git a/docs/start.md b/docs/start.md index 8cc2f1823..3ca1b88b6 100644 --- a/docs/start.md +++ b/docs/start.md @@ -21,7 +21,7 @@ OPTIONS If provided, docker-compose will run with -b (--build) -c, --customPreset=customPreset - External preset file. Values in this file will override the provided presets (optional) + External preset file. Values in this file will override the provided presets -d, --detached If provided, docker-compose will run with -d (--detached) and this command will wait unit server is running before @@ -90,4 +90,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/v1.0.5/src/commands/start.ts)_ +_See code: [src/commands/start.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/start.ts)_ diff --git a/docs/stop.md b/docs/stop.md index 8519896e3..440e8dd9a 100644 --- a/docs/stop.md +++ b/docs/stop.md @@ -21,4 +21,4 @@ EXAMPLE $ symbol-bootstrap stop ``` -_See code: [src/commands/stop.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/stop.ts)_ +_See code: [src/commands/stop.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/stop.ts)_ diff --git a/docs/verify.md b/docs/verify.md index 7d8d6e7c9..83f9c8af4 100644 --- a/docs/verify.md +++ b/docs/verify.md @@ -20,4 +20,4 @@ EXAMPLE $ symbol-bootstrap verify ``` -_See code: [src/commands/verify.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.5/src/commands/verify.ts)_ +_See code: [src/commands/verify.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.6/src/commands/verify.ts)_ diff --git a/package-lock.json b/package-lock.json index b7509f703..f8f1d01e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -922,10 +922,10 @@ "@types/node": "*" } }, - "@types/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==", + "@types/semver": { + "version": "7.3.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.6.tgz", + "integrity": "sha512-0caWDWmpCp0uifxFh+FaqK3CuZ2SkRR/ZRxAV5+zNdC3QVUi6wyOJnefhPvtNt8NQWXB5OA93BUvZsXpWat2Xw==", "dev": true }, "@types/sinon": { @@ -1261,6 +1261,11 @@ } } }, + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1283,6 +1288,11 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1300,6 +1310,11 @@ "fill-range": "^7.0.1" } }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -1340,6 +1355,11 @@ "resolved": "https://registry.npmjs.org/buffer-reverse/-/buffer-reverse-1.0.1.tgz", "integrity": "sha1-SSg8jvpvkBvAH6MwTQYCeXGuL2A=" }, + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" + }, "caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -1695,6 +1715,12 @@ "delayed-stream": "~1.0.0" } }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -1766,65 +1792,6 @@ "my-easy-fp": "^0.5.1", "tslib": "^1.10.0", "yargs": "^15.3.1" - }, - "dependencies": { - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } } }, "cross-spawn": { @@ -1860,9 +1827,9 @@ } }, "dayjs": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.9.4.tgz", - "integrity": "sha512-ABSF3alrldf7nM9sQ2U+Ln67NRwmzlLOqG7kK03kck0mw3wlSSEKv/XhKGGxUjQcS57QeiCyNdrFgtj9nWlrng==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.4.tgz", + "integrity": "sha512-RI/Hh4kqRc1UKLOAf/T5zdMMX5DQIlDxwUe3wSyMMnEbGunnpENCdbUgM+dW7kXidZqCttBrmw7BhN4TMddkCw==", "dev": true }, "debug": { @@ -1879,6 +1846,19 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -1944,6 +1924,11 @@ "esutils": "^2.0.2" } }, + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" + }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -1959,6 +1944,20 @@ "integrity": "sha512-SVBVhNB+4zPL+rvtWLw7PZQkw/Eqj1HQZs22xtcqW36+xoifzEOEEDEpkxSMfB6RFeSIOcG00w6z5mSqLr1Y6w==", "dev": true }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2210,6 +2209,40 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "ethereum-bloom-filters": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.9.tgz", + "integrity": "sha512-GiK/RQkAkcVaEdxKVkPcG07PQ5vD7v2MFSHgZmBJSfMzNRHimntdBithsHAT89tAXnIpzVDWt8iaCD1DvkaxGg==", + "requires": { + "js-sha3": "^0.8.0" + } + }, + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, "execa": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", @@ -2656,6 +2689,15 @@ "is-glob": "^4.0.1" } }, + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -2690,9 +2732,9 @@ "dev": true }, "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", "requires": { "minimist": "^1.2.5", "neo-async": "^2.6.0", @@ -2739,6 +2781,15 @@ "safe-buffer": "^5.2.0" } }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "hasha": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", @@ -2769,10 +2820,20 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "html-escaper": { @@ -2952,6 +3013,11 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, + "is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" + }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -2960,6 +3026,11 @@ "is-extglob": "^2.1.1" } }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -3348,9 +3419,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash._reinterpolate": { "version": "3.0.0", @@ -3506,13 +3577,15 @@ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, "merkletreejs": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.2.13.tgz", - "integrity": "sha512-hnM1XX0C+3yfAytRiX7FKC+bYg+GC83aQq7EytAp6nbcUBRdXU6/AVkmNdsAaJJ9IaKZt0w76r0QeWY/Fq+uFw==", + "version": "0.2.18", + "resolved": "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.2.18.tgz", + "integrity": "sha512-f8bSFaUDPZhot94xkjb83XbG1URaiNLxZy6LWTw2IzbQeCA4YX/UxublGxXdLQIYXbWkDghq6EqwG5u4I7ELmA==", "requires": { + "bignumber.js": "^9.0.1", "buffer-reverse": "^1.0.1", "crypto-js": "^3.1.9-1", - "treeify": "^1.1.0" + "treeify": "^1.1.0", + "web3-utils": "^1.3.4" }, "dependencies": { "crypto-js": { @@ -3551,6 +3624,29 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "requires": { + "dom-walk": "^0.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -3895,6 +3991,22 @@ "path-key": "^2.0.0" } }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "requires": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, "nyc": { "version": "15.1.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", @@ -3953,6 +4065,11 @@ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, "object-treeify": { "version": "1.1.26", "resolved": "https://registry.npmjs.org/object-treeify/-/object-treeify-1.1.26.tgz", @@ -4070,6 +4187,11 @@ "callsites": "^3.0.0" } }, + "parse-headers": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", + "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==" + }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -4175,6 +4297,11 @@ "integrity": "sha512-rFA1lnek1FYkMGthm4xBKME41qUKItTovuo24bCGZu/Vu1n3gW71UPLAkIdwewwkZCe29gRVweSOPXvAdckFuw==", "dev": true }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -4278,11 +4405,20 @@ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", "dev": true }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, "requires": { "safe-buffer": "^5.1.0" } @@ -4442,9 +4578,9 @@ } }, "rxjs-compat": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.6.3.tgz", - "integrity": "sha512-y+wUqq7bS2dG+7rH2fNMoxsDiJ32RQzFxZQE/JdtpnmEZmwLQrb1tCiItyHxdXJHXjmHnnzFscn3b6PEmORGKw==" + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.6.7.tgz", + "integrity": "sha512-szN4fK+TqBPOFBcBcsR0g2cmTTUF/vaFEOZNuSdfU8/pGFnNmmn2u8SystYXG1QMrjOPBc6XTKHMVfENDf6hHw==" }, "safe-buffer": { "version": "5.2.1", @@ -4542,6 +4678,21 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -4747,6 +4898,11 @@ "strip-ansi": "^6.0.0" } }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -4785,6 +4941,14 @@ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -4821,9 +4985,9 @@ "integrity": "sha512-A1MAN8/UWlaCEibBf6zxkduZwDNSvWwLPp6JB0GeYI/FAOrw/9nLyuS/NJQ3siGAUclnuejH1wG7KdUg0/4RSw==" }, "symbol-sdk": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/symbol-sdk/-/symbol-sdk-0.23.2.tgz", - "integrity": "sha512-Yq9PBoA2jgicmvJYh8vjjZUyu+bjbwTtgQGkR6A+k5L4fdTacNKmx9WTbE0dDXv7OOg+qPBrA/6ms9mXEupZ8g==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-sdk/-/symbol-sdk-1.0.1.tgz", + "integrity": "sha512-G4sdGBfggTSqKs9XchMQAtOfl80Z2eARafxZnzje5qxzfUSQUCFYdBP7IJiA2PDoeyfXJJpzWWTlgq9EzvKm1A==", "requires": { "@js-joda/core": "^3.2.0", "bluebird": "^3.7.2", @@ -4843,6 +5007,7 @@ "rxjs-compat": "^6.6.3", "symbol-openapi-typescript-fetch-client": "0.11.2", "tweetnacl": "^1.0.3", + "utf8": "^2.1.2", "ws": "^7.3.1" }, "dependencies": { @@ -4957,6 +5122,11 @@ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, "tmp": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", @@ -5166,6 +5336,11 @@ "integrity": "sha512-RjxApKkrPJB6kjJxQS3iZlf///REXWYxYJxO/MpmlQzVkDWVI3PSnCBWezMecmTU/TRkNxrl8bmsfFQCp+LO+Q==", "optional": true }, + "underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" + }, "universalify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", @@ -5180,6 +5355,11 @@ "punycode": "^2.1.0" } }, + "url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" + }, "utf8": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", @@ -5229,6 +5409,28 @@ "integrity": "sha512-c0Q4zYZkcLizeYJ3hNyaVUM2AA8KDhNCA3JvXY8CeZSJuBdAy3bAvSbv46RClC4P3dSO9BdwhnKEx2zOo6vP/w==", "dev": true }, + "web3-utils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.6.tgz", + "integrity": "sha512-hHatFaQpkQgjGVER17gNx8u1qMyaXFZtM0y0XLGH1bzsjMPlkMPLRcYOrZ00rOPfTEuYFOdrpGOqZXVmGrMZRg==", + "requires": { + "bn.js": "^4.11.9", + "eth-lib": "0.2.8", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.12.1", + "utf8": "3.0.0" + }, + "dependencies": { + "utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + } + } + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -5451,9 +5653,47 @@ } }, "ws": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz", - "integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA==" + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz", + "integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==" + }, + "xhr": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", + "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", + "requires": { + "global": "~4.4.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "xhr-request": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", + "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "requires": { + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" + } + }, + "xhr-request-promise": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", + "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", + "requires": { + "xhr-request": "^1.1.0" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { "version": "4.0.1", diff --git a/package.json b/package.json index 7eab44254..fe5621477 100644 --- a/package.json +++ b/package.json @@ -13,17 +13,17 @@ "@oclif/plugin-autocomplete": "^0.3.0", "@oclif/plugin-help": "^3.1.0", "figlet": "^1.2.4", - "handlebars": "^4.7.6", + "handlebars": "^4.7.7", "inquirer": "^7.3.3", "js-yaml": "^3.14.0", - "lodash": "^4.17.20", + "lodash": "^4.17.21", "memorystream": "^0.3.1", "node-forge": "^0.10.0", "rxjs": "^6.6.3", "semver": "^7.3.5", "shx": "^0.3.2", "sshpk": "^1.16.1", - "symbol-sdk": "^0.23.2", + "symbol-sdk": "^1.0.1", "tslib": "^1.13.0", "utf8": "^2.1.2", "winston": "^3.3.3" @@ -41,7 +41,7 @@ "@types/mocha": "^8.2.2", "@types/node": "^10.17.28", "@types/node-forge": "^0.9.4", - "@types/semver": "^7.3.4", + "@types/semver": "^7.3.6", "@types/sshpk": "^1.10.5", "@types/winston": "^2.4.4", "@typescript-eslint/eslint-plugin": "^3.7.1", diff --git a/presets/bootstrap/network.yml b/presets/bootstrap/network.yml index f862e9de7..445f96946 100644 --- a/presets/bootstrap/network.yml +++ b/presets/bootstrap/network.yml @@ -11,6 +11,7 @@ harvestingName: 'harvest' explorerUrl: http://localhost:90/ faucetUrl: http://localhost:100/ beneficiaryAddress: '' +restExtensions: 'accountLink, aggregate, lockHash, lockSecret, mosaic, metadata, multisig, namespace, receipts, restrictions, transfer' nemesis: mosaics: - name: '{{currencyName}}' diff --git a/presets/mainnet/network.yml b/presets/mainnet/network.yml index 80e9b9674..4f571ad1e 100644 --- a/presets/mainnet/network.yml +++ b/presets/mainnet/network.yml @@ -48,6 +48,7 @@ maxChildNamespaces: 100 nonVotingUnfinalizedBlocksDuration: 10m votingUnfinalizedBlocksDuration: 0m timeSynchronizationMinImportance: 10000000000 +restExtensions: 'accountLink, aggregate, lockHash, lockSecret, mosaic, metadata, multisig, namespace, receipts, restrictions, transfer, cmc' knownRestGateways: - 'http://ngl-dual-001.symbolblockchain.io:3000' - 'http://ngl-dual-002.symbolblockchain.io:3000' diff --git a/presets/shared.yml b/presets/shared.yml index 5c3e1c0df..70fab1e45 100644 --- a/presets/shared.yml +++ b/presets/shared.yml @@ -63,13 +63,12 @@ maxNameSize: 64 maxChildNamespaces: 256 maxNamespaceDepth: 3 batchVerificationRandomSource: -symbolServerToolsImage: symbolplatform/symbol-server:tools-gcc-1.0.0.0 -symbolServerImage: symbolplatform/symbol-server:gcc-1.0.0.0 -symbolRestImage: symbolplatform/symbol-rest:2.3.5 +symbolServerImage: symbolplatform/symbol-server:gcc-10-1.0.1.0 +symbolRestImage: symbolplatform/symbol-rest:2.3.6 symbolExplorerImage: symbolplatform/symbol-explorer:0.6.3-alpha symbolWalletImage: symbolplatform/symbol-desktop-wallet:1.0.1 symbolFaucetImage: symbolplatform/symbol-faucet:0.5.0-alpha -symbolAgentImage: symbolplatform/symbol-node-rewards-agent:1.0.2-alpha.0 +symbolAgentImage: symbolplatform/symbol-node-rewards-agent:2.0.0 mongoImage: mongo:4.4.3-bionic mongoComposeRunParam: --wiredTigerCacheSizeGB 2 logLevel: 'Info' @@ -164,7 +163,7 @@ dockerComposeServiceRestart: 'on-failure:2' dockerComposeDebugMode: false minPartnerNodeVersion: 1.0.0.0 maxPartnerNodeVersion: 1.0.255.255 -serverVersion: 1.0.0.0 +serverVersion: 1.0.1.0 outgoing_connections_maxConnections: 10 outgoing_connections_maxConnectionAge: 200 outgoing_connections_maxConnectionBanAge: 20 @@ -211,6 +210,7 @@ maxConnectionAttempts: 15 baseRetryDelay: 750 connectionPoolSize: 10 maxSubscriptions: 300 +restDeploymentTool: symbol-bootstrap #voting votingKeyStartEpoch: 1 diff --git a/presets/testnet/network.yml b/presets/testnet/network.yml index 999a978d8..20aa494c6 100644 --- a/presets/testnet/network.yml +++ b/presets/testnet/network.yml @@ -50,6 +50,7 @@ votingUnfinalizedBlocksDuration: 0m timeSynchronizationMinImportance: 10000000000 faucetUrl: 'http://faucet.testnet.symboldev.network' explorerUrl: 'http://explorer.testnet.symboldev.network' +restExtensions: 'accountLink, aggregate, lockHash, lockSecret, mosaic, metadata, multisig, namespace, receipts, restrictions, transfer, cmc' knownRestGateways: - 'http://ngl-dual-501.testnet.symboldev.network:3000' - 'http://ngl-dual-601.testnet.symboldev.network:3000' diff --git a/src/commands/config.ts b/src/commands/config.ts index b3c702e2d..00c0a1bb0 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -27,27 +27,30 @@ export default class Config extends Command { `$ echo "$MY_ENV_VAR_PASSWORD" | symbol-bootstrap config -p testnet -a dual`, ]; - static flags = { + static resolveFlags = (required: boolean) => ({ help: CommandUtils.helpFlag, target: CommandUtils.targetFlag, password: CommandUtils.passwordFlag, noPassword: CommandUtils.noPasswordFlag, preset: flags.enum({ char: 'p', - description: - 'The network preset, can be provided via custom preset or cli parameter. If not provided, the value is resolved from the target/preset.yml file.', + description: `The network preset, can be provided via custom preset or cli parameter. ${ + required ? '' : 'If not provided, the value is resolved from the target/preset.yml file.' + }`, options: Object.keys(Preset).map((v) => v as Preset), + required: required, }), assembly: flags.string({ char: 'a', - description: - 'The assembly, example "dual" for testnet. If not provided, the value is resolved from the target/preset.yml file.', + description: `The assembly, example "dual" for testnet. ${ + required ? '' : 'If not provided, the value is resolved from the target/preset.yml file.' + }`, + required: required, }), - customPreset: flags.string({ char: 'c', - description: 'External preset file. Values in this file will override the provided presets (optional)', - required: false, + description: `External preset file. Values in this file will override the provided presets`, + required: required, }), reset: flags.boolean({ char: 'r', @@ -76,7 +79,9 @@ export default class Config extends Command { description: `User used to run docker images when creating configuration files like certificates or nemesis block. "${BootstrapUtils.CURRENT_USER}" means the current user.`, default: BootstrapUtils.CURRENT_USER, }), - }; + }); + + static flags = Config.resolveFlags(false); public async run(): Promise { const { flags } = this.parse(Config); diff --git a/src/model/ConfigPreset.ts b/src/model/ConfigPreset.ts index c5edaa2f3..694d114dd 100644 --- a/src/model/ConfigPreset.ts +++ b/src/model/ConfigPreset.ts @@ -315,6 +315,9 @@ export interface GatewayConfigPreset { maxSubscriptions: number; apiNodeTimeout: number; baseRetryDelay: number; + restDeploymentTool: string; + restDeploymentToolVersion?: string; // default is dynamic, current bootstrap version + restDeploymentToolLastUpdatedDate?: string; // default is dynamic, current datetime } export interface GatewayPreset extends DockerServicePreset, Partial { @@ -385,7 +388,6 @@ export interface CommonConfigPreset extends NodeConfigPreset, GatewayConfigPrese faucetUrl?: string; nemesisSeedFolder?: string; // Optional seed folder if user provides an external seed/00000 folder. - symbolServerToolsImage: string; symbolWalletImage: string; symbolServerImage: string; symbolExplorerImage: string; diff --git a/src/service/AgentCertificateService.ts b/src/service/AgentCertificateService.ts index 1e91ab530..3ddabf0d7 100644 --- a/src/service/AgentCertificateService.ts +++ b/src/service/AgentCertificateService.ts @@ -47,7 +47,7 @@ export class AgentCertificateService { public async run( networkType: NetworkType, - symbolServerToolsImage: string, + symbolServerImage: string, name: string, providedCertificates: AgentCertificates, customCertFolder?: string, @@ -84,7 +84,7 @@ export class AgentCertificateService { const binds = [`${resolve(certFolder)}:/data:rw`]; const userId = await BootstrapUtils.resolveDockerUserFromParam(this.params.user); const { stdout, stderr } = await BootstrapUtils.runImageUsingExec({ - image: symbolServerToolsImage, + image: symbolServerImage, userId: userId, workdir: '/data', cmds: cmd, diff --git a/src/service/AnnounceService.ts b/src/service/AnnounceService.ts index 709b3c957..37326666e 100644 --- a/src/service/AnnounceService.ts +++ b/src/service/AnnounceService.ts @@ -90,6 +90,11 @@ export class AnnounceService { maxFee: flags.integer({ description: 'the max fee used when announcing (absolute). The node min multiplier will be used if it is not provided.', }), + customPreset: flags.string({ + char: 'c', + description: `This command uses the encrypted addresses.yml to resolve the main private key. If the main private is only stored in the custom preset, you can provide it using this param. Otherwise, the command may ask for it when required.`, + required: false, + }), }; public async announce( providedUrl: string, @@ -209,6 +214,27 @@ export class AnnounceService { return response; }; + const resolveMainAccount = async (): Promise => { + const presetMainPrivateKey = (presetData.nodes || [])[index]?.mainPrivateKey; + if (presetMainPrivateKey) { + const account = Account.createFromPrivateKey(presetMainPrivateKey, networkType); + if (account.address.equals(mainAccount.address)) { + return account; + } + } + + return Account.createFromPrivateKey( + await CommandUtils.resolvePrivateKey( + networkType, + nodeAccount.main, + KeyName.Main, + nodeAccount.name, + 'signing a transaction', + ), + networkType, + ); + }; + if (multisigAccountInfo) { logger.info( `The node's main account is a multig account with Address: ${ @@ -318,16 +344,7 @@ export class AnnounceService { } } } else { - const signerAccount = Account.createFromPrivateKey( - await CommandUtils.resolvePrivateKey( - networkType, - nodeAccount.main, - KeyName.Main, - nodeAccount.name, - 'signing a transaction', - ), - networkType, - ); + const signerAccount = await resolveMainAccount(); if (transactions.length == 1) { let transaction = transactions[0]; if (!providedMaxFee) { diff --git a/src/service/BootstrapUtils.ts b/src/service/BootstrapUtils.ts index dc313f2e2..c5f9567e1 100644 --- a/src/service/BootstrapUtils.ts +++ b/src/service/BootstrapUtils.ts @@ -378,7 +378,13 @@ export class BootstrapUtils { if (isMustache) { const template = await BootstrapUtils.readTextFile(fromPath); const renderedTemplate = this.runTemplate(template, templateContext); - await fsPromises.writeFile(destinationFile, renderedTemplate); + + await fsPromises.writeFile( + destinationFile, + destinationFile.toLowerCase().endsWith('.json') + ? BootstrapUtils.formatJson(renderedTemplate) + : renderedTemplate, + ); } else { await fsPromises.copyFile(fromPath, destinationFile); } @@ -633,6 +639,7 @@ export class BootstrapUtils { Handlebars.registerHelper('toSimpleHex', BootstrapUtils.toSimpleHex); Handlebars.registerHelper('toSeconds', BootstrapUtils.toSeconds); Handlebars.registerHelper('toJson', BootstrapUtils.toJson); + Handlebars.registerHelper('splitCsv', BootstrapUtils.splitCsv); Handlebars.registerHelper('add', BootstrapUtils.add); Handlebars.registerHelper('minus', BootstrapUtils.minus); Handlebars.registerHelper('computerMemory', BootstrapUtils.computerMemory); @@ -683,6 +690,15 @@ export class BootstrapUtils { return JSON.stringify(object, null, 2); } + public static formatJson(string: string): string { + // Validates and format the json string. + return JSON.stringify(JSON.parse(string), null, 2); + } + + public static splitCsv(object: string): string[] { + return (object || '').split(',').map((c) => c.trim()); + } + public static toSeconds(serverDuration: string): number { return DtoMapping.parseServerDuration(serverDuration).seconds(); } diff --git a/src/service/CertificateService.ts b/src/service/CertificateService.ts index e63953f7f..5fa987aab 100644 --- a/src/service/CertificateService.ts +++ b/src/service/CertificateService.ts @@ -83,7 +83,7 @@ export class CertificateService { public async run( networkType: NetworkType, - symbolServerToolsImage: string, + symbolServerImage: string, name: string, providedCertificates: NodeCertificates, customCertFolder?: string, @@ -133,7 +133,7 @@ export class CertificateService { const binds = [`${resolve(certFolder)}:/data:rw`]; const userId = await BootstrapUtils.resolveDockerUserFromParam(this.params.user); const { stdout, stderr } = await BootstrapUtils.runImageUsingExec({ - image: symbolServerToolsImage, + image: symbolServerImage, userId: userId, workdir: '/data', cmds: cmd, diff --git a/src/service/CommandUtils.ts b/src/service/CommandUtils.ts index 9b7691b4b..f1567a2a6 100644 --- a/src/service/CommandUtils.ts +++ b/src/service/CommandUtils.ts @@ -26,7 +26,7 @@ import { KeyName } from './ConfigService'; const logger: Logger = LoggerFactory.getLogger(LogType.System); export class CommandUtils { - public static passwordPromptDefaultMessage = `Enter password to use to encrypt and decrypt custom presets, addresses.yml, and preset.yml files. When providing a password, private keys will be encrypted. Keep this password in a secure place!`; + public static passwordPromptDefaultMessage = `Enter the password used to encrypt and decrypt custom presets, addresses.yml, and preset.yml files. When providing a password, private keys will be encrypted. Keep this password in a secure place!`; public static helpFlag = flags.help({ char: 'h', description: 'It shows the help of this command.' }); public static targetFlag = flags.string({ diff --git a/src/service/ConfigLoader.ts b/src/service/ConfigLoader.ts index 14b90208a..b5f659795 100644 --- a/src/service/ConfigLoader.ts +++ b/src/service/ConfigLoader.ts @@ -39,7 +39,7 @@ import { CryptoUtils } from './CryptoUtils'; const logger: Logger = LoggerFactory.getLogger(LogType.System); export class ConfigLoader { - private static presetInfoLogged = false; + public static presetInfoLogged = false; public async generateRandomConfiguration(oldAddresses: Addresses | undefined, presetData: ConfigPreset): Promise { const networkType = presetData.networkType; @@ -340,7 +340,8 @@ export class ConfigLoader { private static getArray(size: number): number[] { return [...Array(size).keys()]; } - private loadCustomPreset(customPreset: string | undefined, password: string | undefined): CustomPreset { + + public loadCustomPreset(customPreset: string | undefined, password: Password): CustomPreset { if (!customPreset) { return {}; } @@ -365,8 +366,16 @@ export class ConfigLoader { return BootstrapUtils.loadYaml(fileLocation, false); } + public mergePresets(object: ConfigPreset, ...otherArgs: (CustomPreset | undefined)[]): any { + const presets: (CustomPreset | undefined)[] = [object, ...otherArgs]; + const inflation: Record = presets.reverse().find((p) => p?.inflation)?.inflation || {}; + const presetData = _.merge(object, ...otherArgs); + presetData.inflation = inflation; + return presetData; + } + public createPresetData(params: { - password: string | undefined; + password: Password; root: string; preset?: Preset; assembly?: string; @@ -392,21 +401,14 @@ export class ConfigLoader { const sharedPreset = BootstrapUtils.loadYaml(join(root, 'presets', 'shared.yml'), false); const networkPreset = BootstrapUtils.loadYaml(`${root}/presets/${preset}/network.yml`, false); const assemblyPreset = this.loadAssembly(root, preset, assembly); - //Deep merge - const inflation: Record = - customPresetObject?.inflation || - customPresetFileObject?.inflation || - assemblyPreset?.inflation || - networkPreset?.inflation || - sharedPreset?.inflation || - []; - const presetData = _.merge(sharedPreset, networkPreset, assemblyPreset, customPresetFileObject, customPresetObject, { + + const presetData = this.mergePresets(sharedPreset, networkPreset, assemblyPreset, customPresetFileObject, customPresetObject, { preset, }); + if (presetData.assemblies && !assembly) { throw new Error(`Preset ${preset} requires assembly (-a, --assembly option). Possible values are: ${presetData.assemblies}`); } - presetData.inflation = inflation; if (!ConfigLoader.presetInfoLogged) { logger.info(`Generating config from preset '${preset}'`); if (assembly) { diff --git a/src/service/ConfigService.ts b/src/service/ConfigService.ts index ee3f37fe0..650116cec 100644 --- a/src/service/ConfigService.ts +++ b/src/service/ConfigService.ts @@ -32,9 +32,9 @@ import { import { LogType } from '../logger'; import Logger from '../logger/Logger'; import LoggerFactory from '../logger/LoggerFactory'; -import { Addresses, ConfigPreset, CustomPreset, NodeAccount, NodePreset, NodeType } from '../model'; +import { Addresses, ConfigPreset, CustomPreset, GatewayConfigPreset, NodeAccount, NodePreset, NodeType } from '../model'; import { AgentCertificateService } from './AgentCertificateService'; -import { BootstrapUtils, KnownError } from './BootstrapUtils'; +import { BootstrapUtils, KnownError, Password } from './BootstrapUtils'; import { CertificateService } from './CertificateService'; import { CommandUtils } from './CommandUtils'; import { ConfigLoader } from './ConfigLoader'; @@ -139,7 +139,7 @@ export class ConfigService { const presetData: ConfigPreset = this.resolveCurrentPresetData(oldPresetData, password); const addresses = await this.configLoader.generateRandomConfiguration(oldAddresses, presetData); - if (this.params.pullImages) await BootstrapUtils.pullImage(presetData.symbolServerToolsImage); + if (this.params.pullImages) await BootstrapUtils.pullImage(presetData.symbolServerImage); const privateKeySecurityMode = CryptoUtils.getPrivateKeySecurityMode(presetData.privateKeySecurityMode); await BootstrapUtils.mkdir(target); @@ -176,7 +176,7 @@ export class ConfigService { } } - private resolveCurrentPresetData(oldPresetData: ConfigPreset | undefined, password: string | undefined) { + private resolveCurrentPresetData(oldPresetData: ConfigPreset | undefined, password: Password) { return this.configLoader.createPresetData({ ...this.params, root: this.root, password: password, oldPresetData }); } @@ -257,7 +257,7 @@ export class ConfigService { (addresses.nodes || []).map(async (account) => { return await new CertificateService(this.root, this.params).run( presetData.networkType, - presetData.symbolServerToolsImage, + presetData.symbolServerImage, account.name, { main: account.main, @@ -275,7 +275,7 @@ export class ConfigService { if (node?.rewardProgram && account.agent) await new AgentCertificateService(this.root, this.params).run( presetData.networkType, - presetData.symbolServerToolsImage, + presetData.symbolServerImage, account.name, { agent: account.agent, @@ -635,7 +635,11 @@ export class ConfigService { return Promise.all( (presetData.gateways || []).map(async (gatewayPreset, index: number) => { const copyFrom = join(this.root, 'config', 'rest-gateway'); - const templateContext = { ...presetData, ...gatewayPreset }; + const generatedContext: Partial = { + restDeploymentToolVersion: BootstrapUtils.VERSION, + restDeploymentToolLastUpdatedDate: new Date().toISOString().slice(0, 10), + }; + const templateContext = { ...generatedContext, ...presetData, ...gatewayPreset }; const name = templateContext.name || `rest-gateway-${index}`; const moveTo = BootstrapUtils.getTargetGatewayFolder(this.params.target, false, name); await BootstrapUtils.generateConfiguration(templateContext, copyFrom, moveTo); diff --git a/src/service/LinkService.ts b/src/service/LinkService.ts index ffeb9bd8e..6b0f3a4ab 100644 --- a/src/service/LinkService.ts +++ b/src/service/LinkService.ts @@ -45,6 +45,7 @@ export type LinkParams = { unlink: boolean; useKnownRestGateways: boolean; ready?: boolean; + customPreset?: string; }; const logger: Logger = LoggerFactory.getLogger(LogType.System); @@ -77,6 +78,7 @@ export class LinkService implements TransactionFactory { public async run(passedPresetData?: ConfigPreset | undefined, passedAddresses?: Addresses | undefined): Promise { const presetData = passedPresetData ?? this.configLoader.loadExistingPresetData(this.params.target, this.params.password); const addresses = passedAddresses ?? this.configLoader.loadExistingAddresses(this.params.target, this.params.password); + const customPreset = this.configLoader.loadCustomPreset(this.params.customPreset, this.params.password); logger.info(`${this.params.unlink ? 'Unlinking' : 'Linking'} nodes`); await new AnnounceService().announce( @@ -84,7 +86,7 @@ export class LinkService implements TransactionFactory { this.params.maxFee, this.params.useKnownRestGateways, this.params.ready, - presetData, + this.configLoader.mergePresets(presetData, customPreset), addresses, this, ); diff --git a/src/service/NemgenService.ts b/src/service/NemgenService.ts index becaef8d5..104bfea27 100644 --- a/src/service/NemgenService.ts +++ b/src/service/NemgenService.ts @@ -32,7 +32,7 @@ export class NemgenService { public async run(presetData: ConfigPreset): Promise { const networkIdentifier = presetData.networkIdentifier; - const symbolServerToolsImage = presetData.symbolServerToolsImage; + const symbolServerImage = presetData.symbolServerImage; const target = this.params.target; if (!presetData.nodes || !presetData.nodes.length) { @@ -60,7 +60,7 @@ export class NemgenService { const userId = await BootstrapUtils.resolveDockerUserFromParam(this.params.user); const { stdout, stderr } = await BootstrapUtils.runImageUsingExec({ catapultAppFolder: presetData.catapultAppFolder, - image: symbolServerToolsImage, + image: symbolServerImage, userId: userId, workdir: '/nemesis', cmds: cmd, diff --git a/src/service/RewardProgramService.ts b/src/service/RewardProgramService.ts index c77da7d35..115c38338 100644 --- a/src/service/RewardProgramService.ts +++ b/src/service/RewardProgramService.ts @@ -32,6 +32,7 @@ export type RewardProgramParams = { maxFee?: number; useKnownRestGateways: boolean; ready?: boolean; + customPreset?: string; }; export interface RewardProgramServiceTransactionFactoryParams { @@ -46,6 +47,7 @@ export enum RewardProgram { EarlyAdoption = 'EarlyAdoption', Ecosystem = 'Ecosystem', SuperNode = 'SuperNode', + MonitorOnly = 'MonitorOnly', } export class RewardProgramService implements TransactionFactory { @@ -73,6 +75,7 @@ export class RewardProgramService implements TransactionFactory { public async enroll(passedPresetData?: ConfigPreset | undefined, passedAddresses?: Addresses | undefined): Promise { const presetData = passedPresetData ?? this.configLoader.loadExistingPresetData(this.params.target, this.params.password); const addresses = passedAddresses ?? this.configLoader.loadExistingAddresses(this.params.target, this.params.password); + const customPreset = this.configLoader.loadCustomPreset(this.params.customPreset, this.params.password); if (!presetData.rewardProgramEnrollmentAddress) { logger.warn('This network does not have a reward program controller public key. Nodes cannot be registered.'); return; @@ -82,7 +85,7 @@ export class RewardProgramService implements TransactionFactory { this.params.maxFee, this.params.useKnownRestGateways, this.params.ready, - presetData, + this.configLoader.mergePresets(presetData, customPreset), addresses, this, '1M+', diff --git a/src/service/SshpkService.ts b/src/service/SshpkService.ts index 11f9ecd61..02de9366a 100644 --- a/src/service/SshpkService.ts +++ b/src/service/SshpkService.ts @@ -96,10 +96,10 @@ export class SshpkService { const cmd = ['bash', 'createCertificate.sh']; const binds = [`${resolve(certFolder)}:/data:rw`]; const userId = await BootstrapUtils.resolveDockerUserFromParam(this.params.user); - const symbolServerToolsImage = presetData.symbolServerToolsImage; + const symbolServerImage = presetData.symbolServerImage; const { stdout, stderr } = await BootstrapUtils.runImageUsingExec({ catapultAppFolder: presetData.catapultAppFolder, - image: symbolServerToolsImage, + image: symbolServerImage, userId: userId, workdir: '/data', cmds: cmd, diff --git a/src/service/VotingService.ts b/src/service/VotingService.ts index fe3d1776e..d422b39b9 100644 --- a/src/service/VotingService.ts +++ b/src/service/VotingService.ts @@ -39,7 +39,7 @@ export class VotingService { constructor(protected readonly params: VotingParams) {} public async run(presetData: ConfigPreset, nodeAccount: NodeAccount, nodePreset: NodePreset | undefined): Promise { - const symbolServerToolsImage = presetData.symbolServerToolsImage; + const symbolServerImage = presetData.symbolServerImage; if (nodePreset?.voting && nodeAccount.voting) { const privateKeyTreeFileName = 'private_key_tree1.dat'; @@ -75,7 +75,7 @@ export class VotingService { const userId = await BootstrapUtils.resolveDockerUserFromParam(this.params.user); const { stdout, stderr } = await BootstrapUtils.runImageUsingExec({ catapultAppFolder: presetData.catapultAppFolder, - image: symbolServerToolsImage, + image: symbolServerImage, userId: userId, cmds: cmd, binds: binds, diff --git a/test/composes/expected-docker-compose-bootstrap-custom-compose.yml b/test/composes/expected-docker-compose-bootstrap-custom-compose.yml index 29d07b186..b8a6df29d 100644 --- a/test/composes/expected-docker-compose-bootstrap-custom-compose.yml +++ b/test/composes/expected-docker-compose-bootstrap-custom-compose.yml @@ -23,7 +23,7 @@ services: peer-node-0: user: '1000:1000' container_name: peer-node-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker peer-node-0 NORMAL false stop_signal: SIGINT working_dir: /symbol-workdir @@ -47,7 +47,7 @@ services: peer-node-1: user: '1000:1000' container_name: peer-node-1 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker peer-node-1 NORMAL false stop_signal: SIGINT working_dir: /symbol-workdir @@ -71,7 +71,7 @@ services: api-node-0: user: '1000:1000' container_name: api-node-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker api-node-0 NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -90,7 +90,7 @@ services: api-node-broker-0: user: '1000:1000' container_name: api-node-broker-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server api-node-broker-0 NORMAL ports: @@ -105,7 +105,7 @@ services: rest-gateway-0: container_name: rest-gateway-0 user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-docker-compose-bootstrap-custom.yml b/test/composes/expected-docker-compose-bootstrap-custom.yml index 04d78109e..7a21f15eb 100644 --- a/test/composes/expected-docker-compose-bootstrap-custom.yml +++ b/test/composes/expected-docker-compose-bootstrap-custom.yml @@ -16,7 +16,7 @@ services: - '../databases/db-0:/dbdata:rw' peer-node-0: container_name: peer-node-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker peer-node-0 DEBUG false stop_signal: SIGINT working_dir: /symbol-workdir @@ -38,7 +38,7 @@ services: hostname: peer-node-0 peer-node-1: container_name: peer-node-1 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker peer-node-1 DEBUG false stop_signal: SIGINT working_dir: /symbol-workdir @@ -60,7 +60,7 @@ services: hostname: peer-node-1 api-node-0: container_name: api-node-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker api-node-0 DEBUG true stop_signal: SIGINT working_dir: /symbol-workdir @@ -83,7 +83,7 @@ services: hostname: api-node-0 api-node-broker-0: container_name: api-node-broker-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server api-node-broker-0 DEBUG ports: @@ -103,7 +103,7 @@ services: rest-gateway-0: container_name: rest-gateway-0 user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-docker-compose-bootstrap-full.yml b/test/composes/expected-docker-compose-bootstrap-full.yml index 21058660e..c2863474d 100644 --- a/test/composes/expected-docker-compose-bootstrap-full.yml +++ b/test/composes/expected-docker-compose-bootstrap-full.yml @@ -21,7 +21,7 @@ services: privileged: true peer-node-0: container_name: peer-node-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker peer-node-0 DEBUG false stop_signal: SIGINT working_dir: /symbol-workdir @@ -43,7 +43,7 @@ services: hostname: peer-node-0 peer-node-1: container_name: peer-node-1 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker peer-node-1 DEBUG false stop_signal: SIGINT working_dir: /symbol-workdir @@ -65,7 +65,7 @@ services: hostname: peer-node-1 api-node-0: container_name: api-node-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker api-node-0 DEBUG true stop_signal: SIGINT working_dir: /symbol-workdir @@ -88,7 +88,7 @@ services: hostname: api-node-0 api-node-broker-0: container_name: api-node-broker-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server api-node-broker-0 DEBUG ports: @@ -108,7 +108,7 @@ services: rest-gateway-0: container_name: rest-gateway-0 user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-docker-compose-bootstrap-repeat.yml b/test/composes/expected-docker-compose-bootstrap-repeat.yml index 0d3751d4e..2b2a65750 100644 --- a/test/composes/expected-docker-compose-bootstrap-repeat.yml +++ b/test/composes/expected-docker-compose-bootstrap-repeat.yml @@ -59,7 +59,7 @@ services: peer-node-0: user: '1000:1000' container_name: peer-node-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker peer-node-0 NORMAL false stop_signal: SIGINT working_dir: /symbol-workdir @@ -77,7 +77,7 @@ services: peer-node-1: user: '1000:1000' container_name: peer-node-1 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker peer-node-1 NORMAL false stop_signal: SIGINT working_dir: /symbol-workdir @@ -95,7 +95,7 @@ services: peer-node-2: user: '1000:1000' container_name: peer-node-2 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker peer-node-2 NORMAL false stop_signal: SIGINT working_dir: /symbol-workdir @@ -113,7 +113,7 @@ services: api-node-0: user: '1000:1000' container_name: api-node-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker api-node-0 NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -132,7 +132,7 @@ services: api-node-1: user: '1000:1000' container_name: api-node-1 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker api-node-1 NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -151,7 +151,7 @@ services: api-node-2: user: '1000:1000' container_name: api-node-2 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker api-node-2 NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -170,7 +170,7 @@ services: api-node-3: user: '1000:1000' container_name: api-node-3 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker api-node-3 NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -189,7 +189,7 @@ services: api-node-broker-0: user: '1000:1000' container_name: api-node-broker-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server api-node-broker-0 NORMAL ports: @@ -204,7 +204,7 @@ services: api-node-broker-1: user: '1000:1000' container_name: api-node-broker-1 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server api-node-broker-1 NORMAL ports: @@ -219,7 +219,7 @@ services: api-node-broker-2: user: '1000:1000' container_name: api-node-broker-2 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server api-node-broker-2 NORMAL ports: @@ -234,7 +234,7 @@ services: api-node-broker-3: user: '1000:1000' container_name: api-node-broker-3 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server api-node-broker-3 NORMAL ports: @@ -249,7 +249,7 @@ services: rest-gateway-0: container_name: rest-gateway-0 user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir @@ -266,7 +266,7 @@ services: rest-gateway-1: container_name: rest-gateway-1 user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir @@ -283,7 +283,7 @@ services: rest-gateway-2: container_name: rest-gateway-2 user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir @@ -300,7 +300,7 @@ services: rest-gateway-3: container_name: rest-gateway-3 user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-docker-compose-bootstrap.yml b/test/composes/expected-docker-compose-bootstrap.yml index 902788871..f2915689c 100644 --- a/test/composes/expected-docker-compose-bootstrap.yml +++ b/test/composes/expected-docker-compose-bootstrap.yml @@ -17,7 +17,7 @@ services: peer-node-0: user: '1000:1000' container_name: peer-node-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker peer-node-0 NORMAL false stop_signal: SIGINT working_dir: /symbol-workdir @@ -35,7 +35,7 @@ services: peer-node-1: user: '1000:1000' container_name: peer-node-1 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker peer-node-1 NORMAL false stop_signal: SIGINT working_dir: /symbol-workdir @@ -53,7 +53,7 @@ services: api-node-0: user: '1000:1000' container_name: api-node-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker api-node-0 NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -72,7 +72,7 @@ services: api-node-broker-0: user: '1000:1000' container_name: api-node-broker-0 - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server api-node-broker-0 NORMAL ports: @@ -87,7 +87,7 @@ services: rest-gateway-0: container_name: rest-gateway-0 user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-mainnet-api-compose.yml b/test/composes/expected-mainnet-api-compose.yml index d45ade3fb..602cdd629 100644 --- a/test/composes/expected-mainnet-api-compose.yml +++ b/test/composes/expected-mainnet-api-compose.yml @@ -15,7 +15,7 @@ services: node: user: '1000:1000' container_name: node - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker node NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -31,7 +31,7 @@ services: broker: user: '1000:1000' container_name: broker - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server broker NORMAL stop_signal: SIGINT @@ -44,7 +44,7 @@ services: rest-gateway: container_name: rest-gateway user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-mainnet-dual-compose.yml b/test/composes/expected-mainnet-dual-compose.yml index d45ade3fb..602cdd629 100644 --- a/test/composes/expected-mainnet-dual-compose.yml +++ b/test/composes/expected-mainnet-dual-compose.yml @@ -15,7 +15,7 @@ services: node: user: '1000:1000' container_name: node - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker node NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -31,7 +31,7 @@ services: broker: user: '1000:1000' container_name: broker - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server broker NORMAL stop_signal: SIGINT @@ -44,7 +44,7 @@ services: rest-gateway: container_name: rest-gateway user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-mainnet-peer-compose.yml b/test/composes/expected-mainnet-peer-compose.yml index a1bedf697..8cb408c32 100644 --- a/test/composes/expected-mainnet-peer-compose.yml +++ b/test/composes/expected-mainnet-peer-compose.yml @@ -3,7 +3,7 @@ services: node: user: '1000:1000' container_name: node - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker node NORMAL false stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-testnet-api-compose.yml b/test/composes/expected-testnet-api-compose.yml index d45ade3fb..602cdd629 100644 --- a/test/composes/expected-testnet-api-compose.yml +++ b/test/composes/expected-testnet-api-compose.yml @@ -15,7 +15,7 @@ services: node: user: '1000:1000' container_name: node - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker node NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -31,7 +31,7 @@ services: broker: user: '1000:1000' container_name: broker - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server broker NORMAL stop_signal: SIGINT @@ -44,7 +44,7 @@ services: rest-gateway: container_name: rest-gateway user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-testnet-dual-compose.yml b/test/composes/expected-testnet-dual-compose.yml index d45ade3fb..602cdd629 100644 --- a/test/composes/expected-testnet-dual-compose.yml +++ b/test/composes/expected-testnet-dual-compose.yml @@ -15,7 +15,7 @@ services: node: user: '1000:1000' container_name: node - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker node NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -31,7 +31,7 @@ services: broker: user: '1000:1000' container_name: broker - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server broker NORMAL stop_signal: SIGINT @@ -44,7 +44,7 @@ services: rest-gateway: container_name: rest-gateway user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-testnet-peer-compose.yml b/test/composes/expected-testnet-peer-compose.yml index a1bedf697..8cb408c32 100644 --- a/test/composes/expected-testnet-peer-compose.yml +++ b/test/composes/expected-testnet-peer-compose.yml @@ -3,7 +3,7 @@ services: node: user: '1000:1000' container_name: node - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker node NORMAL false stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-testnet-supernode-compose.yml b/test/composes/expected-testnet-supernode-compose.yml index 3b1b5c7b9..b86054f9d 100644 --- a/test/composes/expected-testnet-supernode-compose.yml +++ b/test/composes/expected-testnet-supernode-compose.yml @@ -15,7 +15,7 @@ services: node: user: '1000:1000' container_name: node - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker node NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -36,7 +36,7 @@ services: broker: user: '1000:1000' container_name: broker - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server broker NORMAL stop_signal: SIGINT @@ -49,7 +49,7 @@ services: node-agent: user: '1000:1000' container_name: node-agent - image: 'symbolplatform/symbol-node-rewards-agent:1.0.2-alpha.0' + image: 'symbolplatform/symbol-node-rewards-agent:2.0.0' working_dir: /symbol-workdir entrypoint: /app/agent-linux.bin --config agent.properties ports: @@ -61,7 +61,7 @@ services: rest-gateway: container_name: rest-gateway user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/composes/expected-testnet-voting-compose.yml b/test/composes/expected-testnet-voting-compose.yml index d45ade3fb..602cdd629 100644 --- a/test/composes/expected-testnet-voting-compose.yml +++ b/test/composes/expected-testnet-voting-compose.yml @@ -15,7 +15,7 @@ services: node: user: '1000:1000' container_name: node - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data server broker node NORMAL true stop_signal: SIGINT working_dir: /symbol-workdir @@ -31,7 +31,7 @@ services: broker: user: '1000:1000' container_name: broker - image: 'symbolplatform/symbol-server:gcc-1.0.0.0' + image: 'symbolplatform/symbol-server:gcc-10-1.0.1.0' working_dir: /symbol-workdir command: /bin/bash /symbol-commands/start.sh /usr/catapult ./data broker server broker NORMAL stop_signal: SIGINT @@ -44,7 +44,7 @@ services: rest-gateway: container_name: rest-gateway user: '1000:1000' - image: 'symbolplatform/symbol-rest:2.3.5' + image: 'symbolplatform/symbol-rest:2.3.6' command: npm start --prefix /app/catapult-rest/rest /symbol-workdir/rest.json stop_signal: SIGINT working_dir: /symbol-workdir diff --git a/test/reports/bootstrap-voting/api-node-0-config.csv b/test/reports/bootstrap-voting/api-node-0-config.csv index 492d33f13..5b4de25fe 100644 --- a/test/reports/bootstrap-voting/api-node-0-config.csv +++ b/test/reports/bootstrap-voting/api-node-0-config.csv @@ -295,7 +295,7 @@ maxWriteBatchSize; 5MB localnode host; api-node-0; string; Node host (leave empty to auto-detect IP). friendlyName; my-api-node-0; string; Node friendly name (leave empty to use address). -version; 1.0.0.0; uint32_t; Node version. +version; 1.0.1.0; uint32_t; Node version. roles; Api; ionet::NodeRoles; Node roles. outgoing_connections diff --git a/test/reports/bootstrap-voting/api-node-0-config.rst b/test/reports/bootstrap-voting/api-node-0-config.rst index 26660212a..d87de9df7 100644 --- a/test/reports/bootstrap-voting/api-node-0-config.rst +++ b/test/reports/bootstrap-voting/api-node-0-config.rst @@ -320,7 +320,7 @@ config-node.properties **localnode**; ; ; host; api-node-0; string; Node host (leave empty to auto-detect IP). friendlyName; my-api-node-0; string; Node friendly name (leave empty to use address). - version; 1.0.0.0; uint32_t; Node version. + version; 1.0.1.0; uint32_t; Node version. roles; Api; ionet::NodeRoles; Node roles. **outgoing_connections**; ; ; maxConnections; 10; uint16_t; Maximum number of active connections. diff --git a/test/reports/bootstrap-voting/peer-node-0-config.csv b/test/reports/bootstrap-voting/peer-node-0-config.csv index 0bf17086b..a2942d7f2 100644 --- a/test/reports/bootstrap-voting/peer-node-0-config.csv +++ b/test/reports/bootstrap-voting/peer-node-0-config.csv @@ -305,7 +305,7 @@ maxWriteBatchSize; 5MB localnode host; peer-node-0; string; Node host (leave empty to auto-detect IP). friendlyName; my-peer-node-0; string; Node friendly name (leave empty to use address). -version; 1.0.0.0; uint32_t; Node version. +version; 1.0.1.0; uint32_t; Node version. roles; Peer,Voting; ionet::NodeRoles; Node roles. outgoing_connections diff --git a/test/reports/bootstrap-voting/peer-node-0-config.rst b/test/reports/bootstrap-voting/peer-node-0-config.rst index 8b79d11a5..36e153112 100644 --- a/test/reports/bootstrap-voting/peer-node-0-config.rst +++ b/test/reports/bootstrap-voting/peer-node-0-config.rst @@ -334,7 +334,7 @@ config-node.properties **localnode**; ; ; host; peer-node-0; string; Node host (leave empty to auto-detect IP). friendlyName; my-peer-node-0; string; Node friendly name (leave empty to use address). - version; 1.0.0.0; uint32_t; Node version. + version; 1.0.1.0; uint32_t; Node version. roles; Peer,Voting; ionet::NodeRoles; Node roles. **outgoing_connections**; ; ; maxConnections; 10; uint16_t; Maximum number of active connections. diff --git a/test/reports/bootstrap-voting/peer-node-1-config.csv b/test/reports/bootstrap-voting/peer-node-1-config.csv index f468b3ce3..e3dd024dc 100644 --- a/test/reports/bootstrap-voting/peer-node-1-config.csv +++ b/test/reports/bootstrap-voting/peer-node-1-config.csv @@ -305,7 +305,7 @@ maxWriteBatchSize; 5MB localnode host; peer-node-1; string; Node host (leave empty to auto-detect IP). friendlyName; my-peer-node-1; string; Node friendly name (leave empty to use address). -version; 1.0.0.0; uint32_t; Node version. +version; 1.0.1.0; uint32_t; Node version. roles; Peer,Voting; ionet::NodeRoles; Node roles. outgoing_connections diff --git a/test/reports/bootstrap-voting/peer-node-1-config.rst b/test/reports/bootstrap-voting/peer-node-1-config.rst index 6ec0b44ea..711d324eb 100644 --- a/test/reports/bootstrap-voting/peer-node-1-config.rst +++ b/test/reports/bootstrap-voting/peer-node-1-config.rst @@ -334,7 +334,7 @@ config-node.properties **localnode**; ; ; host; peer-node-1; string; Node host (leave empty to auto-detect IP). friendlyName; my-peer-node-1; string; Node friendly name (leave empty to use address). - version; 1.0.0.0; uint32_t; Node version. + version; 1.0.1.0; uint32_t; Node version. roles; Peer,Voting; ionet::NodeRoles; Node roles. **outgoing_connections**; ; ; maxConnections; 10; uint16_t; Maximum number of active connections. diff --git a/test/reports/bootstrap-voting/rest-gateway-0-rest.json b/test/reports/bootstrap-voting/rest-gateway-0-rest.json new file mode 100644 index 000000000..7ece67cf8 --- /dev/null +++ b/test/reports/bootstrap-voting/rest-gateway-0-rest.json @@ -0,0 +1,91 @@ +{ + "network": { + "name": "publicTest", + "description": "catapult development network" + }, + "port": 3000, + "crossDomain": { + "allowedHosts": [ + "*" + ], + "allowedMethods": [ + "GET", + "POST", + "PUT", + "OPTIONS" + ] + }, + "extensions": [ + "accountLink", + "aggregate", + "lockHash", + "lockSecret", + "mosaic", + "metadata", + "multisig", + "namespace", + "receipts", + "restrictions", + "transfer" + ], + "db": { + "url": "mongodb://db-0:27017/", + "name": "catapult", + "pageSizeMin": 10, + "pageSizeMax": 100, + "maxConnectionAttempts": 15, + "baseRetryDelay": 750, + "connectionPoolSize": 10 + }, + "apiNode": { + "host": "api-node-0", + "port": 7900, + "tlsClientCertificatePath": "/symbol-workdir/api-node-config/cert/node.crt.pem", + "tlsClientKeyPath": "/symbol-workdir/api-node-config/cert/node.key.pem", + "tlsCaCertificatePath": "/symbol-workdir/api-node-config/cert/ca.cert.pem", + "timeout": 1000, + "networkPropertyFilePath": "/symbol-workdir/api-node-config/config-network.properties", + "nodePropertyFilePath": "/symbol-workdir/api-node-config/config-node.properties" + }, + "websocket": { + "mq": { + "host": "api-node-broker-0", + "port": 7902, + "monitorInterval": 500, + "connectTimeout": 10000, + "monitorLoggingThrottle": 60000, + "maxSubscriptions": 300 + }, + "allowOptionalAddress": true + }, + "throttling": { + "burst": 80, + "rate": 60 + }, + "logging": { + "console": { + "formats": [ + "colorize", + "simple" + ], + "level": "verbose", + "handleExceptions": true + }, + "file": { + "formats": [ + "prettyPrint" + ], + "level": "verbose", + "handleExceptions": true, + "filename": "/symbol-workdir/logs/catapult-rest.log", + "maxsize": 20971520, + "maxFiles": 100 + } + }, + "numBlocksTransactionFeeStats": 300, + "deployment": { + "deploymentTool": "symbol-bootstrap", + "deploymentToolVersion": "abc", + "lastUpdatedDate": "2021-05-23" + } +} diff --git a/test/reports/mainnet-dual-voting/node-config.csv b/test/reports/mainnet-dual-voting/node-config.csv index cef460cc8..c2ad90654 100644 --- a/test/reports/mainnet-dual-voting/node-config.csv +++ b/test/reports/mainnet-dual-voting/node-config.csv @@ -726,7 +726,7 @@ maxWriteBatchSize; 5MB localnode host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). -version; 1.0.0.0; uint32_t; Node version. +version; 1.0.1.0; uint32_t; Node version. roles; Peer,Api,Voting; ionet::NodeRoles; Node roles. outgoing_connections diff --git a/test/reports/mainnet-dual-voting/node-config.rst b/test/reports/mainnet-dual-voting/node-config.rst index 154fa6d00..386f3153a 100644 --- a/test/reports/mainnet-dual-voting/node-config.rst +++ b/test/reports/mainnet-dual-voting/node-config.rst @@ -755,7 +755,7 @@ config-node.properties **localnode**; ; ; host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). - version; 1.0.0.0; uint32_t; Node version. + version; 1.0.1.0; uint32_t; Node version. roles; Peer,Api,Voting; ionet::NodeRoles; Node roles. **outgoing_connections**; ; ; maxConnections; 10; uint16_t; Maximum number of active connections. diff --git a/test/reports/mainnet-dual-voting/rest-gateway-rest.json b/test/reports/mainnet-dual-voting/rest-gateway-rest.json new file mode 100644 index 000000000..060614d72 --- /dev/null +++ b/test/reports/mainnet-dual-voting/rest-gateway-rest.json @@ -0,0 +1,92 @@ +{ + "network": { + "name": "public", + "description": "catapult public main network" + }, + "port": 3000, + "crossDomain": { + "allowedHosts": [ + "*" + ], + "allowedMethods": [ + "GET", + "POST", + "PUT", + "OPTIONS" + ] + }, + "extensions": [ + "accountLink", + "aggregate", + "lockHash", + "lockSecret", + "mosaic", + "metadata", + "multisig", + "namespace", + "receipts", + "restrictions", + "transfer", + "cmc" + ], + "db": { + "url": "mongodb://db:27017/", + "name": "catapult", + "pageSizeMin": 10, + "pageSizeMax": 100, + "maxConnectionAttempts": 15, + "baseRetryDelay": 750, + "connectionPoolSize": 10 + }, + "apiNode": { + "host": "node", + "port": 7900, + "tlsClientCertificatePath": "/symbol-workdir/api-node-config/cert/node.crt.pem", + "tlsClientKeyPath": "/symbol-workdir/api-node-config/cert/node.key.pem", + "tlsCaCertificatePath": "/symbol-workdir/api-node-config/cert/ca.cert.pem", + "timeout": 1000, + "networkPropertyFilePath": "/symbol-workdir/api-node-config/config-network.properties", + "nodePropertyFilePath": "/symbol-workdir/api-node-config/config-node.properties" + }, + "websocket": { + "mq": { + "host": "broker", + "port": 7902, + "monitorInterval": 500, + "connectTimeout": 10000, + "monitorLoggingThrottle": 60000, + "maxSubscriptions": 300 + }, + "allowOptionalAddress": true + }, + "throttling": { + "burst": 80, + "rate": 60 + }, + "logging": { + "console": { + "formats": [ + "colorize", + "simple" + ], + "level": "verbose", + "handleExceptions": true + }, + "file": { + "formats": [ + "prettyPrint" + ], + "level": "verbose", + "handleExceptions": true, + "filename": "/symbol-workdir/logs/catapult-rest.log", + "maxsize": 20971520, + "maxFiles": 100 + } + }, + "numBlocksTransactionFeeStats": 300, + "deployment": { + "deploymentTool": "symbol-bootstrap", + "deploymentToolVersion": "abc", + "lastUpdatedDate": "2021-05-23" + } +} diff --git a/test/reports/mainnet-dual/node-config.csv b/test/reports/mainnet-dual/node-config.csv index f564e03a0..f1cf96446 100644 --- a/test/reports/mainnet-dual/node-config.csv +++ b/test/reports/mainnet-dual/node-config.csv @@ -726,7 +726,7 @@ maxWriteBatchSize; 5MB localnode host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). -version; 1.0.0.0; uint32_t; Node version. +version; 1.0.1.0; uint32_t; Node version. roles; Peer,Api; ionet::NodeRoles; Node roles. outgoing_connections diff --git a/test/reports/mainnet-dual/node-config.rst b/test/reports/mainnet-dual/node-config.rst index 3b2ad0362..8a3f4e515 100644 --- a/test/reports/mainnet-dual/node-config.rst +++ b/test/reports/mainnet-dual/node-config.rst @@ -755,7 +755,7 @@ config-node.properties **localnode**; ; ; host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). - version; 1.0.0.0; uint32_t; Node version. + version; 1.0.1.0; uint32_t; Node version. roles; Peer,Api; ionet::NodeRoles; Node roles. **outgoing_connections**; ; ; maxConnections; 10; uint16_t; Maximum number of active connections. diff --git a/test/reports/mainnet-dual/rest-gateway-rest.json b/test/reports/mainnet-dual/rest-gateway-rest.json new file mode 100644 index 000000000..060614d72 --- /dev/null +++ b/test/reports/mainnet-dual/rest-gateway-rest.json @@ -0,0 +1,92 @@ +{ + "network": { + "name": "public", + "description": "catapult public main network" + }, + "port": 3000, + "crossDomain": { + "allowedHosts": [ + "*" + ], + "allowedMethods": [ + "GET", + "POST", + "PUT", + "OPTIONS" + ] + }, + "extensions": [ + "accountLink", + "aggregate", + "lockHash", + "lockSecret", + "mosaic", + "metadata", + "multisig", + "namespace", + "receipts", + "restrictions", + "transfer", + "cmc" + ], + "db": { + "url": "mongodb://db:27017/", + "name": "catapult", + "pageSizeMin": 10, + "pageSizeMax": 100, + "maxConnectionAttempts": 15, + "baseRetryDelay": 750, + "connectionPoolSize": 10 + }, + "apiNode": { + "host": "node", + "port": 7900, + "tlsClientCertificatePath": "/symbol-workdir/api-node-config/cert/node.crt.pem", + "tlsClientKeyPath": "/symbol-workdir/api-node-config/cert/node.key.pem", + "tlsCaCertificatePath": "/symbol-workdir/api-node-config/cert/ca.cert.pem", + "timeout": 1000, + "networkPropertyFilePath": "/symbol-workdir/api-node-config/config-network.properties", + "nodePropertyFilePath": "/symbol-workdir/api-node-config/config-node.properties" + }, + "websocket": { + "mq": { + "host": "broker", + "port": 7902, + "monitorInterval": 500, + "connectTimeout": 10000, + "monitorLoggingThrottle": 60000, + "maxSubscriptions": 300 + }, + "allowOptionalAddress": true + }, + "throttling": { + "burst": 80, + "rate": 60 + }, + "logging": { + "console": { + "formats": [ + "colorize", + "simple" + ], + "level": "verbose", + "handleExceptions": true + }, + "file": { + "formats": [ + "prettyPrint" + ], + "level": "verbose", + "handleExceptions": true, + "filename": "/symbol-workdir/logs/catapult-rest.log", + "maxsize": 20971520, + "maxFiles": 100 + } + }, + "numBlocksTransactionFeeStats": 300, + "deployment": { + "deploymentTool": "symbol-bootstrap", + "deploymentToolVersion": "abc", + "lastUpdatedDate": "2021-05-23" + } +} diff --git a/test/reports/mainnet-peer/node-config.csv b/test/reports/mainnet-peer/node-config.csv index 985d23097..2eab1674a 100644 --- a/test/reports/mainnet-peer/node-config.csv +++ b/test/reports/mainnet-peer/node-config.csv @@ -726,7 +726,7 @@ maxWriteBatchSize; 5MB localnode host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). -version; 1.0.0.0; uint32_t; Node version. +version; 1.0.1.0; uint32_t; Node version. roles; Peer; ionet::NodeRoles; Node roles. outgoing_connections diff --git a/test/reports/mainnet-peer/node-config.rst b/test/reports/mainnet-peer/node-config.rst index 93e0c6b39..74be02007 100644 --- a/test/reports/mainnet-peer/node-config.rst +++ b/test/reports/mainnet-peer/node-config.rst @@ -755,7 +755,7 @@ config-node.properties **localnode**; ; ; host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). - version; 1.0.0.0; uint32_t; Node version. + version; 1.0.1.0; uint32_t; Node version. roles; Peer; ionet::NodeRoles; Node roles. **outgoing_connections**; ; ; maxConnections; 10; uint16_t; Maximum number of active connections. diff --git a/test/reports/testnet-api/node-config.csv b/test/reports/testnet-api/node-config.csv index 8208bb791..c084972f3 100644 --- a/test/reports/testnet-api/node-config.csv +++ b/test/reports/testnet-api/node-config.csv @@ -716,7 +716,7 @@ maxWriteBatchSize; 5MB localnode host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). -version; 1.0.0.0; uint32_t; Node version. +version; 1.0.1.0; uint32_t; Node version. roles; Api; ionet::NodeRoles; Node roles. outgoing_connections diff --git a/test/reports/testnet-api/node-config.rst b/test/reports/testnet-api/node-config.rst index fc0bdd2f5..704e302b3 100644 --- a/test/reports/testnet-api/node-config.rst +++ b/test/reports/testnet-api/node-config.rst @@ -741,7 +741,7 @@ config-node.properties **localnode**; ; ; host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). - version; 1.0.0.0; uint32_t; Node version. + version; 1.0.1.0; uint32_t; Node version. roles; Api; ionet::NodeRoles; Node roles. **outgoing_connections**; ; ; maxConnections; 10; uint16_t; Maximum number of active connections. diff --git a/test/reports/testnet-api/rest-gateway-rest.json b/test/reports/testnet-api/rest-gateway-rest.json new file mode 100644 index 000000000..d01383936 --- /dev/null +++ b/test/reports/testnet-api/rest-gateway-rest.json @@ -0,0 +1,92 @@ +{ + "network": { + "name": "publicTest", + "description": "catapult public test network" + }, + "port": 3000, + "crossDomain": { + "allowedHosts": [ + "*" + ], + "allowedMethods": [ + "GET", + "POST", + "PUT", + "OPTIONS" + ] + }, + "extensions": [ + "accountLink", + "aggregate", + "lockHash", + "lockSecret", + "mosaic", + "metadata", + "multisig", + "namespace", + "receipts", + "restrictions", + "transfer", + "cmc" + ], + "db": { + "url": "mongodb://db:27017/", + "name": "catapult", + "pageSizeMin": 10, + "pageSizeMax": 100, + "maxConnectionAttempts": 15, + "baseRetryDelay": 750, + "connectionPoolSize": 10 + }, + "apiNode": { + "host": "node", + "port": 7900, + "tlsClientCertificatePath": "/symbol-workdir/api-node-config/cert/node.crt.pem", + "tlsClientKeyPath": "/symbol-workdir/api-node-config/cert/node.key.pem", + "tlsCaCertificatePath": "/symbol-workdir/api-node-config/cert/ca.cert.pem", + "timeout": 1000, + "networkPropertyFilePath": "/symbol-workdir/api-node-config/config-network.properties", + "nodePropertyFilePath": "/symbol-workdir/api-node-config/config-node.properties" + }, + "websocket": { + "mq": { + "host": "broker", + "port": 7902, + "monitorInterval": 500, + "connectTimeout": 10000, + "monitorLoggingThrottle": 60000, + "maxSubscriptions": 300 + }, + "allowOptionalAddress": true + }, + "throttling": { + "burst": 80, + "rate": 60 + }, + "logging": { + "console": { + "formats": [ + "colorize", + "simple" + ], + "level": "verbose", + "handleExceptions": true + }, + "file": { + "formats": [ + "prettyPrint" + ], + "level": "verbose", + "handleExceptions": true, + "filename": "/symbol-workdir/logs/catapult-rest.log", + "maxsize": 20971520, + "maxFiles": 100 + } + }, + "numBlocksTransactionFeeStats": 300, + "deployment": { + "deploymentTool": "symbol-bootstrap", + "deploymentToolVersion": "ABC", + "lastUpdatedDate": "2021-05-23" + } +} diff --git a/test/reports/testnet-dual-voting/node-config.csv b/test/reports/testnet-dual-voting/node-config.csv index e2816a2e5..3c72a2624 100644 --- a/test/reports/testnet-dual-voting/node-config.csv +++ b/test/reports/testnet-dual-voting/node-config.csv @@ -726,7 +726,7 @@ maxWriteBatchSize; 5MB localnode host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). -version; 1.0.0.0; uint32_t; Node version. +version; 1.0.1.0; uint32_t; Node version. roles; Peer,Api,Voting; ionet::NodeRoles; Node roles. outgoing_connections diff --git a/test/reports/testnet-dual-voting/node-config.rst b/test/reports/testnet-dual-voting/node-config.rst index b374ddf60..e09011742 100644 --- a/test/reports/testnet-dual-voting/node-config.rst +++ b/test/reports/testnet-dual-voting/node-config.rst @@ -755,7 +755,7 @@ config-node.properties **localnode**; ; ; host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). - version; 1.0.0.0; uint32_t; Node version. + version; 1.0.1.0; uint32_t; Node version. roles; Peer,Api,Voting; ionet::NodeRoles; Node roles. **outgoing_connections**; ; ; maxConnections; 10; uint16_t; Maximum number of active connections. diff --git a/test/reports/testnet-dual-voting/rest-gateway-rest.json b/test/reports/testnet-dual-voting/rest-gateway-rest.json new file mode 100644 index 000000000..8cbda7298 --- /dev/null +++ b/test/reports/testnet-dual-voting/rest-gateway-rest.json @@ -0,0 +1,92 @@ +{ + "network": { + "name": "publicTest", + "description": "catapult public test network" + }, + "port": 3000, + "crossDomain": { + "allowedHosts": [ + "*" + ], + "allowedMethods": [ + "GET", + "POST", + "PUT", + "OPTIONS" + ] + }, + "extensions": [ + "accountLink", + "aggregate", + "lockHash", + "lockSecret", + "mosaic", + "metadata", + "multisig", + "namespace", + "receipts", + "restrictions", + "transfer", + "cmc" + ], + "db": { + "url": "mongodb://db:27017/", + "name": "catapult", + "pageSizeMin": 10, + "pageSizeMax": 100, + "maxConnectionAttempts": 15, + "baseRetryDelay": 750, + "connectionPoolSize": 10 + }, + "apiNode": { + "host": "node", + "port": 7900, + "tlsClientCertificatePath": "/symbol-workdir/api-node-config/cert/node.crt.pem", + "tlsClientKeyPath": "/symbol-workdir/api-node-config/cert/node.key.pem", + "tlsCaCertificatePath": "/symbol-workdir/api-node-config/cert/ca.cert.pem", + "timeout": 1000, + "networkPropertyFilePath": "/symbol-workdir/api-node-config/config-network.properties", + "nodePropertyFilePath": "/symbol-workdir/api-node-config/config-node.properties" + }, + "websocket": { + "mq": { + "host": "broker", + "port": 7902, + "monitorInterval": 500, + "connectTimeout": 10000, + "monitorLoggingThrottle": 60000, + "maxSubscriptions": 300 + }, + "allowOptionalAddress": true + }, + "throttling": { + "burst": 80, + "rate": 60 + }, + "logging": { + "console": { + "formats": [ + "colorize", + "simple" + ], + "level": "verbose", + "handleExceptions": true + }, + "file": { + "formats": [ + "prettyPrint" + ], + "level": "verbose", + "handleExceptions": true, + "filename": "/symbol-workdir/logs/catapult-rest.log", + "maxsize": 20971520, + "maxFiles": 100 + } + }, + "numBlocksTransactionFeeStats": 300, + "deployment": { + "deploymentTool": "symbol-bootstrap", + "deploymentToolVersion": "abc", + "lastUpdatedDate": "2021-05-22" + } +} diff --git a/test/reports/testnet-peer-non-harvesting-voting/node-config.csv b/test/reports/testnet-peer-non-harvesting-voting/node-config.csv index 51ee348e2..6c2ff4672 100644 --- a/test/reports/testnet-peer-non-harvesting-voting/node-config.csv +++ b/test/reports/testnet-peer-non-harvesting-voting/node-config.csv @@ -716,7 +716,7 @@ maxWriteBatchSize; 5MB localnode host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). -version; 1.0.0.0; uint32_t; Node version. +version; 1.0.1.0; uint32_t; Node version. roles; Peer,Voting; ionet::NodeRoles; Node roles. outgoing_connections diff --git a/test/reports/testnet-peer-non-harvesting-voting/node-config.rst b/test/reports/testnet-peer-non-harvesting-voting/node-config.rst index 11d66647a..a39ac5750 100644 --- a/test/reports/testnet-peer-non-harvesting-voting/node-config.rst +++ b/test/reports/testnet-peer-non-harvesting-voting/node-config.rst @@ -741,7 +741,7 @@ config-node.properties **localnode**; ; ; host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). - version; 1.0.0.0; uint32_t; Node version. + version; 1.0.1.0; uint32_t; Node version. roles; Peer,Voting; ionet::NodeRoles; Node roles. **outgoing_connections**; ; ; maxConnections; 10; uint16_t; Maximum number of active connections. diff --git a/test/reports/testnet-peer-voting/node-config.csv b/test/reports/testnet-peer-voting/node-config.csv index 8fd5634ba..d95c79de9 100644 --- a/test/reports/testnet-peer-voting/node-config.csv +++ b/test/reports/testnet-peer-voting/node-config.csv @@ -726,7 +726,7 @@ maxWriteBatchSize; 5MB localnode host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). -version; 1.0.0.0; uint32_t; Node version. +version; 1.0.1.0; uint32_t; Node version. roles; Peer,Voting; ionet::NodeRoles; Node roles. outgoing_connections diff --git a/test/reports/testnet-peer-voting/node-config.rst b/test/reports/testnet-peer-voting/node-config.rst index 286506298..837cf795f 100644 --- a/test/reports/testnet-peer-voting/node-config.rst +++ b/test/reports/testnet-peer-voting/node-config.rst @@ -755,7 +755,7 @@ config-node.properties **localnode**; ; ; host; ; string; Node host (leave empty to auto-detect IP). friendlyName; myFriendlyName; string; Node friendly name (leave empty to use address). - version; 1.0.0.0; uint32_t; Node version. + version; 1.0.1.0; uint32_t; Node version. roles; Peer,Voting; ionet::NodeRoles; Node roles. **outgoing_connections**; ; ; maxConnections; 10; uint16_t; Maximum number of active connections. diff --git a/test/service/AgentCertificateService.test.ts b/test/service/AgentCertificateService.test.ts index a8bcbcdf3..c4c0d2dbd 100644 --- a/test/service/AgentCertificateService.test.ts +++ b/test/service/AgentCertificateService.test.ts @@ -35,7 +35,7 @@ describe('AgentCertificateService', () => { await service.run( presetData.networkType, - presetData.symbolServerToolsImage, + presetData.symbolServerImage, 'supernode', { agent: { diff --git a/test/service/BootstrapServce.e2e.ts b/test/service/BootstrapServce.e2e.ts index dcd52c130..3ede80276 100644 --- a/test/service/BootstrapServce.e2e.ts +++ b/test/service/BootstrapServce.e2e.ts @@ -17,19 +17,23 @@ import { expect } from '@oclif/test'; import 'mocha'; import { Account, Deadline, PlainMessage, RepositoryFactoryHttp, TransactionService, TransferTransaction, UInt64 } from 'symbol-sdk'; -import { BootstrapService, BootstrapUtils, ConfigResult, ConfigService, Preset, StartParams } from '../../src/service'; +import { BootstrapService, BootstrapUtils, ConfigLoader, ConfigResult, ConfigService, Preset, StartParams } from '../../src/service'; describe('BootstrapService', () => { - async function basicTestNetwork(configResult: ConfigResult): Promise { - expect(configResult.presetData).not.null; - expect(configResult.addresses).not.null; + const timeout = 60000; + + //TODO Fix the transfer test! + async function transferTest(configResult: ConfigResult): Promise { const repositoryFactory = new RepositoryFactoryHttp('http://localhost:3000'); const networkType = await repositoryFactory.getNetworkType().toPromise(); const generationHash = await repositoryFactory.getGenerationHash().toPromise(); - expect(configResult.addresses.networkType).eq(networkType); - expect(configResult.presetData.networkType).eq(networkType); - expect(configResult.addresses.nemesisGenerationHashSeed).eq(generationHash); - expect(configResult.presetData.nemesisGenerationHashSeed).eq(generationHash); + + const nemesisAccounts = configResult.addresses?.mosaics?.[0].accounts.map((n) => n.privateKey); + if (!nemesisAccounts || !nemesisAccounts[0]) { + throw new Error('Nemesis accounts could not be loaded!'); + } + const account = Account.createFromPrivateKey(nemesisAccounts[0], networkType); + const listener = repositoryFactory.createListener(); try { await listener.open(); @@ -40,14 +44,7 @@ describe('BootstrapService', () => { const { currency } = await repositoryFactory.getCurrencies().toPromise(); const mosaic = currency.createRelative(10); - const nemesisAccounts = configResult.addresses?.mosaics?.[0].accounts.map((n) => n.privateKey); - - if (!nemesisAccounts || !nemesisAccounts[0]) { - throw new Error('Nemesis accounts could not be loaded!'); - } - const maxFee = UInt64.fromUint(10000000); - const account = Account.createFromPrivateKey(nemesisAccounts[0], networkType); const recipient = Account.generateNewAccount(networkType); @@ -70,42 +67,50 @@ describe('BootstrapService', () => { if (listener.isOpen()) { await listener.close(); } - // await service.stop(config); } } + async function basicTestNetwork(configResult: ConfigResult): Promise { + const repositoryFactory = new RepositoryFactoryHttp('http://localhost:3000'); + const networkType = await repositoryFactory.getNetworkType().toPromise(); + const generationHash = await repositoryFactory.getGenerationHash().toPromise(); + expect(configResult.presetData).not.null; + expect(configResult.addresses).not.null; + expect(configResult.addresses.networkType).eq(networkType); + expect(configResult.presetData.networkType).eq(networkType); + expect(configResult.addresses.nemesisGenerationHashSeed).eq(generationHash); + expect(configResult.presetData.nemesisGenerationHashSeed).eq(generationHash); + } - it(' bootstrap start', async () => { + it('bootstrap start', async () => { const service = new BootstrapService(); const config: StartParams = { ...ConfigService.defaultParams, preset: Preset.bootstrap, reset: true, - timeout: 60000 * 5, + timeout, pullImages: true, healthCheck: true, target: 'target/tests/bootstrap-test', detached: true, user: BootstrapUtils.CURRENT_USER, }; - await service.stop(config); const configResult = await service.start(config); try { - // Here you can write unit tests against a localhost:3000 network await basicTestNetwork(configResult); } finally { await service.stop(config); } }); - it(' bootstrap light', async () => { + it('bootstrap light', async () => { const service = new BootstrapService(); const config: StartParams = { ...ConfigService.defaultParams, preset: Preset.bootstrap, assembly: 'light', reset: true, - timeout: 60000 * 5, + timeout, healthCheck: true, pullImages: true, target: 'target/tests/light-test', @@ -115,10 +120,67 @@ describe('BootstrapService', () => { try { await service.stop(config); const configResult = await service.start(config); - // Here you can write unit tests against a localhost:3000 network await basicTestNetwork(configResult); } finally { await service.stop(config); } }); + + it('testnet dual', async () => { + const service = new BootstrapService(); + const config: StartParams = { + ...ConfigService.defaultParams, + preset: Preset.testnet, + assembly: 'dual', + reset: true, + timeout, + healthCheck: true, + pullImages: true, + target: 'target/tests/testnet-dual', + detached: true, + user: BootstrapUtils.CURRENT_USER, + }; + try { + await service.stop(config); + const configResult = await service.start(config); + await basicTestNetwork(configResult); + } finally { + await service.stop(config); + } + }); + + it('mainnet dual', async () => { + const service = new BootstrapService(); + const config: StartParams = { + ...ConfigService.defaultParams, + preset: Preset.mainnet, + assembly: 'dual', + reset: true, + timeout, + healthCheck: true, + pullImages: true, + target: 'target/tests/mainnet-dual', + detached: true, + user: BootstrapUtils.CURRENT_USER, + }; + try { + await service.stop(config); + const configResult = await service.start(config); + await basicTestNetwork(configResult); + } finally { + await service.stop(config); + } + }); + + // For some reason transfer test works in this test. + it.skip('Basic Test Running Network', async () => { + const loader = new ConfigLoader(); + const target = 'target/tests/bootstrap-test'; + const presetData = loader.loadExistingPresetData(target, false); + const addresses = loader.loadExistingAddresses(target, false); + // Here you can write unit tests against a localhost:3000 network + const configResult = { presetData, addresses }; + await basicTestNetwork(configResult); + await transferTest(configResult); + }); }); diff --git a/test/service/CertificateService.test.ts b/test/service/CertificateService.test.ts index 79d11861a..27e73035a 100644 --- a/test/service/CertificateService.test.ts +++ b/test/service/CertificateService.test.ts @@ -86,7 +86,7 @@ describe('CertificateService', () => { }; const randomSerial = '4C87E5C49034B711E2DA38D116366829DA144B\n'.toLowerCase(); - await service.run(networkType, presetData.symbolServerToolsImage, 'test-node', keys, target, randomSerial); + await service.run(networkType, presetData.symbolServerImage, 'test-node', keys, target, randomSerial); const expectedMetadata: CertificateMetadata = { version: 1, diff --git a/test/service/ReportService.test.ts b/test/service/ReportService.test.ts index f3422b07c..f4a228486 100644 --- a/test/service/ReportService.test.ts +++ b/test/service/ReportService.test.ts @@ -18,6 +18,7 @@ import { expect } from '@oclif/test'; import { existsSync } from 'fs'; import 'mocha'; import { join } from 'path'; +import { CustomPreset } from '../../src/model'; import { BootstrapUtils, ConfigParams, ConfigService, Preset, ReportService } from '../../src/service'; describe('ReportService', () => { @@ -43,12 +44,36 @@ describe('ReportService', () => { `, ).to.be.eq(expectedReport.trim()); }); + + for (const gateway of configResult.presetData.gateways || []) { + const currentRestJsonFile = BootstrapUtils.getTargetGatewayFolder(params.target, true, gateway.name, 'rest.json'); + const currentRestJson = await BootstrapUtils.readTextFile(currentRestJsonFile); + const expectedRestJsonFile = join(expectedReportFolder, `${gateway.name}-rest.json`); + if (!existsSync(expectedRestJsonFile)) { + await BootstrapUtils.writeTextFile(expectedRestJsonFile, currentRestJson); + } + const expectedRestJson = await BootstrapUtils.readTextFile(expectedRestJsonFile); + expect( + currentRestJson.trim(), + `Rest ${currentRestJsonFile} doesn't match + +`, + ).to.be.eq(expectedRestJson.trim()); + } + await Promise.all(promises); }; it('ReportService testnet dual voting report', async () => { const target = 'target/tests/ReportService.testnet.voting.report'; - const customPresetObject = { + const customPresetObject: CustomPreset = { + restDeploymentToolLastUpdatedDate: '2021-05-23', + gateways: [ + { + restDeploymentToolLastUpdatedDate: '2021-05-22', + restDeploymentToolVersion: 'abc', + }, + ], nodes: [ { mainPrivateKey: 'CA82E7ADAF7AB729A5462A1BD5AA78632390634904A64EB1BB22295E2E1A1BDD', @@ -59,7 +84,7 @@ describe('ReportService', () => { }; const params = { ...ConfigService.defaultParams, - reset: false, + upgrade: true, preset: Preset.testnet, customPresetObject: customPresetObject, assembly: 'dual', @@ -72,7 +97,8 @@ describe('ReportService', () => { it('ReportService testnet peer voting report', async () => { const target = 'target/tests/ReportService.testnet.peer.voting.report'; - const customPresetObject = { + const customPresetObject: CustomPreset = { + restDeploymentToolLastUpdatedDate: '2021-05-23', nodes: [ { mainPrivateKey: 'CA82E7ADAF7AB729A5462A1BD5AA78632390634904A64EB1BB22295E2E1A1BDD', @@ -83,7 +109,7 @@ describe('ReportService', () => { }; const params = { ...ConfigService.defaultParams, - reset: false, + upgrade: true, preset: Preset.testnet, customPresetObject: customPresetObject, assembly: 'peer', @@ -96,7 +122,7 @@ describe('ReportService', () => { it('ReportService testnet peer voting non harvesting report', async () => { const target = 'target/tests/ReportService.testnet.peer.non.harvesting.voting.report'; - const customPresetObject = { + const customPresetObject: CustomPreset = { nodes: [ { mainPrivateKey: 'CA82E7ADAF7AB729A5462A1BD5AA78632390634904A64EB1BB22295E2E1A1BDD', @@ -108,7 +134,7 @@ describe('ReportService', () => { }; const params = { ...ConfigService.defaultParams, - reset: false, + upgrade: true, preset: Preset.testnet, customPresetObject: customPresetObject, assembly: 'peer', @@ -121,7 +147,9 @@ describe('ReportService', () => { it('ReportService testnet api', async () => { const target = 'target/tests/ReportService.testnet.api.report'; - const customPresetObject = { + const customPresetObject: CustomPreset = { + restDeploymentToolLastUpdatedDate: '2021-05-23', + restDeploymentToolVersion: 'ABC', nodes: [ { mainPrivateKey: 'CA82E7ADAF7AB729A5462A1BD5AA78632390634904A64EB1BB22295E2E1A1BDD', @@ -132,7 +160,7 @@ describe('ReportService', () => { }; const params = { ...ConfigService.defaultParams, - reset: false, + upgrade: true, preset: Preset.testnet, customPresetObject: customPresetObject, assembly: 'api', @@ -145,7 +173,7 @@ describe('ReportService', () => { it('ReportService mainnet peer', async () => { const target = 'target/tests/ReportService.mainnet.peer.report'; - const customPresetObject = { + const customPresetObject: CustomPreset = { nodes: [ { mainPrivateKey: 'CA82E7ADAF7AB729A5462A1BD5AA78632390634904A64EB1BB22295E2E1A1BDD', @@ -156,7 +184,7 @@ describe('ReportService', () => { }; const params = { ...ConfigService.defaultParams, - reset: false, + upgrade: true, preset: Preset.mainnet, customPresetObject: customPresetObject, assembly: 'peer', @@ -169,7 +197,9 @@ describe('ReportService', () => { it('ReportService mainnet dual', async () => { const target = 'target/tests/ReportService.mainnet.dual.report'; - const customPresetObject = { + const customPresetObject: CustomPreset = { + restDeploymentToolLastUpdatedDate: '2021-05-23', + restDeploymentToolVersion: 'abc', nodes: [ { mainPrivateKey: 'CA82E7ADAF7AB729A5462A1BD5AA78632390634904A64EB1BB22295E2E1A1BDD', @@ -180,7 +210,7 @@ describe('ReportService', () => { }; const params = { ...ConfigService.defaultParams, - reset: false, + upgrade: true, preset: Preset.mainnet, customPresetObject: customPresetObject, assembly: 'dual', @@ -193,7 +223,9 @@ describe('ReportService', () => { it('ReportService mainnet dual voting', async () => { const target = 'target/tests/ReportService.mainnet.dual.voting.report'; - const customPresetObject = { + const customPresetObject: CustomPreset = { + restDeploymentToolLastUpdatedDate: '2021-05-23', + restDeploymentToolVersion: 'abc', nodes: [ { mainPrivateKey: 'CA82E7ADAF7AB729A5462A1BD5AA78632390634904A64EB1BB22295E2E1A1BDD', @@ -204,7 +236,7 @@ describe('ReportService', () => { }; const params = { ...ConfigService.defaultParams, - reset: false, + upgrade: true, preset: Preset.mainnet, customPresetObject: customPresetObject, assembly: 'dual', @@ -217,7 +249,9 @@ describe('ReportService', () => { it('ReportService bootstrap report', async () => { const target = 'target/tests/ReportService.bootstrap.voting.report'; - const customPresetObject = { + const customPresetObject: CustomPreset = { + restDeploymentToolLastUpdatedDate: '2021-05-23', + restDeploymentToolVersion: 'abc', nemesisGenerationHashSeed: '6AF8E35BBC7AC341E7931B39E2C9A591EDBE9F9111996053E6771D48E9C53B31', nemesis: { nemesisSignerPrivateKey: 'AA0863BDB0C2C275EE8CADECC8FAF01CAF632A2D6E1DE9ECB58917F65C89B204', @@ -237,7 +271,7 @@ describe('ReportService', () => { }; const params = { ...ConfigService.defaultParams, - reset: false, + upgrade: true, preset: Preset.bootstrap, customPresetObject: customPresetObject, target: target, diff --git a/test/service/RewardProgramService.test.ts b/test/service/RewardProgramService.test.ts index 60abccccb..8799e91ac 100644 --- a/test/service/RewardProgramService.test.ts +++ b/test/service/RewardProgramService.test.ts @@ -31,7 +31,7 @@ describe('RewardProgramService', () => { RewardProgramService.getRewardProgram('NA'); expect(1).eq(0); } catch (e) { - expect(e.message).eq('NA is not a valid Reward program. Please use one of EarlyAdoption, Ecosystem, SuperNode'); + expect(e.message).eq('NA is not a valid Reward program. Please use one of EarlyAdoption, Ecosystem, SuperNode, MonitorOnly'); } });