Nodes/stacks/docker

stacks

Stacks Docker 노드 가이드

3분 읽기 · docker

list목차(5)

Stacks Docker 노드 가이드

공식 blockstack/stacks-core (또는 커뮤니티 포크) 이미지를 사용해 Stacks 노드를 실행합니다. Bitcoin 메인넷 헤더와 연동되므로 같은 호스트에 Bitcoin 노드를 운영하는 것이 권장됩니다.

docker-compose 예시

services:
  stacks-node:
    image: blockstack/stacks-core:3.1.0.0.5
    container_name: stacks-node
    restart: unless-stopped
    ports:
      - "20443:20443"   # HTTP RPC
      - "20444:20444"   # P2P
    volumes:
      - ./data:/root/stacks
      - ./Config.toml:/root/Config.toml:ro
    command:
      - stacks-node
      - start
      - --config=/root/Config.toml

Config.toml 예시 (Mainnet Follower)

[node]
working_dir = "/root/stacks"
rpc_bind = "0.0.0.0:20443"
p2p_bind = "0.0.0.0:20444"
bootstrap_node = "02da7a464ac770ae8337a343670778b93410f2f3fef6bea98dd1c3e9224459d36b@seed-0.mainnet.stacks.co:20444"

[burnchain]
chain = "bitcoin"
mode = "mainnet"
peer_host = "bitcoin.blockstack.com"
username = "blockstack"
password = "blockstacksystem"
rpc_port = 8332
peer_port = 8333

공식 Bitcoin 릴레이(bitcoin.blockstack.com)는 편의상 공개되어 있지만, 프로덕션은 자체 Bitcoin 노드를 운영하고 peer_host를 거기로 돌리는 것을 권장합니다. Bitcoin 노드 운영: ../../bitcoin/docker/README.md.

상태 확인

# RPC info
curl -s http://localhost:20443/v2/info | jq

# 현재 burn block height
curl -s http://localhost:20443/v2/info | jq '.burn_block_height'

Signer 노드 (Nakamoto 이후)

Nakamoto 업그레이드부터 Signer 노드가 검증에 참여합니다. Docker에서는 stacks-signer 서비스를 별도 컨테이너로 실행합니다. 자세한 구성: https://docs.stacks.co/guides-and-tutorials/running-a-signer.

참고

stacks 다른 챕터