지난해 8월부터 세번째 테스트넷 진행 중
페이즈1∙2에 이은 마지막 테스트넷 '페이즈3'
영지식 증명(ZKP∙zero-knowledge proof) 프로토콜 알레오(Aleo)는 세번째 테스트넷(Aleo Testnet 3) 마지막 단계인 페이즈(phase)3 구동을 위한 가이드라인을 배포했다.
알레오의 '세번째 테스트넷은 지난해 8월 개시한 '페이즈1'부터 진행 중이며, 이를 통해 암호화 상태의 애플리케이션을 공개적으로 검증 가능한 방식으로 저장하는 알레오 네트워크의 백본을 구축하고 있다.
다음은 알레오 노드를 실행하기 위한 최소 요구 사양이다:
1. 빌드 가이드
1.1 요구 사항
◾ OS: 64비트 아키텍처 전용, 보안을 위한 최신 버전
◽ 클라이언트: 우분투 22.04(LTS), macOS 벤츄라 이상, Windows 11 이상
◽ 프로버: 우분투 22.04(LTS), macOS 벤츄라 이상
◽ 밸리데이터: 우분투 22.04 (LTS)
◾ CPU: 64비트 아키텍처만 해당
◽ 클라이언트 16코어
◽ 프로버: 32코어(64코어 권장)
◽ 벨리데이터: 32코어(64코어 권장)
◾ RAM: DDR4 이상
◽ 클라이언트 16GB 메모리
◽ 프로버: 32GB 메모리(64GB 이상 권장)
◽ 밸리데이터: 64GB 메모리(128GB 이상 권장)
◾ 스토리지: PCIe 3세대 x4, PCIe 4세대 x2 NVME SSD 이상
◽ 클라이언트 64GB의 디스크 공간
◽ 프로버 128GB의 디스크 공간
◽ 밸리데이터: 2TB의 디스크 공간(4TB 이상 권장)
◾ 네트워크: 대칭형, 상용, 상시 가동
◽ 클라이언트 100Mbps의 업로드 및 다운로드 대역폭
◽ 프로버: 250Mbps의 업로드 및 다운로드 대역폭
◽ 밸리데이터: 500Mbps의 업로드 및 다운로드 대역폭
◾ GPU:
◽ 클라이언트: 필요없음
◽ 프로버: CUDA 지원 GPU(선택 사항)
◽ 밸리데이터: 필요없음
1.2 설치
설치 시작 전 머신에 Rust v1.66 이상이 설치되어 있는지 확인할 것. Rust 설치 지침은 여기에서 확인할 수 있다.
Github 리포지토리 복제:
git clone https://github.com/AleoHQ/snarkOS.git --depth 1
snarkOS 디렉토리로 이동:
cd snarkOS
[우분투 사용자] 디펜던시(dependencies) 설치 helper 스크립트 사용 가능. snarkOS 디렉토리에서 실행:
./build_ubuntu.sh
snarkOS 설치:
cargo install --path .
라우터와 OS 방화벽에 포트 4133/tcp와 3033/tcp가 열려 있는지 확인
2. 알레오 노드 실행
2a. 알레오 클라이언트 실행
빌드 가이드(Build Guide) 지침∙사양 준수할 것
snarkOS 디렉토리에서 클라이언트 노드 실행
./run-client.sh
2b. 알레오 프로버(Prover) 실행
빌드 가이드(Build Guide) 지침∙사양 준수할 것
알레오 계정 주소 생성:
snarkos account new
터미널에 새 Aleo 계정이 출력됨
계정 개인 키와 뷰 키를 반드시 저장할 것. 다음은 출력 예시임:
Attention - Remember to store this account private key and view key. Private Key APrivateKey1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <-- Save Me And Use In The Next Step View Key AViewKey1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <-- Save Me Address aleo1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <-- Save Me
snarkOS 디렉토리에서 프로버 노드 실행:
./run-prover.sh
메시지 표시되면 Aleo 개인키 입력:
Enter the Aleo Prover account private key: APrivateKey1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3. FAQ
3.1. 노드 컴파일 작업 불가 시
◾ Rust v1.66 이상이 설치되어 있는지 확인. Rust 설치 지침은 여기에서 확인
◾ 컴파일 중 큰 오류가 발생 시, 카고 클린(cargo clean) 실행 권고
./run-client.sh 또는 ./run-prover.sh를 사용하여 snarkOS가 시작되었는지 확인
3.2. 노드를 네트워크 피어와 연결할 수 없을 시
◾ 라우터와 OS 방화벽에 포트 4133/tcp와 3033/tcp가 열려 있는지 확인.
◾ ./run-client.sh 또는 ./run-prover.sh를 사용하여 snarkOS가 시작되었는지 확인
3.3. 새 주소를 생성할 수 없을 시
◾ snarkos 계정 새로 만들기(snarkos account new) 실행 전 ~/.bashrc 입력
◾ snarkos 철자 재확인할 것. 디렉토리는 /snarkOS, 명령은 snarkos임
4. 명령줄 인터페이스(CLI)
사용자 정의 설정으로 노드를 실행 시, snarkOS CLI에서 사용할 수 있는 옵션과 플래그 전체 목록 참조할 것
전체 CLI 플래그 및 옵션 목록은 snarkos --help로 확인 가능:
snarkOS
The Aleo Team <hello@aleo.org>
USAGE:
snarkos [OPTIONS] <SUBCOMMAND>
OPTIONS:
-h, --help Print help information
-v, --verbosity <VERBOSITY> Specify the verbosity [options: 0, 1, 2, 3] [default: 2]
SUBCOMMANDS:
account Commands to manage Aleo accounts
clean Cleans the snarkOS node storage
help Print this message or the help of the given subcommand(s)
start Starts the snarkOS node
update Update snarkOS
'snarkos 시작(smartkos start)' 명령의 옵션:
USAGE:
snarkos start [OPTIONS]
OPTIONS:
--network <NETWORK_ID> Specify the network ID of this node [default: 3]
--validator Specify this node as a validator
--prover Specify this node as a prover
--client Specify this node as a client
--private-key <PRIVATE_KEY> Specify the node's account private key
--private-key-file <PRIVATE_KEY_FILE> Specify the path to a file containing the node's account private key
--node <IP:PORT> Specify the IP address and port for the node server [default: 0.0.0.0:4133]
--connect <IP:PORT> Specify the IP address and port of a peer to connect to
--rest <REST> Specify the IP address and port for the REST server [default: 0.0.0.0:3033]
--norest If the flag is set, the node will not initialize the REST server
--nodisplay If the flag is set, the node will not render the display
--verbosity <VERBOSITY_LEVEL> Specify the verbosity of the node [options: 0, 1, 2, 3] [default: 2]
--logfile <PATH> Specify the path to the file where logs will be stored [default: /tmp/snarkos.log]
--dev <NODE_ID> Enables development mode, specify a unique ID for this node
5. 개발 가이드
5.1 빠른 시작
첫번째 터미널에서 첫번째 밸리데이터 실행:
cargo run --release -- start --nodisplay --dev 0 --validator
두번째 터미널에서 두번째 밸리데이터 실행:
cargo run --release -- start --nodisplay --dev 1 --validator
세번째 터미널에서 세번째 밸리데이터 실행:
cargo run --release -- start --nodisplay --dev 2 --validator
네번째 터미널에서 네번째 밸리데이터 실행:
cargo run --release -- start --nodisplay --dev 3 --validator
이후, 프로버와 클라이언트를 추가로 시작할 수 있음.
5.2 운영
노드를 0에서 시작하여 새 노드마다 1씩 증가하여 초기화하는 것이 중요함.
다음은 노드를 초기화하는 옵션 목록임(<NODE_ID>를 0으로 시작하는 숫자로 대체):
cargo run --release -- start --nodisplay --dev <NODE_ID> --validator
cargo run --release -- start --nodisplay --dev <NODE_ID> --prover
cargo run --release -- start --nodisplay --dev <NODE_ID> --client
cargo run --release -- start --nodisplay --dev <NODE_ID>
노드 유형을 지정하지 않으면 노드의 기본값은 --client임.
5.3 로컬 데브넷
5.3.1 tmux 설치
스크립트로 로컬 데브넷을 실행하려면 먼저 tmux를 설치할 것.
5.3.2 로컬 데브넷 시작하기
로컬 데브넷 시작:
터미널의 지침에 따라 데브넷을 시작
5.3.3 로컬 데브넷 보기
노드 전환(앞으로)
로컬 데브넷에서 다음 노드로 전환 시:
Ctrl+b n
노드 전환(뒤로)
로컬 데브넷에서 앞전 노드로 전환 시:
Ctrl+b p
노드 선택(choose-tree)
로컬 데브넷에서 노드를 선택 시:
Ctrl+b w
노드 선택(수동)
로컬 데브넷에서 노드 수동 구동 선택 시:
Ctrl+b :select-window -t {NODE_ID}
5.3.4 로컬 데브넷 중지하기
로컬 데브넷 중지하기:
Ctrl+b :kill-session
이후 Enter 키 누를 것.
정리
노드 스토리지를 정리 시:
cargo run --release -- clean --dev <NODE_ID>
알레오 테스트넷 관련하여 문의 사항은 알레오 디스코드와 텔레그램(한국어)을 통해 확인할 수 있다.
IT타임스 YoungHa Kim (yhkim@ittimes.com)
