EOS Docker Quickstart 외에도 Account를 만들 때까지 시도했습니다.
전제
eosio/eos-dev
는 이하의 버젼이다 "Id": "sha256:8926b83923b11e8ea6e6be1c8f96f941fcd7731238273b2bed692b407e37fd3c",
"RepoTags": [
"eosio/eos-dev:latest"
],
"RepoDigests": [
"eosio/eos-dev@sha256:150cab925ca326293a82518bcd7d1a3cbbd5720f7e12f4545c6a616819083ab2"
],
"Parent": "",
"Comment": "",
"Created": "2018-09-12T00:24:34.401119021Z",
"Container": "b631fb0509d24f1f2a4e799681774aa12760718a9075f82d6b10ff24e62222ee",
Docker Quickstart (거의 공식 문서의 만마)
Step 1. Docker Image 얻기
$ docker pull eosio/eos-dev
Step 2. 네트워크 만들기
$ docker network create eosdev
Step 3. 컨테이너 시작
$ docker run --name nodeos -d -p 8888:8888 --network eosdev \
-v /tmp/eosio/work:/work -v /tmp/eosio/data:/mnt/dev/data \
-v /tmp/eosio/config:/mnt/dev/config eosio/eos-dev \
/bin/bash -c "nodeos -e -p eosio --plugin eosio::producer_plugin \
--plugin eosio::history_plugin --plugin eosio::chain_api_plugin \
--plugin eosio::history_api_plugin \
--plugin eosio::http_plugin -d /mnt/dev/data \
--config-dir /mnt/dev/config \
--http-server-address=0.0.0.0:8888 \
--access-control-allow-origin=* --contracts-console --http-validate-host=false"
$ docker run -d --name keosd --network=eosdev \
-i eosio/eos-dev /bin/bash -c "keosd --http-server-address=0.0.0.0:9876"
Step 4. 일단 동작 확인
$ docker logs --tail 10 nodeos
# 上記コマンドを実行して、下記のようにブロックが作成されているログができていればOK
2018-09-15T07:34:08.008 thread-0 producer_plugin.cpp:1302 produce_block ] Produced block 000019e303284a82... #6627 @ 2018-09-15T07:34:08.000 signed by eosio [trxs: 0, lib: 6626, confirmed: 0]
2018-09-15T07:34:08.503 thread-0 producer_plugin.cpp:1302 produce_block ] Produced block 000019e4200a713d... #6628 @ 2018-09-15T07:34:08.500 signed by eosio [trxs: 0, lib: 6627, confirmed: 0]
2018-09-15T07:34:09.006 thread-0 producer_plugin.cpp:1302 produce_block ] Produced block 000019e5ac15b894... #6629 @ 2018-09-15T07:34:09.000 signed by eosio [trxs: 0, lib: 6628, confirmed: 0]
2018-09-15T07:34:09.504 thread-0 producer_plugin.cpp:1302 produce_block ] Produced block 000019e6e0f7f8a8... #6630 @ 2018-09-15T07:34:09.500 signed by eosio [trxs: 0, lib: 6629, confirmed: 0]
2018-09-15T07:34:10.006 thread-0 producer_plugin.cpp:1302 produce_block ] Produced block 000019e7d0021ecf... #6631 @ 2018-09-15T07:34:10.000 signed by eosio [trxs: 0, lib: 6630, confirmed: 0]
2018-09-15T07:34:10.504 thread-0 producer_plugin.cpp:1302 produce_block ] Produced block 000019e875aeae34... #6632 @ 2018-09-15T07:34:10.500 signed by eosio [trxs: 0, lib: 6631, confirmed: 0]
2018-09-15T07:34:11.003 thread-0 producer_plugin.cpp:1302 produce_block ] Produced block 000019e9e128983f... #6633 @ 2018-09-15T07:34:11.000 signed by eosio [trxs: 0, lib: 6632, confirmed: 0]
2018-09-15T07:34:11.503 thread-0 producer_plugin.cpp:1302 produce_block ] Produced block 000019ea4f2468a0... #6634 @ 2018-09-15T07:34:11.500 signed by eosio [trxs: 0, lib: 6633, confirmed: 0]
2018-09-15T07:34:12.004 thread-0 producer_plugin.cpp:1302 produce_block ] Produced block 000019eb2df923cd... #6635 @ 2018-09-15T07:34:12.000 signed by eosio [trxs: 0, lib: 6634, confirmed: 0]
2018-09-15T07:34:12.501 thread-0 producer_plugin.cpp:1302 produce_block ] Produced block 000019ece62046d4... #6636 @ 2018-09-15T07:34:12.500 signed by eosio [trxs: 0, lib: 6635, confirmed: 0]
$ docker exec -it keosd bash
root@1883574ee3c4:/# cleos --wallet-url http://127.0.0.1:9876 wallet list keys
여기서 갑자기 아래 그림과 같이 빨간색 오류 메시지가 나와 버립니다만, 그 내용대로, 지금 아직 지갑을 작성하지 않았을 뿐이므로, 무시하고 다음에 진행해 괜찮습니다~
exit
에서 컨테이너에서 나가기$ curl http://localhost:8888/v1/chain/get_info
{"server_version":"08819aae","chain_id":"cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f","head_block_num":8161,"last_irreversible_block_num":8160,"last_irreversible_block_id":"00001fe0eb0e27e6f6417493e7411ef66afc4b901601c77b2169ecec7a6fffe0","head_block_id":"00001fe1d97b445fdcdfdbb9fbb5b4c3f483a92e2fd19181ecbdd460e8eae535","head_block_time":"2018-09-15T07:47:35.500","head_block_producer":"eosio","virtual_block_cpu_limit":200000000,"virtual_block_net_limit":1048576000,"block_cpu_limit":199900,"block_net_limit":1048576,"server_version_string":"v1.2.5"}
cleos 명령의 별칭 작성
keosd
컨테이너의 IP 주소를 확인합니다.$ docker network inspect eosdev
[
{
"Name": "eosdev",
"Id": "f65504e7e905aaacf8133788b71caf92caac0f0f2b7562d62b492a98d92fb384",
"Created": "2018-09-07T07:06:37.687702865Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.19.0.0/16",
"Gateway": "172.19.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"1883574ee3c437dbd50bb95a00ce4e98d37abc352655165d172c3dce9a1133fe": {
"Name": "keosd",
"EndpointID": "63506bca063dcc0fa21bb2b65c4a46ea84ecf29e88dd7eb9338bfb83210603dd",
"MacAddress": "02:42:ac:13:00:03",
"IPv4Address": "172.19.0.3/16",
"IPv6Address": ""
},
"f0050f87cabd114dcaa4036a9a7f3cd508f185bf75ce2d6e81491d7bc3decf20": {
"Name": "nodeos",
"EndpointID": "adc77b77c339625538559bb3fc3ebef4480edf5f464cf0f9be6111fc595a9b1c",
"MacAddress": "02:42:ac:13:00:02",
"IPv4Address": "172.19.0.2/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
$
--wallet-url
의 매개 변수로 설정하여 명령의 별칭을 만듭니다 $ alias cleos='docker exec -it nodeos /opt/eosio/bin/cleos --url http://127.0.0.1:8888 --wallet-url http://172.19.0.3:9876'
# cleos wallet list を実行して、設定を確認する
$ cleos wallet list
Wallets:
[]
$
계정 만들기
$ cleos wallet create --to-console
# 出力されたパスワードは必ずメモしておく
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5KWT9p86GuWMzwpCV4UDuB7Y9Agi5w14BtfcN3in72N93DQ8cSw"
$
여기에서 작성된 것은
default
라는 지갑입니다. 이름을 지정하여 다른 월렛을 만들 수 있지만 이번에는 할애$ cleos create key --to-console
Private key: 5J43P9JQkNxa58uCXhtxQRQo6iFZW4jHxLRi7LfjrxEL9qNpTAt
Public key: EOS64PRrt3iQb3AbyTEBUmQxChub2eyoSKs1UQVJcvokKkTyySwpW
$
$ cleos wallet import --private-key 5J43P9JQkNxa58uCXhtxQRQo6iFZW4jHxLRi7LfjrxEL9qNpTAt
imported private key for: EOS64PRrt3iQb3AbyTEBUmQxChub2eyoSKs1UQVJcvokKkTyySwpW
$
# https://github.com/EOSIO/eos/issues/4154#issuecomment-397820824
# docker の場合、 `eosio` アカウントのキーペアは下記になっている
# eosio public key: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
# eosio private key: 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
$ cleos wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
imported private key for: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
$
# `cleos create account eosio` の部分は固定値
# `newaccount` は新しいアカウント名
# 最後のパラメータは、上のステップで作成したキーペアの中のパブリックキー
$ cleos create account eosio newaccount EOS64PRrt3iQb3AbyTEBUmQxChub2eyoSKs1UQVJcvokKkTyySwpW
executed transaction: a369f27db7737df0491d4df6f39ceb11b2ff8d681d3eece0014cadc361990de2 200 bytes 381 us
# eosio <= eosio::newaccount {"creator":"eosio","name":"newaccount","owner":{"threshold":1,"keys":[{"key":"EOS64PRrt3iQb3AbyTEBUm...
warning: transaction executed locally, but may not be confirmed by the network yet ]
$
수고하셨습니다! 이제 계정을 만들 수 있었습니다!
요약
eosio
계정에 대해 명령을 실행하므로 eosio
계정 키 쌍 정보도 필요합니다.Error 3090003: provided keys, permissions, and delays do not satisfy declared authorizations
오류가 발생합니다 참고 링크
Reference
이 문제에 관하여(EOS Docker Quickstart 외에도 Account를 만들 때까지 시도했습니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/blueplanet/items/62669b69377a031f5271텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)