Running Tezos in this mode will only store the blocks after latest snapshot, no longer requiring hundreds of gigabytes of drive storage space.
The software modification is provided by Nomadic Labs, details: https://blog.nomadic-labs.com/introducing-snapshots-and-history-modes-for-the-tezos-node.html
rm -rf tezos
wget https://gitlab.com/nomadic-labs/tezos/-/archive/mainnet-snapshots/tezos-mainnet-snapshots.zip
unzip tezos-mainnet-snapshots.zip
cd tezos-mainnet-snapshots
git checkout mainnet
make build-deps
make
If it fails:
opam update
opam pin list -s | xargs opam pin remove
make build-deps
make
Run node, no changes for other parts:
./tezos-node run --rpc-addr 127.0.0.1:8732 `bash get_peers.sh` --history-mode rolling
sudo apt install bubblewrap
sudo apt install zip
wget https://gitlab.com/nomadic-labs/tezos/-/archive/mainnet-snapshots/tezos-mainnet-snapshots.zip
unzip tezos-mainnet-snapshots.zip
cd tezos-mainnet-snapshots
git checkout mainnet
sudo apt install curl
sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
wget https://github.com/ocaml/ocaml/archive/4.06.1.zip
unzip 4.06.1.zip
cd ocaml-4.06.1
./configure -bindir /usr/bin -libdir /usr/lib/ocaml -mandir /usr/man/manl
make world
umask 022
sudo make install
cd
opam init
opam pin add jbuilder 1.0+beta20
eval $(opam env)
opam install -y astring base biniou cmdliner cohttp cohttp-lwt cohttp-lwt-unix conduit conduit-lwt conduit-lwt-unix cppo_ocamlbuild cpuid cstruct cstruct-lwt ezjsonm fieldslib fmt hex ipaddr irmin js_of_ocaml js_of_ocaml-compiler jsonm logs lwt mtime nocrypto ocaml-migrate-parsetree ocb-stubblr ocp-ocamlres ocplib-endian ocplib-json-typed ppx_ast ppx_core ppx_deriving ppx_driver ppx_fields_conv ppx_metaquot ppx_optcomp ppx_sexp_conv ppx_tools_versioned ppx_type_conv stdio topkg uri uutf yojson base64 cppo easy-format magic-mime ocaml-compiler-libs ppx_derivers ppx_traverse_builtins re result sexplib stringext
make build-deps
make
Create an identity, start RPC server, add address, activate:
./tezos-node identity generate 26
echo "curl -s 'http://api.tzscan.io/v2/network?state=running&p=0&number=50' | grep -Po '::ffff:([0-9.:]+)' | sed ':a;N;$!ba;s/\n/ /g' | sed 's/::ffff:/--peer=/g'" > get_peers.sh
./tezos-node run --rpc-addr 127.0.0.1:8732 `bash get_peers.sh` --history-mode rolling
./tezos-client add address fundraiser <tz1...>
./tezos-client activate fundraiser account fundraiser with <activation_key>
To import your fundraiser private key:
./tezos-client import fundraiser secret key fundraiser
Start baking (background service &), path to your node location:
./tezos-baker run with local node "/home/**user**/.tezos-node"
./tezos-endorser run "fundraiser"
./tezos-accuser run
I cannot do git checkout mainnet in the folder where I unzip the tezos-mainnet-snapshots.zip file. I get an error "fatal: not a git repository (or any parent up to mount point /home)".
any ideas?