# README
Fractal
go version for fractal blockchain
master | dev |
---|---|
Build Steps
-
make your own go env, set $GOPATH, and add $GOPATH/bin to PATH env
cd ~ mkdir -p go/bin go/src export GOPATH=~/go export PATH=$PATH:$GOPATH/bin
-
clone source
cd $GOPATH/src git clone [email protected]:fractal-platform/fractal.git github.com/fractal-platform/fractal
-
build
cd $GOPATH/src/github.com/fractal-platform/fractal go install -v -ldflags "-X main.gitCommit=$(git log --pretty=format:'%h' -1)" ./cmd/gftl/ go install -v -ldflags "-X main.gitCommit=$(git log --pretty=format:'%h' -1)" ./cmd/gtool/ sudo cp transaction/txec/libwasmlib.dylib /usr/local/lib/
Running Fractal blockchain
Setup Basic Test Environment
-
Setup keys&genesis
cd ~ mkdir test gtool keys --keys data1/keys --pass 666 newkeys gtool keys --keys data2/keys --pass 666 newkeys address1=$(gtool keys --keys data1/keys --pass 666 list | grep "Account Key" | awk -F: '{print $2}') gtool gstate --pass 666 --packerKeyOwner $address1 gen
-
Setup the first node
cd ~/test cp $GOPATH/src/fractal/cmd/gftl/test.toml . gftl --config test.toml --genesisAlloc genesis_alloc.json --rpc --rpcport 8545 --datadir data1 --port 30303 --pprof --pprofport 6060 --verbosity 3 --mine --packer --unlock 666
-
Setup the second node, start a new terminal and exec:
cd ~/test enode1=$(gtool admin --rpc http://127.0.0.1:8545 enode) gftl --config test.toml --genesisAlloc genesis_alloc.json --rpc --rpcport 8546 --datadir data2 --port 30304 --pprof --pprofport 6061 --verbosity 3 --mine --packer --unlock 666 --bootnodes $enode1
-
Test, start a new terminal and exec:
cd ~/test
address1=$(gtool keys --keys data1/keys --pass 666 list | grep "Account Key" | awk -F: '{print $2}')
address2=$(gtool keys --keys data2/keys --pass 666 list | grep "Account Key" | awk -F: '{print $2}')
gtool tx --rpc http://127.0.0.1:8545 --to $address2 --chainid 999 --keys data1/keys --pass 666 send
Setup Packer
-
Add(Modify) a Packer
cd ~/test cp $GOPATH/src/fractal/cmd/gftl/packer_keys.abi . address1=$(gtool keys --keys data1/keys --pass 666 list | grep "Account Key" | awk -F: '{print $2}') packerpubkey1=$(gtool keys --keys data1/keys --pass 666 list | grep "Packer Public Key" | awk -F: '{print $2}') gtool packer --rpc http://127.0.0.1:8545 --chainid 999 --keys data1/keys --pass 666 --abi packer_keys.abi --packerId 0 --packerAddress http://127.0.0.1:8545 --packerCoinbase $address1 --packerPubKey $packerpubkey1 setPacker
-
Send transaction
cd ~/test address1=$(gtool keys --keys data1/keys --pass 666 list | grep "Account Key" | awk -F: '{print $2}') address2=$(gtool keys --keys data2/keys --pass 666 list | grep "Account Key" | awk -F: '{print $2}') gtool tx --rpc http://127.0.0.1:8545 --to $address2 --chainid 999 --keys data1/keys --pass 666 --packer send
# Packages
Package chain contains implementations for basic chain operations.
No description provided by the author
Package common contains various helper functions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package miner contains implementations for block mining strategy.
Package p2p implements the Ethereum p2p network protocols.
No description provided by the author
No description provided by the author
Package rlp implements the RLP serialization format.
Package rpc contains defines for rpc server and client.
No description provided by the author
Package trie implements Merkle Patricia Tries.
No description provided by the author