_|_|_|_| _|_| _|_|_| _|_|_| _| _| _|_| _|_|_| _| _|
_| _| _| _| _| _| _| _| _| _| _| _|_| _|
_|_|_| _|_|_|_| _|_|_| _| _|_|_|_| _|_|_|_| _| _| _| _|
_| _| _| _| _| _| _| _| _| _| _| _| _|_|
_| _| _| _|_|_| _|_|_| _| _| _| _| _|_|_| _| _|
Bloat-free toolbox to create and operate new blockchains based on ethereum technology using geth. Fabchain is fully cross-platform and facilitates operations on nodes using the command-line: one can use it to compile and deploy smart contracts as well easily build public web interfaces to contract operations using Zenroom.
Fabchain is optimized to run with bare-bone ethereum tools:
This application is made to work on Apple/OSX, Microsoft/WSL or GNU/Linux desktop systems. The host system needs the following dependencies installed:
Fabchain is operated from a terminal inside its folder, all commands are
issued by the Makefile and therefore prefixed by make
.
Starting fabchain will result in a JSON-RPC API interface available on localhost:8545.
To run your own fabchain node just clone this repo, enter its directory and:
make create-config
make run
It will start a light node connected to our testnet (Chain ID fabt
).
To access the container running use make shell
To access the geth console running use make console
.
To stop issue the command make stop
.
A full overview of commands is shown simply typing make
:
Server commands:
Usage:
make <target>
General
help Display this help.
Server commands
run start the API node listening on HTTP port
run-signer start the SIGNER node networking on the P2P port
status see if server is running and print public addres
logs show the logs of the running server
shell open a shell inside running server (CMD=sh or custom)
enr Obtain the ENR node record (admin.nodeInfo.enr)
console open the geth console inside running server
stop stop running server
Network commands
upnp-open open UPNP port-forwarding on LAN router
upnp-close close UPNP port-forwarding on LAN router
Contract commands
contract-deploy deploy a web3 smart-contract in SOL=contracts/file.sol
contract-info obtain contract information about the TXID=hash
Account commands:
account create a new private account in data/keystore
backup print the private account content as JSON string
backup-secret print the wallet master secret key
restore ask for private account JSON to restore backup
Genesis commands
genesis-create Create data/genesis.json from scripts/params_genesis.json
genesis-init Initialize node to use the new chain in data/genesis.json
Development commands
tag compute the version tag for current build
pull pull the image from docker-hub online repo
push push the image to docker-hub online repo
build build the docker container
debug run a shell in a new interactive container (no daemons)
Fabchain uses the official ethereum go client to provide full access to
the latest API specifications for the namespaces eth
and web3
available on nodes connecting port 8545 via HTTP.
API documentation is maintained by the ethereum project:
This is something only people running a whole new blockchain based on fabchain need to know, or system administrators of the fabchain and its testnet.
To bootstrap a new blockchain one needs to create a genesis, which
needs a new chainID which is an integer, easy to find using a string
for instance fabt
we do:
echo "print(BIG.new(O.from_string('fabt')):decimal())" | zenroom
And find 1717658228
as our 4 letter chain ID.
Then copy
scripts/params-genesis.json.example
to a new file scripts/params-genesis.json
and configure it with the
chain IDs, the current epoch and other base configurations as for
instance the share
of coins assigned to each signer, which is in
fact the total amount of coins pre-mined.
Then install all the new signer nodes, create their accounts and note down their addressess, using our devops setup that is simply made with:
cd devops
make server-create # creates 3 signers and 1 api server
make install # instals all servers with fabchain
make create-accounts # creates fabchain accounts
make list-addressess # prints fabchain account addresses
cd -
Then fill the signer addressess in the scripts/params-genesis.json
and run make genesis-create
and the genesis will be found in
data/genesis.json
ready for your local node.
Then if using the devops tools to create the nodes:
cp data/genesis.json devops/
cd devops
make init-genesis
make init-bootnodes
cd -
Both genesis.json
and bootnodes.csv
need to be uploaded on
each new node for the network to function.
Fabchain is Copyright (C) 2022 by Dyne.org foundation
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Fabchain - web3 framework for the fabcities
Copyleft (ษ) 2022 Dyne.org foundation, Amsterdam
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.