Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yoshihiro503/dd69ea95e57e473c754503d22bae366c to your computer and use it in GitHub Desktop.
Save yoshihiro503/dd69ea95e57e473c754503d22bae366c to your computer and use it in GitHub Desktop.

環境

使用マシン

  • OS: Ubuntu 18.04
  • opam : 2.0.0

使用ディレクトリ

  • ~/tezos-mainnet/ : main1 のコードベース
  • ~/tezos/ : main2 開始のためのコードベース
  • /sandisk/ : 内蔵SSD 1.8 TB
  • /sandisk/tezos/tezos-mainnet/ : main1 のストレージ
  • /sandisk/tezos/tezos-plebeia-node/ : main2そしてplebeiaノード用のストレージ

main1 nodeを動かす

もらった300GBほどのデータを使って main を動かす。

tezos mainnet のビルド

plebeia開発時のtezos a67ca32c を使う。

git clone [email protected]:tezos/tezos.git tezos-mainnet
cd tezos-mainnet/
git checkout a67ca32c
opam update
make build-deps
eval $(opam env)
make

もらったデータの確認

~/tezos-mainnet$ ls -l /sandisk/tezos/tezos-mainnet
drwxrwxr-x 2 mube mube   4096  1月 20 13:59 context
drwxrwxr-x 4 mube mube   4096  1月 20 14:49 protocol
drwxrwxr-x 2 mube mube   4096  1月 20 14:23 store

動作

cat /sandisk/tezos/tezos-mainnet/version.json
{ "version": "0.0.3" }
./tezos-node identity generate --data-dir /sandisk/tezos/tezos-mainnet/
./tezos-node run --data-dir /sandisk/tezos/tezos-mainnet/ --rpc-addr 127.0.0.1

確認

:~/tezos-mainnet$ ./tezos-client bootstrapped
Disclaimer:
  The  Tezos  network  is  a  new  blockchain technology.
  Users are  solely responsible  for any risks associated
  with usage of the Tezos network.  Users should do their
  own  research to determine  if Tezos is the appropriate
  platform for their needs and should apply judgement and
  care in their network interactions.
Current head: BMQKM3jt3VVw (timestamp: 2020-01-20T06:27:52-00:00, validation: 2020-01-20T06:28:55-00:00)
Bootstrapped.

main2 を開始

main2 はまずは mainnetをprivate-modeで空っぽから動かして main1 と正常にsyncできるか確認する。 最新の mainnet mainnet-2020-january を使う。

cd tezos/
git fetch
git checkout mainnet
git merge --ff
make build-deps
eval $(opam env)
make
:~/tezos$ mkdir /sandisk/tezos/tezos-plebeia-node
:~/tezos$ ./tezos-node identity generate --data-dir /sandisk/tezos/tezos-plebeia-node/
:~/tezos$ ./tezos-node run --data-dir /sandisk/tezos/tezos-plebeia-node/  --rpc-addr localhost:18732 --private-mode --no-bootstrap-peers --bootstrap-threshold=1 --connections 1 --peer localhost --net-addr localhost:19732

main1 にmain2の信頼を与える

:~/tezos$ ./tezos-admin-client --port 18732 connect address 127.0.0.1:9732
Connection to 127.0.0.1:9732 established.

確認

:~/tezos$ ./tezos-client --port 18732 bootstrapped
@yoshihiro503
Copy link
Author

plivate modeじゃないけど改めて plebeia tezos 動かすことがあった

