SSC) 개인 기록용 - 테스트 넷 증인을 위한 설정 가이드

in #zzan5 years ago (edited)

개요

허가 된 사람이 아니라면 아래글 대로 진행한다 하더라도 안됩니다.

참고 : SSC 증인 테스트넷을 운용하기 위해서는 일단 스팀엔진 테스트넷 비공개 방에 초대 형태로 참석이 된 이후, 테스트넷 전용 토큰 SSC 토큰을 스테이킹 한 이후 증인 승인 작업을 거쳐 진행 됩니다. ( 요약 : )

  • 아래 내용은 개인적으로 SSC 증인 노드 테스트 환경설정을 기록하기 위함 입니다.
  • 최신 내용은 아님에 유의 하기 바랍니다.
  • ubuntu 18.04 기준으로 작업은 진행 되었습니다.

몽고db 제거

기존에 몽고DB가 설치 되어있는 경우 문제가 발생 할때 아래를 수행

sudo service mongod stop
sudo apt-get purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb

몽고db 설치

설치 가이드 : https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

설치 repository 등록 - 설치 - 시작 순서로 진행

wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
sudo apt-get install -y mongodb-org
sudo service mongod start

ssc 설치 및 설정

설치 가이드 : https://gist.github.com/harpagon210/4c1e0421c9b90f2d3b6d3574478c83f9

github 설치 - 증인노드 변경 - 의존성 설치 - 몽고디비 복원 - 블록정보 업데이트 - 환경 변수 설정

git clone https://github.com/harpagon210/steemsmartcontracts.git
cd steemsmartcontracts
git checkout witnesses
npm install
wget https://testapi.steem-engine.com/ssc.testnet1.archive
mongorestore --gzip --archive=ssc.testnet1.archive
update the config.json file with startSteemBlock: 38000462
cp .env.example .env
.env 에 계정명 및 ACTIVE 키 추가하기

증인등록

자기 자신에게 0.001 스팀을 보내고 메모에 아래 정보를 전송

{
    "id": "ssc-testnet1",
    "json": {
        "contractName": "witnesses",
        "contractAction": "register",
        "contractPayload": {
            "IP": "본인아이피",
            "RPCPort": 5000,
            "P2PPort": 5001,
            "signingKey": "본인 엑티브키 공개키 정보",
            "enabled": true
        }
    }
}

증인 투표

일단 테스트넷에 증인으로 등록하는 작업이 선행 되어야 됨.

{
    "id": "ssc-testnet1",
    "json": {
        "contractName": "witnesses",
        "contractAction": "approve",
        "contractPayload": {
            "witness": "승인할 증인 계정명"
        }
    }
}

기타 참조

패키지 오류 바로 잡기

우분투 apt-get update 시 오류가 발생하면 아래와 같이 수행하여 repository 경로를 바꿔서 수행 해본다.

:%s/kr.archive.ubuntu.com/ftp.daum.net/g
:%s/security.ubuntu.com/ftp.daum.net/g
:%s/extras.ubuntu.com/ftp.daum.net/g

포트 open 확인

5000 : rpc / 5001 : p2p - 2개 포트가 방화벽에 막히지 않고 open 되어 있어야 함.

https://www.yougetsignal.com/tools/open-ports/

pinned 된 메시지


ok, i created a dump, https://testapi.steem-engine.com/ssc.testnet1.archive ... nodes that are not synced, please delete your db and restore the archive above
you can restore the archive with mongorestore --gzip --archive=ssc.testnet1.archive
then update the config.json file with startSteemBlock: 38000462

3..2...1... here are my UI skills :slight_smile: https://jsfiddle.net/h9ujzn4m/show

also, if you guys can send me a steem account to which I'll send some SSC tokens (equivalent of ENG on the testnet), you can then stake them and vote for the witnesses
to vote for a witness, all you need to do is stake SSC tokens and then broadcast a json like indicated here -> https://gist.github.com/harpagon210/4c1e0421c9b90f2d3b6d3574478c83f9#6-vote-for-a-witness

for those who followed the instructions from github to install the node, you'll need to start over (as it was to setup a node on the mainnet), basically, delete your entire folder and drop the database created by the software fro MongoDB (by default the DB is name "ssc")
after that, start a fresh installation by following the instructions from this gist: https://gist.github.com/harpagon210/4c1e0421c9b90f2d3b6d3574478c83f9
for now, stop at step 3 as before registering your witness i'll need to push the 'witnesses' contract to the sidechain :wink:

first thing, I want to make sure that everyone can fulfill these requirements:
- have a machine with 8Gb of RAM and around 20Gb of storage (even though the storage needed for now is under 4Gb)
- have a Steem account with around 1000 Steem Power

SSC 관심 가지시는 분(개발자) 알림용

@goodhello / @happyberrysboy

Sort:  
dropdatabase
mongo
show databases
use ssctestnet1
db.dropDatabase()

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 62227.11
ETH 2400.78
USDT 1.00
SBD 2.50