diff --git a/README.md b/README.md index 41eb652f63a749861c6938bcf5089953857ea44f..a0782d8d50f977dea99a3e00b38ff3752e809d24 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # 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. diff --git a/bin/maymine.sh b/bin/maymine.sh index fae115555b516534eeebd3aa356ca26a9fe66604..594455c6220e8b2eb7551334f33ab929fbbce830 100755 --- a/bin/maymine.sh +++ b/bin/maymine.sh @@ -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 diff --git a/bin/rewind.sh b/bin/rewind.sh index c4d6529244e499cccb6f3f5735f941244e8ee2ea..947eb3c15d0e0af89c9e28b2906dd51d55ba6a9b 100755 --- a/bin/rewind.sh +++ b/bin/rewind.sh @@ -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 diff --git a/bin/txflood.sh b/bin/txflood.sh new file mode 100755 index 0000000000000000000000000000000000000000..1d20bbde2ce66a82153c4194a86f6ca80db75979 --- /dev/null +++ b/bin/txflood.sh @@ -0,0 +1,31 @@ +#!/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 + diff --git a/doc/compiling-geth-on-debian.md b/doc/compiling-geth-on-debian.md index f00cb3aa147cc08762c75cb040c52ab38fcad5c6..f55b6d07cf076d0c7eee1734f7312b1cc67b740f 100644 --- a/doc/compiling-geth-on-debian.md +++ b/doc/compiling-geth-on-debian.md @@ -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/` diff --git a/src/contract.GasWell.solc b/src/Distillery.sol similarity index 100% rename from src/contract.GasWell.solc rename to src/Distillery.sol diff --git a/src/contract.TimeStampAuthority.sol b/src/TimeStampAuthority.sol similarity index 100% rename from src/contract.TimeStampAuthority.sol rename to src/TimeStampAuthority.sol diff --git a/src/js.maymine b/src/maymine.js similarity index 100% rename from src/js.maymine rename to src/maymine.js diff --git a/src/js.rewind b/src/rewind.js similarity index 100% rename from src/js.rewind rename to src/rewind.js