mube@hilbert tezos % git clone -b plebeia-v7.2 [email protected]:dailambda/tezos.git
mube@hilbert tezos % cd tezos/
mube@hilbert tezos % git submodule update --init --recursive
mube@hilbert tezos % make build-deps
[tezos] Initialised

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><>  🐫 
[default] no changes from https://opam.ocaml.org

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
[ocaml-base-compiler.4.09.1] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed ocaml-base-compiler.4.09.1
∗ installed ocaml-config.1
∗ installed ocaml.4.09.1
Done.
The following actions will be performed:
  ∗ install opam-depext 1.1.3

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
[opam-depext.1.1.3] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
∗ installed opam-depext.1.1.3
Done.
# Detecting depexts using vars: arch=x86_64, os=macos, os-distribution=homebrew, os-family=homebrew
# The following system packages are needed:
gmp
hidapi
libev
pkg-config
# All required OS packages found.
The following actions will be performed:
  ∗ install conf-gmp                1
  ∗ install mirage-no-xen           1
  ∗ install conf-m4                 1
  ∗ install seq                     base
  ∗ install cmdliner                1.0.4
  ∗ install dune                    2.5.1
  ∗ install conf-pkg-config         1.1
  ∗ install jbuilder                1.0+beta20.2
  ∗ install mirage-no-solo5         1
  ∗ install conf-perl               1
  ∗ install ocamlbuild              0.14.0
  ∗ install afl-persistent          1.3
  ∗ install conf-libev              4-11
  ∗ install conf-gmp-powm-sec       1
  ∗ install ocamlfind               1.8.1
  ∗ install stdlib-shims            0.1.0
  ∗ install sexplib0                v0.13.0
  ∗ install result                  1.4
  ∗ install re                      1.9.0
  ∗ install ppx_derivers            1.2.1
  ∗ install pprint                  20200410
  ∗ install octavius                1.2.2
  ∗ install ocaml-compiler-libs     v0.12.1
  ∗ install mmap                    1.1.0
  ∗ install magic-mime              1.1.2
  ∗ install macaddr                 4.0.0
  ∗ install gmap                    0.3.0
  ∗ install easy-format             1.3.2
  ∗ install dune-private-libs       2.5.1
  ∗ install cpuid                   0.1.2
  ∗ install cppo                    1.6.6
  ∗ install bigarray-compat         1.0.0
  ∗ install conf-hidapi             0
  ∗ install uchar                   0.0.2
  ∗ install zarith                  1.9.1
  ∗ install topkg                   1.0.1
  ∗ install sosa                    0.3.0
  ∗ install ocamlgraph              1.8.8
  ∗ install num                     1.3
  ∗ install nonstd                  0.0.3
  ∗ install base-bytes              base
  ∗ install ocaml-migrate-parsetree 1.7.2
  ∗ install dum                     1.0.1
  ∗ install dune-configurator       2.5.1
  ∗ install lwt                     4.2.1
  ∗ install cstruct                 5.1.1
  ∗ install uutf                    1.0.2
  ∗ install uuidm                   0.9.7
  ∗ install rresult                 0.6.0
  ∗ install ptime                   0.8.5
  ∗ install mtime                   1.2.0
  ∗ install fmt                     0.8.8
  ∗ install genspio                 0.0.2
  ∗ install stringext               1.6.0
  ∗ install ocplib-endian           1.1
  ∗ install bigstring               0.3
  ∗ install astring                 0.8.3
  ∗ install ppx_tools_versioned     5.3.0
  ∗ install base64                  3.4.0
  ∗ install base                    v0.13.1
  ∗ install lwt-watcher             0.1
  ∗ install lwt-canceler            0.2
  ∗ install lwt_log                 1.1.1
  ∗ install hex                     1.4.0
  ∗ install eqaf                    0.7
  ∗ install uucp                    13.0.0
  ∗ install jsonm                   1.0.1
  ∗ install asn1-combinators        0.2.2
  ∗ install logs                    0.7.0
  ∗ install uri                     3.1.0
  ∗ install mirage-crypto           0.6.2
  ∗ install crowbar                 0.1
  ∗ install hidapi                  1.1.1
  ∗ install ocp-ocamlres            0.4
  ∗ install fpath                   0.7.2
  ∗ install domain-name             0.3.0
  ∗ install alcotest                0.8.5
  ∗ install bisect_ppx              2.4.0
  ∗ install stdio                   v0.13.0
  ∗ install parsexp                 v0.13.0
  ∗ install fieldslib               v0.13.0
  ∗ install digestif                0.8.0-1
  ∗ install uuseg                   13.0.0
  ∗ install resto                   0.5
  ∗ install json-data-encoding      0.8
  ∗ install mirage-crypto-rng       0.6.2
  ∗ install ipaddr                  4.0.0
  ∗ install alcotest-lwt            0.8.5
  ∗ install ppxlib                  0.13.0
  ∗ install sexplib                 v0.13.0
  ∗ install ocamlformat             0.10
  ∗ install resto-directory         0.5
  ∗ install json-data-encoding-bson 0.8
  ∗ install ppx_sexp_conv           v0.13.0
  ∗ install ppx_inline_test         v0.13.1
  ∗ install ppx_fields_conv         v0.13.0
  ∗ install ppx_cstruct             5.1.1
  ∗ install ezjsonm                 1.1.0
  ∗ install cstruct-sexp            5.1.1
  ∗ install uri-sexp                3.1.0
  ∗ install mirage-crypto-pk        0.6.2
  ∗ install ipaddr-sexp             4.0.0
  ∗ install data-encoding           0.2
  ∗ install cohttp                  2.5.1
  ∗ install x509                    0.11.0
  ∗ install conduit                 2.1.0
  ∗ install cohttp-lwt              2.5.1
  ∗ install tls                     0.11.1
  ∗ install conduit-lwt             2.1.0
  ∗ install resto-cohttp            0.5
  ∗ install conduit-lwt-unix        2.1.0
  ∗ install resto-cohttp-client     0.5
  ∗ install cohttp-lwt-unix         2.5.1
  ∗ install resto-cohttp-server     0.5
===== ∗ 114 =====

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment