Skip to content
Snippets Groups Projects
Commit 138eba9b authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

Merging master

parents 6fdf5e9e e88d2c93
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
1. Install geth
- For Debian read doc/compiling-geth-on-debian.txt
- For Ubuntu read doc/installing-geth-on-ubuntu.txt
......@@ -24,12 +26,12 @@
- 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`
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.
......@@ -50,9 +52,9 @@ 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 contract to compile.
Argument 1 is the filename of the contract to compile.
Example: `create.contract src/contract.TimestampAuthority.sol`
Example: `create.contract src/TimestampAuthority.sol`
## tsa-insert.sh
requires: **geth**
......@@ -69,7 +71,7 @@ requires: **curl**, **jq**, **tput** _(ncurses-bin)_, _(curl)_
Simple script to look at blocks
## src/contract.TimeStampAuthority.sol
## src/TimeStampAuthority.sol
The initial Timestamp service.
......
......@@ -5,7 +5,7 @@ if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env
source ${BFAHOME}/bin/libbfa.sh || exit 1
bfaconfig node
res=$( geth_exec_file "${BFAHOME}/src/js.maymine" )
res=$( geth_exec_file "${BFAHOME}/src/maymine.js" )
if [ "$res" = "true" ]
then
......
......@@ -3,4 +3,4 @@
if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env ?" >&2; exit 1; fi
source ${BFAHOME}/bin/libbfa.sh || exit 1
geth_exec_file ${BFAHOME}/src/js.rewind
geth_exec_file ${BFAHOME}/src/rewind.js
#!/bin/bash
if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env ?" >&2; exit 1; fi
source ${BFAHOME}/bin/libbfa.sh || exit 1
cd $BFAHOME
while :
do
while num=` $BFAHOME/bin/numpending.sh `; [ $num -lt 2500 ]
do
contract=$( readlink ${BFANETWORKDIR}/contracts/TimestampDocument )
abi=$( cat ${BFANETWORKDIR}/contracts/${contract}/abi )
(
echo "var mycontract = eth.contract(JSON.parse($abi));"
echo "var thecontract = mycontract.at(\"$contract\");"
n=0
SECONDS=0
while [ $n -lt 10000 -a $SECONDS -lt 600 ]
do
n=$(( $n + 1 ))
echo "thecontract.storeDocument.sendTransaction( \"dagenidag.${n}\", {from: eth.accounts[0], gas: 1000000});"
done
) |
geth_attach
done
echo `date`: $num pending.
sleep 2
done
......@@ -11,9 +11,9 @@
Go is only needed for compiling geth - afterwards we can delete it
1. Download __go*.linux-amd64.tar.gz__ from [https://golang.org/dl/] e.g. [https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz]
1. Download __go*.linux-amd64.tar.gz__ from [https://golang.org/dl/] e.g. [https://dl.google.com/go/go1.11.linux-amd64.tar.gz]
2. `tar -xzf go*.tar.gz`
3. `export PATH=${HOME}/new/go:${PATH}:${HOME}/bin`
3. `export PATH=${HOME}/new/go/bin:${PATH}:${HOME}/bin`
4. `cd go-ethereum`
5. `make geth`
6. `cp build/bin/geth ~/bin/`
......
File moved
File moved
File moved
File moved
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