NEM Symbol(nem2) インストール
2021/11/10 追記
今ではsymbol-bootstrapも進化してもっと簡単になっています。
https://github.com/symbol/symbol-bootstrap#symbol-bootstrap を参考に、
CPUがCPU Intel AVX2に対応(Haswell以降) に対応していること。Node 12.0.0+, Docker 18.3.0+, Docker Compose 1.25.0+ が要件となっているようです。
ウィザードを使ってやるとやりやすい模様。$ symbol-bootstrap wizard
↓2020/10月に書いたもの(古い)
暗号資産仮想通貨クリプトよろしくNEM2のtestnetが2020/09の終わりごろより開始されました。
symbol, catapult, nem2、よくわからん単語がいろいろありますが、とりあえずよしなにセットアップできるブートストラップを利用して構築していきたいと思います。
https://github.com/nemtech/symbol-bootstrap
tl;dr
symbol-bootstrap を利用してノードの構築を行っています。
環境
CPU Intel AVX2に対応(Haswell以降) fedora30(古い), node10以降, docker, docker-composeをあらかじめ入れてあります。
?
AVX2の確認をしてください。出てこなければsymbol-bootstrapを使うのは無理です。(PC買うしか?
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ cat /proc/cpuinfo | grep -E avx2
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts md_clear flush_l1d
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts md_clear flush_l1d
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts md_clear flush_l1d
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts md_clear flush_l1d
そのほかの環境は以下の通り
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ cat /etc/redhat-release
Fedora release 30 (Thirty)
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ uname -a
Linux deroris.net 5.6.13-100.fc30.x86_64 #1 SMP Fri May 15 00:36:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ sudo systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
~~snip;
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ docker --version
Docker version 19.03.12, build 48a66213fe
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ docker-compose --version
docker-compose version 1.27.4, build 40524192
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ node --version
v13.13.0
$ sudo gpasswd -a ${USER} docker
をして自分のアカウントでもdockerをいじれるようにしておいてあります。
nodeはnodenvです。
symbol-bootstrapをインストール
こちらより手順を確認して入れる。 https://www.npmjs.com/package/symbol-bootstrap
このためにnodeが必要であった。
global汚染を気にした-gは付けない。0.1.1が入った。
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ npm i symbol-bootstrap
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142npm WARN deprecated [email protected]: This package is deprecated, please check/use @js-joda/core instead
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN saveError ENOENT: no such file or directory, open '/home/murata/workspace/symbol-bootstrap/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/murata/workspace/symbol-bootstrap/package.json'
npm WARN symbol-bootstrap No description
npm WARN symbol-bootstrap No repository field.
npm WARN symbol-bootstrap No README data
npm WARN symbol-bootstrap No license field.
+ [email protected]
added 230 packages from 220 contributors and audited 230 packages in 22.121s
11 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ ll
total 80
drwxrwxr-x 205 murata murata 8192 Oct 6 16:15 node_modules
-rw-rw-r-- 1 murata murata 68034 Oct 6 16:15 package-lock.json
githubはこちら https://github.com/nemtech/symbol-bootstrap
インストールが確認できた。
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ npx --no-install symbol-bootstrap --version
symbol-bootstrap/0.1.1 linux-x64 node-v13.13.0
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ npx --no-install symbol-bootstrap --help
Symbol tool that allows you creating, configuring and running Symbol's networks
VERSION
symbol-bootstrap/0.1.1 linux-x64 node-v13.13.0
USAGE
$ symbol-bootstrap [COMMAND]
COMMANDS
clean It removes the target folder (It may not work if you need root privileges!!!)
compose It generates the `docker-compose.yml` file from the configured network.
config Command used to set up the configuration files and the nemesis block for the current network
help display help for symbol-bootstrap
link It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.
report it generates reStructuredText (.rst) reports describing the configuration of each node.
run It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.
start Single command that aggregates config, compose and run in one line!
stop It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.
起動してみる
設定ファイル作成
プリセットで設定させる。-p
はpresetのこと。
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ npx symbol-bootstrap config -p bootstrap
_ _ _ _ _
___ _ _ _ __ ___ | |__ ___ | | | |__ ___ ___ | |_ ___ | |_ _ __ __ _ _ __
/ __| | | | | | '_ ` _ \ | '_ \ / _ \ | | _____ | '_ \ / _ \ / _ \ | __| / __| | __| | '__| / _` | | '_ \
\__ \ | |_| | | | | | | | | |_) | | (_) | | | |_____| | |_) | | (_) | | (_) | | |_ \__ \ | |_ | | | (_| | | |_) |
|___/ \__, | |_| |_| |_| |_.__/ \___/ |_| |_.__/ \___/ \___/ \__| |___/ \__| |_| \__,_| | .__/
|___/ |_|
2020-10-06T09:25:21.541Z info [SYSTEM_LOG] Generating config from preset bootstrap
2020-10-06T09:25:21.609Z info [SYSTEM_LOG] User for docker resolved: 1000:1000
2020-10-06T09:25:21.610Z info [SYSTEM_LOG] Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 bash createCertificate.sh
2020-10-06T09:25:21.614Z info [SYSTEM_LOG] User for docker resolved: 1000:1000
2020-10-06T09:25:21.614Z info [SYSTEM_LOG] Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 bash createCertificate.sh
2020-10-06T09:25:21.618Z info [SYSTEM_LOG] User for docker resolved: 1000:1000
2020-10-06T09:25:21.619Z info [SYSTEM_LOG] Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 bash createCertificate.sh
2020-10-06T09:26:14.290Z info [SYSTEM_LOG] Certificate for node peer-node-0 created
2020-10-06T09:26:14.356Z info [SYSTEM_LOG] Certificate for node peer-node-1 created
2020-10-06T09:26:14.446Z info [SYSTEM_LOG] Certificate for node api-node-0 created
2020-10-06T09:26:14.625Z info [SYSTEM_LOG] Non-voting node api-node-0.
2020-10-06T09:26:14.626Z info [SYSTEM_LOG] Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 /usr/catapult/bin/catapult.tools.votingkey --secret=F636811EA1D3BA0AD40AC0F452F366ED5B5511EE4907D48453F895EE10D9ECE9 --dilution=128 --startEpoch=1 --endEpoch=26280 --output=/votingKeys/private_key_tree1.dat
2020-10-06T09:26:14.630Z info [SYSTEM_LOG] Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 /usr/catapult/bin/catapult.tools.votingkey --secret=F229651CB02CA78B4CBAA29CD4D53397CCDA1AEDC574B97B84C894CC64ED89B9 --dilution=128 --startEpoch=1 --endEpoch=26280 --output=/votingKeys/private_key_tree1.dat
2020-10-06T09:26:15.649Z info [SYSTEM_LOG] Voting key executed for node peer-node-1!
2020-10-06T09:26:15.717Z info [SYSTEM_LOG] Voting key executed for node peer-node-0!
2020-10-06T09:26:15.809Z info [SYSTEM_LOG] Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 /usr/catapult/bin/catapult.tools.nemgen --resources=/userconfig --nemesisProperties=/nemesis/block-properties-file.properties
2020-10-06T09:26:17.189Z info [SYSTEM_LOG] Nemgen executed!!!!
2020-10-06T09:26:17.204Z info [SYSTEM_LOG] Configuration generated.
targetディレクトリができてconfigファイルができた。targetディレクトリを消せば初期化されるそうだ。
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ tree -d target/config/
target/config/
├── api-node-0
│ └── resources
│ └── cert
│ └── new_certs
├── generated-addresses
├── nemesis
│ └── transactions
├── peer-node-0
│ └── resources
│ └── cert
│ └── new_certs
├── peer-node-1
│ └── resources
│ └── cert
│ └── new_certs
└── rest-gateway
16 directories
docker-compose.ymlファイルを作らせます。
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ npx symbol-bootstrap compose
_ _ _ _ _
___ _ _ _ __ ___ | |__ ___ | | | |__ ___ ___ | |_ ___ | |_ _ __ __ _ _ __
/ __| | | | | | '_ ` _ \ | '_ \ / _ \ | | _____ | '_ \ / _ \ / _ \ | __| / __| | __| | '__| / _` | | '_ \
\__ \ | |_| | | | | | | | | |_) | | (_) | | | |_____| | |_) | | (_) | | (_) | | |_ \__ \ | |_ | | | (_| | | |_) |
|___/ \__, | |_| |_| |_| |_.__/ \___/ |_| |_.__/ \___/ \___/ \__| |___/ \__| |_| \__,_| | .__/
|___/ |_|
2020-10-07T03:13:31.252Z info [SYSTEM_LOG] User for docker resolved: 1000:1000
2020-10-07T03:13:31.253Z info [SYSTEM_LOG] creating docker-compose.yml from last used profile.
2020-10-07T03:13:31.258Z info [SYSTEM_LOG] docker-compose.yml file created /home/murata/workspace/symbol-bootstrap/target/docker/docker-compose.yml
起動させます。↑で作ったdocker-compose.ymlを起動しているだけっぽいですね。
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ npx symbol-bootstrap run
_ _ _ _ _
___ _ _ _ __ ___ | |__ ___ | | | |__ ___ ___ | |_ ___ | |_ _ __ __ _ _ __
/ __| | | | | | '_ ` _ \ | '_ \ / _ \ | | _____ | '_ \ / _ \ / _ \ | __| / __| | __| | '__| / _` | | '_ \ \__ \ | |_| | | | | | | | | |_) | | (_) | | | |_____| | |_) | | (_) | | (_) | | |_ \__ \ | |_ | | | (_| | | |_) |
|___/ \__, | |_| |_| |_| |_.__/ \___/ |_| |_.__/ \___/ \___/ \__| |___/ \__| |_| \__,_| | .__/
|___/ |_|
2020-10-07T03:26:32.896Z info [SYSTEM_LOG] running: docker-compose -f target/docker/docker-compose.yml up --remove-orphans
Starting docker_peer-node-0_1 ... done
Starting docker_api-node-broker-0_1 ...
Starting docker_db_1 ...
Starting docker_db_1 ... done
Starting docker_api-node-broker-0_1 ... done
Starting docker_peer-node-1_1 ... done
Starting docker_db-init_1 ...
Starting docker_db-init_1 ... done
Starting docker_rest-gateway_1 ...
Starting docker_rest-gateway_1 ... done
Attaching to docker_peer-node-0_1, docker_db_1, docker_peer-node-1_1, docker_api-node-broker-0_1, docker_db-init_1, docker_api-node-0_1, docker_rest-gateway_1
api-node-0_1 | RUNNING runServerRecover.sh api-node-0
api-node-broker-0_1 | RUNNING runServerRecover.sh api-node-broker-0
db_1 | 2020-10-07T03:26:34.257+0000 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols
'none'
~~snip;
だらだら~っとdockerのログたちが流れます。エラーがあっても見逃すので気をつけましょう。
しばらくしたら3000番でapiが空いているので、稼働しているか確認します。
╭─murata@deroris ~
╰─$ curl localhost:3000/node/info | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 281 100 281 0 0 46833 0 --:--:-- --:--:-- --:--:-- 46833
{
"version": 0,
"publicKey": "06B0A437CD02A1B2B99A5DCFE1673CEFE47A26499F295E2538EF285A7AFD699A",
"networkGenerationHashSeed": "0644A28DFAB8F643D89AE575CDA9577301680EA83D8E3F47D7E9BD383CAD8DDF",
"roles": 2,
"port": 7900,
"networkIdentifier": 152,
"host": "api-node-0",
"friendlyName": "api-node-0"
}
chainのheightも伸びているので問題なさそうですね。
少し待って数回たたけば変わってくるはずです。
╭─murata@deroris ~
╰─$ curl localhost:3000/chain/info | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 217 100 217 0 0 72333 0 --:--:-- --:--:-- --:--:-- 72333
{
"scoreHigh": "0",
"scoreLow": "1524346200878373",
"height": "29",
"latestFinalizedBlock": {
"finalizationEpoch": 1,
"finalizationPoint": 1,
"height": "1",
"hash": "B9971EBDEA848D6ABE1DAEE3589382A94883D2D1FAC2E41CAA689A12702685AC"
}
}
docker-compose.yml見てみる。
symbol-bootstrap composeで生成されたファイルを確認してみます。
dbにはmongo, peer-nodeが2本、api-nodeとapi-node-brokerが1本ずつ。rest-gatewayもいますね。
symbolplatform/symbol-serverあたりが、AVX2に対応されたPCでコンパイルされているのでしょうか。もしくはAVX2は必須だったり?
version: '3'
networks:
default:
ipam:
config:
- subnet: 172.20.0.0/24
services:
db:
image: 'mongo:4.2.6-bionic'
user: '1000:1000'
command: bash -c "mongod --dbpath=/dbdata --bind_ip=db"
stop_signal: SIGINT
ports:
- '27017:27017'
volumes:
- '../data/mongo:/dbdata:rw'
db-init:
image: 'mongo:4.2.6-bionic'
user: '1000:1000'
command: bash -c "/bin/bash /userconfig/mongors.sh && touch /state/mongo-is-setup"
volumes:
- './mongo:/userconfig/:ro'
- '../data/mongo:/dbdata:rw'
- '../state:/state'
depends_on:
- db
peer-node-0:
image: 'symbolplatform/symbol-server:gcc-0.10.0.3'
user: '1000:1000'
command: bash -c "/bin/bash /userconfig/runServerRecover.sh peer-node-0 && /bin/bash /userconfig/startServer.sh peer-node-0"
stop_signal: SIGINT
depends_on: []
restart: 'on-failure:2'
ports: []
volumes:
- './dockerfiles/catapult/userconfig/:/userconfig'
- './bin/bash:/bin-mount'
- '../config/peer-node-0/resources/:/userconfig/resources/'
- '../data/peer-node-0:/data:rw'
- '../data/nemesis-data:/nemesis-data:rw'
- '../state:/state'
hostname: peer-node-0
networks:
default:
aliases:
- peer-node-0
peer-node-1:
image: 'symbolplatform/symbol-server:gcc-0.10.0.3'
user: '1000:1000'
command: bash -c "/bin/bash /userconfig/runServerRecover.sh peer-node-1 && /bin/bash /userconfig/startServer.sh peer-node-1"
stop_signal: SIGINT
depends_on: []
restart: 'on-failure:2'
ports: []
volumes:
- './dockerfiles/catapult/userconfig/:/userconfig'
- './bin/bash:/bin-mount'
- '../config/peer-node-1/resources/:/userconfig/resources/'
- '../data/peer-node-1:/data:rw'
- '../data/nemesis-data:/nemesis-data:rw'
- '../state:/state'
hostname: peer-node-1
networks:
default:
aliases:
- peer-node-1
api-node-0:
image: 'symbolplatform/symbol-server:gcc-0.10.0.3'
user: '1000:1000'
command: bash -c "/bin/bash /userconfig/runServerRecover.sh api-node-0 && /bin/bash /userconfig/startServer.sh api-node-0"
stop_signal: SIGINT
depends_on:
- db-init
- api-node-broker-0
restart: 'on-failure:2'
ports:
- '7900:7900'
volumes:
- './dockerfiles/catapult/userconfig/:/userconfig'
- './bin/bash:/bin-mount'
- '../config/api-node-0/resources/:/userconfig/resources/'
- '../data/api-node-0:/data:rw'
- '../data/nemesis-data:/nemesis-data:rw'
- '../state:/state'
hostname: api-node-0
networks:
default:
aliases:
- api-node-0
api-node-broker-0:
image: 'symbolplatform/symbol-server:gcc-0.10.0.3'
user: '1000:1000'
command: bash -c "/bin/bash /userconfig/runServerRecover.sh api-node-broker-0 && /bin/bash /userconfig/startBroker.sh api-node-broker-0"
stop_signal: SIGINT
ports:
- '7902:7902'
restart: 'on-failure:2'
volumes:
- './dockerfiles/catapult/userconfig/:/userconfig'
- './bin/bash:/bin-mount'
- '../config/api-node-0/resources/:/userconfig/resources/'
- '../data/api-node-0:/data:rw'
- '../state:/state'
rest-gateway:
image: 'symbolplatform/symbol-rest:2.1.0'
user: '1000:1000'
command: ash -c "npm start /userconfig/rest.json"
stop_signal: SIGINT
ports:
- '3000:3000'
volumes:
- './bin/ash:/bin-mount'
- '../config/rest-gateway/:/userconfig/'
- '../state:/state'
- '../data/api-node-0/logs:/logs:rw'
- '../config/api-node-0/resources/:/usr/local/share/symbol/api-node-config/'
depends_on:
- db-init
networks:
default:
ipv4_address: 172.20.0.25
バックエンドのDBにmongoを利用しているようですので、見てみましょう。
╭─murata@deroris ~/workspace/symbol-bootstrap
╰─$ docker exec -it 3a6e9434089f mongo --host db
MongoDB shell version v4.2.6
connecting to: mongodb://db:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("3b43f701-1285-4952-aecd-ad8d20787283") }
MongoDB server version: 4.2.6
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
2020-10-07T03:41:50.682+0000 I STORAGE [main] In File::open(), ::open for '//.mongorc.js' failed with Permission denied
Server has startup warnings:
2020-10-07T03:26:34.264+0000 I STORAGE [initandlisten]
2020-10-07T03:26:34.264+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2020-10-07T03:26:34.264+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2020-10-07T03:26:35.273+0000 I CONTROL [initandlisten]
2020-10-07T03:26:35.273+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2020-10-07T03:26:35.273+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2020-10-07T03:26:35.273+0000 I CONTROL [initandlisten]
---
Enable MongoDB's free cloud-based monitoring service, which will then receive and display
metrics about your deployment (disk utilization, CPU, operation statistics, etc).
The monitoring data will be available on a MongoDB website with a unique URL accessible to you
and anyone you share the URL with. MongoDB may use this information to make product
improvements and to suggest MongoDB products and deployment options to you.
To enable free monitoring, run the following command: db.enableFreeMonitoring()
To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
---
> show dbs
admin 0.000GB
catapult 0.001GB
config 0.000GB
local 0.000GB
> use catapult
switched to db catapult
> show tables;
accountRestrictions
accounts
addressResolutionStatements
blocks
chainStatistic
finalizedBlocks
hashLocks
metadata
mosaicResolutionStatements
mosaicRestrictions
mosaics
multisigs
namespaces
partialTransactions
secretLocks
system.profile
transactionStatements
transactionStatuses
transactions
unconfirmedTransactions
> db.blocks.find()[1]
{
"_id" : ObjectId("5f7d3454df7bc516eb58a912"),
"meta" : {
"hash" : BinData(0,"2cVdlMlcyiYBRLzzpclZ2ANLWfL3vce1V8hi7CnIvow="),
"generationHash" : BinData(0,"rkeUFpdmC4fZrCYxObkyeQSrlj9k1B6QgAox0vMUfYA="),
"totalFee" : NumberLong(0),
"totalTransactionsCount" : 0,
"stateHashSubCacheMerkleRoots" : [
BinData(0,"1ELGYI3PPqoDY5knYbjTwvxwXJpYEO1lDrGSKoUbufE="),
BinData(0,"WItgg44O96iY48nblueKqhaOX2wfqzM40FZKNK5JxqY="),
BinData(0,"M+mWl+zE6xSshJabGbaI85fMqF7xeSEjuZrO5Q1G0NU="),
BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="),
BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="),
BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="),
BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="),
BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="),
BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=")
],
"transactionsCount" : 0,
"transactionMerkleTree" : [
BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=")
],
"statementsCount" : 1,
"statementMerkleTree" : [
BinData(0,"Z0ufEOHNEBVnqCeVSHaS41LYu03BEbtKbdkh8nZsJLQ=")
]
},
"block" : {
"size" : 376,
"signature" : BinData(0,"GyLI2H2NlsuJNYlElOclFMW9uPskPwBdqGPbecV5hC36jrNOeW4ODAnu4VQYGWMVty1evLERNNk/DLun9skfBw=="),
"signerPublicKey" : BinData(0,"qaYm+8VD0c2vPQYO8Xr6DwqdRv9FmwzOquUwKFnO3WU="),
"version" : 1,
"network" : 152,
"type" : 33091,
"height" : NumberLong(2),
"timestamp" : NumberLong("28610513999"),
"difficulty" : NumberLong("100000000000000"),
"proofGamma" : BinData(0,"vwEBa7kdQ4F2Hi33BsRs5uE+Kb8nzyy8gupK3nK0p84="),
"proofVerificationHash" : BinData(0,"sPnBVd/WfkmwWBLE3WjnTg=="),
"proofScalar" : BinData(0,"oo/ECXdZlMAX0oBwD4XVNPYsIjHBnPWju/qR/TlkwQs="),
"previousBlockHash" : BinData(0,"uZceveqEjWq+Ha7jWJOCqUiD0tH6wuQcqmiaEnAmhaw="),
"transactionsHash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"receiptsHash" : BinData(0,"Z0ufEOHNEBVnqCeVSHaS41LYu03BEbtKbdkh8nZsJLQ="),
"stateHash" : BinData(0,"kX0vzAJKSIvvLLp81apc6p9Z+kBxllLe7SjcK+Fhajg="),
"beneficiaryAddress" : BinData(0,"mP/mqbyaghJXKhjboProak1ZHZEZCU/V"),
"feeMultiplier" : 0
}
}
入っていますね。うまいことsymbol-serverが処理してくれるはずなので直接見ることはなさそうですね。
まとめ
Dockerであればなんとか稼働はさせられそう。symbol-bootstrapを利用すれば、鍵の生成やノードの設定などを自動的に行ってくれるのでとりあえずAPI試したいって人には最適そうです。
起動しなかったら頑張れですが。
Author And Source
この問題について(NEM Symbol(nem2) インストール), 我々は、より多くの情報をここで見つけました https://qiita.com/murata-tomohide/items/ac30b6bfad274a419274著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .