DOCUMENTS

Documents of the BORA project.

BORA Lagoon Network

본 문서는 Testnet을 위해 구성된 이더리움 네트워크(A)와 Side Chain(B)을 연동하기 위한 가이드입니다. 원활한 테스트를 위해 BORA Lagoon에서는 이더리움 네트워크를 내부에 구성하였고, 이후 정식 버전에서는 Ethereum mainnet이 이를 대체하게 됩니다.

BORA network 구성하기

아래 설치 내용은 Linux CentOS 7과 macOS 환경에서 구성하는 것으로 예시로 들었습니다.

1Download Install script

설치를 위해 준비한 스크립트를 git 을 이용하여 다운로드합니다.

Cent OS

sudo su -

#Install git if your machine is not installed git.
yum install git
yum update -y nss curl libcurl

git clone https://github.com/boraecosystem/bora-tools.git
cd ./bora-tools/boraadmin/install

Mac OS

cd ~/
git clone https://github.com/boraecosystem/bora-tools.git

cd ~/bora-tools/boraadmin/install

2Install System libraries

소스 컴파일을 위해 System library 들을 최신화합니다.

Cent OS

sh 10.yuminstall.sh

Mac OS

sh 10.mac_install.sh

3Install golang-go package

blockchain core source를 컴파일 하기 위해 go 환경을 구축합니다.

Cent OS

sh 20.golang.sh

Mac OS

sh 20.mac_golang.sh

4Install go-bora

blockchain core source를 다운로드하고 컴파일 합니다.

Cent OS

sh 30.go-bora.sh

Mac OS

sh 30.mac_go-bora.sh

5Connect to testnet-ethernode

제공된 스크립트를 이용하여 blockchain node에 연결합니다. Port는 8545입니다.

Cent OS

# Port number for connecting ether node: 8545
sh 40.setup8545_BORAToken.sh

Mac OS

# Port number for connecting ether node: 8545
sh 40.mac_setup8545_BORAToken.sh

6Connect to testnet-chainnode (Port:8501~8509)

위의 절차와 동일하게 BORA Chain node들도 연결을 진행합니다.

Cent OS

# Port number for connecting chain node: 8501-8509
sh 41.setup8501_BORAShell.sh
sh 41.setup8502_BORAShell.sh
sh 41.setup8503_BORAShell.sh
sh 41.setup8504_BORAShell.sh
sh 41.setup8505_BORAShell.sh
sh 41.setup8506_BORAShell.sh
sh 41.setup8507_BORAShell.sh
sh 41.setup8508_BORAShell.sh
sh 41.setup8509_BORAShell.sh

Mac OS

# Port number for connecting chain node: 8501-8509
sh 41.mac_setup8501_BORAShell.sh
sh 41.mac_setup8502_BORAShell.sh
sh 41.mac_setup8503_BORAShell.sh
sh 41.mac_setup8504_BORAShell.sh
sh 41.mac_setup8505_BORAShell.sh
sh 41.mac_setup8506_BORAShell.sh
sh 41.mac_setup8507_BORAShell.sh
sh 41.mac_setup8508_BORAShell.sh
sh 41.mac_setup8509_BORAShell.sh

7Test for connectivity to node using geth

geth attach 명령어 또는 2.conn_geth.sh를 이용하여 각 노드에 접속하여 정보를 조회할 수 있습니다.

Cent OS

sh 50.node_monitor.sh

Mac OS

sh 50.mac_node_monitor.sh

Cent OS

geth attach ~/bora-tools/boraadmin/NODE/8545/geth.ipc

Mac OS

geth attach ~/bora-tools/boraadmin/NODE/8545/geth.ipc
아래 명령어를 이용하여 블록 넘버와 블록 정보를 조회해 볼 수 있습니다.
> eth.blockNumber
88066
> eth.getBlock("latest")
{
difficulty: 2,
extraData: "0xd883010811846765746888676f312e31302e33856c696e757800000000000000fb319418d71dd6d49824ab1fb394a4745bf67d12d166e271f67b00c331c47b61415969265121e874c1d3eca1d93286c2e137b54d04cd23e60a0c2eae39a8330f01",
gasLimit: 50000000,
gasUsed: 0,
hash: "0x9bdc9af75ae31ee0754a3145159529c91f0b9fe36ebcc54eb6b56385e862f8bc",
logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
miner: "0x0000000000000000000000000000000000000000",
mixHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
nonce: "0x0000000000000000",
number: 88070,
parentHash: "0xcf6789c6f68f4435446ad058c705235ed3f8ceb8d7a035bdf723d234bed0fca3",
receiptsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
size: 610,
stateRoot: "0x0e1b27c91c3d81c182960cb95a185f11c603482182c33bd826cc349d22860496",
timestamp: 1540252164,
totalDifficulty: 176141,
transactions: [],
transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
uncles: []
}
>