Barreleye Blockchain Overview.
배럴아이 블록체인은 다양한 핵심 기능들을 포함하고 있습니다. 노드들은 서로 연결되어 블록과 트랜잭션을 주고받으며, 각 노드는 수신한 트랜잭션의 서명을 검증하고 이를 멤풀에 저장한 후, 다른 노드들에게 전파합니다. 블록 생성이 완료되면, 생성한 노드는 보상을 받고 멤풀에 담긴 트랜잭션들을 처리해 상태를 업데이트한 후 블록을 체인에 연결하고, 이를 다시 다른 노드들과 공유합니다. 연결된 노드들은 블록 서명 검증 후, 블록 내 트랜잭션을 처리해 상태를 동기화하며 체인에 반영하고 전파합니다.
블록체인은 데이터 무결성을 유지하기 위해 블록 분기와 같은 다양한 상황에서도 배럴아이 코어만의 메커니즘을 통해 문제없이 동작합니다. 또한, 각 노드는 블록체인 상태 정보를 조회할 수 있는 API를 제공하며, 실시간으로 배럴아이스캔(https://barreleyescan.com) 을 통해 블록체인 현황을 확인할 수 있습니다. 누구나 GitHub의 매뉴얼을 참고해 배럴아이 노드를 구축하여 메인 네트워크에 참여하거나 개인 네트워크를 설정할 수도 있습니다.
Barreleye Usage.
Prerequisites.
Docker download here docker.com.
1. Pull Docker Image.
Pull the Barreleye Docker image.
$ docker pull kym6772/barreleye:1.0.0
2. Write a shell script.
Fill in the variables needed to run the node.
# example
name="my-node"
role="normal"
port="4100"
peers="172.30.1.5:4101"
httpPort="9000"
key="a2288db63c7016b815c55c1084c2491b8599834500408ba863ec379895373ae9"
docker run -it -p ${port}:${port} -d kym6772/barreleye:1.0.0 /barreleye/bin/barreleye -name=${name} -role=${role} -port=${port} -peer=${peer} -http.port=${httpPort} -key=${key}
name
- the node name you want.
role
- If it is the first node running in a private network, the role is genesis
, otherwise it is normal
.
port
- Port number for communication between nodes based on TCP/IP.
peers
- Peer's port number. If role is genesis, fill in none
. also, it can be an array. For example, "x.x.x.x:3000,y.y.y.y:4000,..."
httpPort
- Port number for REST API.
key
- Node’s private key for signing and verifying blocks.
3. Run a shell script.
$ ./{file_name}.sh
Result of executing the command.
If this is the first node in your private network, it will stop at a line like the one above. This is because mining begins only when two or more nodes participate. Run two or more nodes.
You can connect infinite nodes as shown above. As you can see from the log, nodes verify and process transactions. Nodes then broadcast blocks and transactions to synchronize data with each other. In this way, nodes earn rewards through mining in return for maintaining the Barreleye blockchain network. Let’s participate as a node in the main network. Or let's build your own private network!
REST API Documentation.
path |
method |
request |
response |
/blocks |
GET |
query page size |
blocks |
/blocks/:id |
GET |
param id - hash or height |
hash version dataHash prevBlockHash height timestamp signer extra signature txCount transactions |
/last-block |
GET |
none |
block |
/txs |
GET |
query page size |
transactions |
/txs/:id |
GET |
param id - hash or number |
hash nonce blockHeight timestamp from to value data signer signature |
/txs |
POST |
body from - hex string to - hex string value - hex string data - hex string signerX - hex string signerY - hex string signatureR - hex string signatureS - hex string |
transaction |
/faucet |
POST |
body accountAddress - hex string |
transaction |
/accounts/:address |
GET |
param address |
address nonce balance |
Specification.
Block time
- 10 seconds on average.
Block reward
- 10 barrel per block.
Hash algorithm
- SHA256.
Cryptography algorithm
- ECDSA secp256k1.
Consensus algorithm
- Proof of random
Explorer & Wallet.
https://barreleyescan.com
Our projects.
Barreleye
Barreleyescan
Please inquire about participating in the main network.