본문 바로가기
Logo
개발자 빠른 시작

Zcash Dev
빠른 시작

Zcash 개발을 시작하고 실행해 보세요. 스택을 선택하고 가이드를 따르세요.

설치

종속성

bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt update
sudo apt install libclang-dev clang pkg-config openssl protobuf-compiler npm

소스에서

bash
git clone https://github.com/ZcashFoundation/zebra.git
cd zebra
git checkout v6.3.0
cargo build --release --bin zebrad
export PATH="$PATH:$(pwd)/target/release"

또는

bash
cargo install --git https://github.com/ZcashFoundation/zebra --tag v6.3.0 zebrad
2

zebrad 실행하기

초기 설정

구성 디렉터리 생성

bash
zebrad generate -o ~/.config/zebrad.toml

zebrad.toml

toml
[consensus]
checkpoint_sync = true

[mempool]
eviction_memory_time = "1h"
tx_cost_limit = 80000000

[network]
cache_dir = true
crawl_new_peer_interval = "1m 1s"
listen_addr = "[::]:8233"
network = "Mainnet"
peerset_initial_target_size = 25

[rpc]
listen_addr = "127.0.0.1:8232"
cookie_dir = "/home/your_username/.cache/zebra"
enable_cookie_auth = false

[state]
cache_dir = "/home/your_username/.cache/zebra" # (Change to store in external SSD)
delete_old_database = true
ephemeral = false

[sync]
checkpoint_verify_concurrency_limit = 1000
download_concurrency_limit = 50
full_verify_concurrency_limit = 20

[tracing]
buffer_limit = 128000
use_color = true

zebrad 시작하기

명령줄

bash
zebrad start
# Or with specific config
zebrad -c ~/.config/zebrad.toml start

중요 참고 사항

  • 첫 실행 시 전체 블록체인(~250 GB)을 다운로드합니다
  • 초기 동기화에는 몇 시간이 걸릴 수 있습니다
  • zebrad.toml을 안전하게 비공개로 유지하세요
3

lightwalletd로 연결하기

lightwalletd Zcash 블록체인에 대한 경량 인터페이스를 제공하는 서버로, 전체 노드를 실행할 필요가 없는 모바일 및 데스크톱 지갑을 위해 설계되었습니다.

설치

사전 요구 사항

bash
# Install Go
sudo apt install golang-go
# Or download from golang.org

lightwalletd 빌드하기

bash
git clone https://github.com/zcash/lightwalletd.git
cd lightwalletd
go build
make
make install
export PATH=$PATH:~/go/bin

구성

기본 설정 (Mainnet)

bash
cat > ~/.config/zcash.conf << EOF
rpcport=8232
rpcbind=127.0.0.1
rpcuser=your_rpc_username
rpcpassword=your_rpc_password
EOF

기본 설정 (Testnet)

bash
cat > ~/.config/zcash.conf << EOF
testnet=1
rpcport=18238
rpcbind=127.0.0.1
rpcuser=your_rpc_username
rpcpassword=your_rpc_password
EOF

실행

bash
lightwalletd --zcash-conf-path ~/.config/zcash.conf --data-dir ~/data/zebrad/.cache/lightwalletd --log-file ~/.local/state/lwd.log --no-tls-very-insecure

다음 단계 및 리소스