barreleye

command module
v0.0.0-...-e85cc61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

README


Logo

@Barreleye Chain · go version

Official open source of Barreleye Blockchain.

with initial developer @Youngmin Kim, @Nayoung Kim


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.

tutorial1

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.

MergedImages

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-fish-black-24   Barreleye

barreleye-fish-black-24   Barreleyescan


Please inquire about participating in the main network.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
dto

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL