Skip to content
Snippets Groups Projects
Commit 8e627297 authored by Francisco Ruiz's avatar Francisco Ruiz
Browse files

Initial Readme

parent fec5980e
No related branches found
No related tags found
No related merge requests found
# Blockchain Federal Argentina
## TEST NETWORK
## Official URL: https://gitlab.bfa.ar/blockchain/nucleo
## Website: https://www.bfa.ar/
## Container Repository.
1. Install geth
- For Debian read doc/compiling-geth-on-debian.txt
- For Ubuntu read doc/installing-geth-on-ubuntu.txt
2. `sudo apt install jq ncurses-bin curl`
3. `git clone https://github.com/rlegene/bfa.git`
4. `source ${HOME}/bfa/bin/env`
- You can include this line in your .bash_profile if you want.
- It is perfectly safe to source it multiple times.
5. Install this crontab: `@reboot bfa/bin/cron.sh`
- If you are running a sealer you MUST do this.
6. run `start.sh`. This will start synchronizing and probably takes at least an hour.
7. Change your node's settings with `syncmode.sh`
- Do this before you have synced too much in the step before, as it might remove all your downloaded chain data and restart synchronizing the chain.
8. Wait for it to finish synchronizing.
9. Run `maymine.sh` to update your configuration (detects if you are allowed to seal/mine or not).
10. Get some Ether from someone. Once you have some, you can try:
- Create your contract (there is already one deployed, but you can "overwrite" it with your own)
- Type lines of text into `tsa-insert.sh` (end with ctrl-D)
11. Free things to do with the BFA:
- Verify that the checksum has been seen with `tsa-verify.sh "<yourtexthere>"`
- If the text can not be found, it is because your insert transaction still isn't in the blockchain. Wait a bit and try again.
- Try the basic `explorer.sh`. It follows "latest" by default, but you can specify a block number as argument, e.g. `explorer.sh 0` to see genesis (block 0).
- Try out `walker.pl`
12. Install node.js so you can do better scripts locally:
`sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280`
`sudo apt-add-repository "deb https://deb.nodesource.com/node_7.x $(lsb_release -sc) main"`
`sudo apt-get update`
`sudo apt-get install nodejs`
`npm init -y`
`npm install web3`
There are other "interesting" programs in the bin/ and src/ directories.
## start.sh
requires: **geth**
Starts a node on the 5445 BFA test net. Creates a genesis.json if you don't have one already.
One is already included in this package, which will allow you to connect to the existing BFA testnet.
## attach.sh
request: **geth**
Connects you to your running local geth.
## compile.and.deploy.contract
requires: **geth**, **solc**, **jq**
Compiles and deploys a contract to the blockchain. A local "node1" must already be running and synchronized.
Argument 1 is the filename of the contract to compile.
Example: `compile.and.deploy.contract src/TimestampAuthority.sol`
## tsa-insert.sh
requires: **geth**
Inserts the checksum of a text into the TSA.
## tsa-verify.sh
requires: **geth**
Returns the first blocknumber where the SHA256 checksum of a text was seen. The timestamp can then be found in the block (with `explorer.sh` for instance).
## explorer.sh
requires: **curl**, **jq**, **tput** _(ncurses-bin)_, _(curl)_
Simple script to look at blocks
## src/TimeStampAuthority.sol
The initial Timestamp service.
## walker.pl
requires: **geth**, **perl**, __(libjson-perl)__
## rewind.sh
If your local node seems stuck and still connected, then you can try
this tool, and it'll back up a few blocks on the chain and try to catch
up from there. It really shouldn't happen, but it was seen a few times
when there were few sealers, that some nodes could get stuck on a side
fork.
## log.sh
Takes stdin and rotates it over a limited number of log files. We pipe
the output from `geth` into `log.sh`, so we still can read the log.
## sendether.sh
If you wish to give someone Ether, this script might be useful.
Initial commit.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment