From 0ecc79f697f649cdf823c401ff18295d70a8316b Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 21 Jan 2022 11:36:45 +0000 Subject: [PATCH 01/17] Bump clicada version --- root_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root_requirements.txt b/root_requirements.txt index 055b4c2..7a9dfd7 100644 --- a/root_requirements.txt +++ b/root_requirements.txt @@ -1,3 +1,3 @@ cic-cache==0.3.0a2 -clicada==0.0.2a3 +clicada==0.0.6 cic==0.0.2 -- 2.45.2 From 867c6d72dc3201bb364e39b24218eade523ee8a7 Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 21 Jan 2022 13:06:36 +0000 Subject: [PATCH 02/17] Upgrade clicaca; progress status, encryption of cache --- CHANGELOG | 10 ++++++++++ VERSION | 1 + requirements.txt | 39 ++++++++++++++++++++------------------- root_requirements.txt | 2 +- setup.sh | 2 +- 5 files changed, 33 insertions(+), 21 deletions(-) create mode 100644 CHANGELOG create mode 100644 VERSION diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..037cf85 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,10 @@ +- 0.0.3 + * Upgrade clicada: progress status and encryption of cache +- 0.0.2 + * Upgrade clicada to allow auto-configuration override from ~/.config/cic/clicada +- 0.0.1 + * Add cic-cli installer + * Add clicada installer + * Add systemd services + * Add cic-cache installer + * Add bloxberg installer diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..bcab45a --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0.3 diff --git a/requirements.txt b/requirements.txt index ae1bef4..d7385e4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,37 +1,38 @@ alembic==1.4.2 amqp==2.6.1 asn1crypto==1.4.0 -attrs==21.2.0 +attrs==21.4.0 billiard==3.6.4.0 cbor2==5.4.1 celery==4.4.7 certifi==2021.10.8 cffi==1.14.6 -chainlib==0.0.13 -chainlib-eth==0.0.13 +chainlib==0.0.17 +chainlib-eth==0.0.21 chainsyncer==0.0.7 -charset-normalizer==2.0.7 +charset-normalizer==2.0.10 cic==0.0.2 cic-cache==0.3.0a2 -cic-eth-registry==0.6.2 -cic-types==0.2.1a5 -clicada==0.0.2a3 +cic-contracts==0.0.5 +cic-eth-registry==0.6.6 +cic-types==0.2.1a8 +clicada==0.0.6a1 coincurve==15.0.0 -confini==0.5.3 +confini==0.5.4 cryptography==3.2.1 -cytoolz==0.11.0 +cytoolz==0.11.2 erc20-faucet==0.3.2 eth-accounts-index==0.1.2 eth-address-index==0.2.4 eth-contract-registry==0.7.2 -eth-erc20==0.1.2 +eth-erc20==0.1.6 eth-hash==0.3.2 eth-token-index==0.2.4 -eth-typing==2.2.2 -eth-utils==1.10.0 +eth-typing==3.0.0 +eth-utils==2.0.0 funga==0.5.1 -funga-eth==0.5.1 -hexathon==0.1.0 +funga-eth==0.5.3 +hexathon==0.1.1 http-hoba-auth==0.2.1a3 http-token-auth==0.0.1a6 idna==3.3 @@ -41,7 +42,7 @@ kombu==4.6.11 Mako==1.1.5 MarkupSafe==2.0.1 moolb==0.2.0 -okota==0.2.4 +okota==0.2.6 phonenumbers==8.12.12 potaahto==0.1.0 psycopg2==2.8.6 @@ -56,13 +57,13 @@ pytz==2021.3 PyYAML==5.3.1 redis==3.5.3 requests==2.26.0 -rlp==2.0.1 +rlp==3.0.0 semver==2.13.0 six==1.15.0 SQLAlchemy==1.3.20 -toolz==0.11.1 -urllib3==1.26.7 -usumbufu==0.3.3a3 +toolz==0.11.2 +urllib3==1.26.8 +usumbufu==0.3.5 uWSGI==2.0.19.1 vine==1.3.0 vobject==0.9.6.1 diff --git a/root_requirements.txt b/root_requirements.txt index 7a9dfd7..8d20843 100644 --- a/root_requirements.txt +++ b/root_requirements.txt @@ -1,3 +1,3 @@ cic-cache==0.3.0a2 -clicada==0.0.6 +clicada==0.0.6a1 cic==0.0.2 diff --git a/setup.sh b/setup.sh index 83a5fd4..21ef5ff 100644 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash want_cic_cache_version=0.3.0a2 -want_cicada_version=0.0.2a3 +want_cicada_version=0.0.6a1 #INSTALL_EVM=bloxberg . aux/bdbg/bdbg.sh -- 2.45.2 From d404ca404641e886af91614b06df57ba46904c33 Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 21 Jan 2022 14:42:46 +0000 Subject: [PATCH 03/17] Upgrade clicada; auto-complete origin when incomplete url --- requirements.txt | 2 +- root_requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index d7385e4..5829bd9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,7 @@ cic-cache==0.3.0a2 cic-contracts==0.0.5 cic-eth-registry==0.6.6 cic-types==0.2.1a8 -clicada==0.0.6a1 +clicada==0.0.6a2 coincurve==15.0.0 confini==0.5.4 cryptography==3.2.1 diff --git a/root_requirements.txt b/root_requirements.txt index 8d20843..d35ff40 100644 --- a/root_requirements.txt +++ b/root_requirements.txt @@ -1,3 +1,3 @@ cic-cache==0.3.0a2 -clicada==0.0.6a1 +clicada==0.0.6a2 cic==0.0.2 -- 2.45.2 From dc59cf619be550773554a03a2289273c5b70981b Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 21 Jan 2022 14:46:14 +0000 Subject: [PATCH 04/17] Explicity want for clicada --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 21ef5ff..1872340 100644 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash want_cic_cache_version=0.3.0a2 -want_cicada_version=0.0.6a1 +want_cicada_version=0.0.6a2 #INSTALL_EVM=bloxberg . aux/bdbg/bdbg.sh -- 2.45.2 From a5dc1c83b6d1ca1f3d01327bf5eb7894fc287b04 Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 21 Jan 2022 15:18:49 +0000 Subject: [PATCH 05/17] Correct check bloxberg test --- setup_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_check.sh b/setup_check.sh index 12890e9..f165717 100644 --- a/setup_check.sh +++ b/setup_check.sh @@ -7,7 +7,7 @@ function checkk { fi } -if [ "$INSTALL_EVM" == "bloxberg"] ; then +if [ "$INSTALL_EVM" == "bloxberg" ] ; then exec=(systemctl git gcc pip python3 sqlite3 clang rustup cmake) else exec=(systemctl git gcc pip python3 sqlite3) -- 2.45.2 From 2063a52f04387f86c316159a09c736567ee3220b Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 21 Jan 2022 15:23:11 +0000 Subject: [PATCH 06/17] Disambiguate env setup from key setup --- setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 1872340..9141ae0 100644 --- a/setup.sh +++ b/setup.sh @@ -39,7 +39,7 @@ dbg $dbg_debug "identify root values" set -e # check if we have existing setup -if [ ! -f "$HOME/.config/cic/staff-client/key_fingerprint" ]; then +if [ ! -e "$HOME/.config/cic/staff-client/.envinit" ]; then dbg $dbg_debug "load default environment" config_directives=(CIC_REGISTRY_ADDRESS CIC_TRUST_ADDRESS META_URL TX_CACHE_URL CHAIN_SPEC) @@ -83,6 +83,8 @@ if [ ! -f "$HOME/.config/cic/staff-client/key_fingerprint" ]; then export AUTH_KEY=`cat $HOME/.config/cic/staff-client/key_fingerprint` export AUTH_KEYRING_PATH=$HOME/.config/cic/staff-client/.gnupg export AUTH_DB_PATH=$HOME/.local/share/cic/clicada + + touch "$HOME/.config/cic/staff-client/.envinit" fi set +e -- 2.45.2 From f975d6b43aff843bf6eb339e251296cf215ad43c Mon Sep 17 00:00:00 2001 From: lash Date: Mon, 24 Jan 2022 09:09:15 +0000 Subject: [PATCH 07/17] Upgrade clicada to release candidate --- root_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root_requirements.txt b/root_requirements.txt index d35ff40..45d9380 100644 --- a/root_requirements.txt +++ b/root_requirements.txt @@ -1,3 +1,3 @@ cic-cache==0.3.0a2 -clicada==0.0.6a2 +clicada==0.0.6rc1 cic==0.0.2 -- 2.45.2 From 19016be7f8384dd7d2bd65a8ae70d0ad43a83851 Mon Sep 17 00:00:00 2001 From: lash Date: Mon, 24 Jan 2022 12:06:26 +0000 Subject: [PATCH 08/17] Manual bump clicada req! --- requirements.txt | 2 +- setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5829bd9..3899d0b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,7 @@ cic-cache==0.3.0a2 cic-contracts==0.0.5 cic-eth-registry==0.6.6 cic-types==0.2.1a8 -clicada==0.0.6a2 +clicada==0.0.6rc1 coincurve==15.0.0 confini==0.5.4 cryptography==3.2.1 diff --git a/setup.sh b/setup.sh index 9141ae0..281fd2c 100644 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash want_cic_cache_version=0.3.0a2 -want_cicada_version=0.0.6a2 +want_cicada_version=0.0.6rc1 #INSTALL_EVM=bloxberg . aux/bdbg/bdbg.sh -- 2.45.2 From f5450f52888d1e5aad9264005aa17a26b7bdd047 Mon Sep 17 00:00:00 2001 From: William Luke Date: Tue, 25 Jan 2022 16:55:15 +0300 Subject: [PATCH 09/17] Add Uninstall script --- uninstall.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 uninstall.sh diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 0000000..2d52a30 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,15 @@ +# Usefull when an install fails half way through + +red=`tput setaf 1` +reset=`tput sgr0` +echo -n "${red}WARNING:${reset} This will delete all your keys and settings. Continue? (y/n):" + read confirmed + if [ "$confirmed" == "y" ]; then + echo "Deleting all keys and settings..." + rm -rf $HOME/.local/share/cic/ + rm -rf $HOME/.config/cic + echo "Done" + else + echo "Aborting" + fi +exit 0 \ No newline at end of file -- 2.45.2 From 96994ef3fc33cc84bf287283a218d8fbaab46340 Mon Sep 17 00:00:00 2001 From: lash Date: Tue, 25 Jan 2022 14:12:57 +0000 Subject: [PATCH 10/17] Use ge CA for env retrieve --- setup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 281fd2c..3f8cbf8 100644 --- a/setup.sh +++ b/setup.sh @@ -13,7 +13,8 @@ PIP_EXTRA_ARGS=$PIP_EXTRA_ARGS PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net} PIP_INDEX_URL=${PIP_INDEX_URL:-"https://pypi.org/simple"} CIC_SETUP_TRUSTED_FINGERPRINT=${CIC_SETUP_TRUSTED_FINGERPRINT:-0826EDA1702D1E87C6E2875121D2E7BB88C2A746} -CIC_ROOT_URL=${CIC_ROOT_URL:-https://root.grassrootseconomics.net} +CIC_ROOT_URL=${CIC_ROOT_URL:-https://root.grassrootseconomics.net/env/dev} +CIC_ROOT_CA_FILE=${CIC_ROOT_CA_FILE:-keys/ge.ca} if [ "$UID" -eq 0 ]; then dbg $dbg_error "This cannot be run as root" @@ -48,7 +49,7 @@ if [ ! -e "$HOME/.config/cic/staff-client/.envinit" ]; then v=${!c} if [ -z "$v" ]; then d=`mktemp -d` - curl -X GET $CIC_ROOT_URL/cic-staff-client/$c -o $d/$c + curl -X GET --cacert $CIC_ROOT_CA_FILE $CIC_ROOT_URL/$c -o $d/$c gpg --homedir $HOME/.local/share/cic/.gnupg --verify $d/$c v=`gpg --homedir $HOME/.local/share/cic/.gnupg -d $d/$c` echo $v >> $t -- 2.45.2 From 2b8649feef07a4e16b4ac9f0de2b35a81978ef24 Mon Sep 17 00:00:00 2001 From: lash Date: Wed, 26 Jan 2022 06:03:25 +0000 Subject: [PATCH 11/17] ge.ca --- keys/ge.ca | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 keys/ge.ca diff --git a/keys/ge.ca b/keys/ge.ca new file mode 100644 index 0000000..c3b078b --- /dev/null +++ b/keys/ge.ca @@ -0,0 +1,35 @@ +-----BEGIN CERTIFICATE----- +MIIGKTCCBBGgAwIBAgIUSYquRAO8Rq2txD1CQwg2VikVl3wwDQYJKoZIhvcNAQEL +BQAwgaMxCzAJBgNVBAYTAktFMQ8wDQYDVQQIDAZLaWxpZmkxDzANBgNVBAcMBktp +bGlmaTEdMBsGA1UECgwUR3Jhc3Nyb290cyBFY29ub21pY3MxJTAjBgNVBAMMHHJv +b3QuZ3Jhc3Nyb290c2Vjb25vbWljcy5uZXQxLDAqBgkqhkiG9w0BCQEWHWFkbWlu +QGdyYXNzcm9vdHNlY29ub21pY3MubmV0MB4XDTIyMDEyNTExMTgzM1oXDTI3MDkw +NDExMTgzM1owgaMxCzAJBgNVBAYTAktFMQ8wDQYDVQQIDAZLaWxpZmkxDzANBgNV +BAcMBktpbGlmaTEdMBsGA1UECgwUR3Jhc3Nyb290cyBFY29ub21pY3MxJTAjBgNV +BAMMHHJvb3QuZ3Jhc3Nyb290c2Vjb25vbWljcy5uZXQxLDAqBgkqhkiG9w0BCQEW +HWFkbWluQGdyYXNzcm9vdHNlY29ub21pY3MubmV0MIICIjANBgkqhkiG9w0BAQEF +AAOCAg8AMIICCgKCAgEAw9FBgX2pe3g5EcNYvlMaGi9VuNgEwZhxy9qSqTfenC+G +kHxds/1wRbGG2Z+2VtQ2ab5mad0ecc6Ojbh6Yz7k2wY+zR0pYav0o6jnj7vn/k4O +d6NBmcL/qdwBfPM33HHWSrMKVN5dsBk96dnOBenIgN04lTtNmjsie2iPr/48WFTJ +udi9//V4EgNkUd6Sequ9S9UlhovCkYhFVQ0HiIVV+HegYJ1VY95rNH8BCELDXFgy +xo9xRF21xQqIxXiBz59GsDe3oLSvCUbMxG8tKlNsUfIsJWwQc1usrFjJ+mH5cVe5 +RfE3kKPO/e6G4kqPobkZStFEXJJq/zQS4nYpqt4+vtfohzQAn5lucLX391hlqzqc +G6/zYxN6BysyNA4ON30uNSf4FiC/prqGrI763AVIj5jJ/nX1++bt/fj35+3CS0pE +yDPVdsnwQSv9glaIf/OmTwhS+7PulomKvZVKvF3pDjlKu+QPQLxVs6DVt1JuWicw +2wD4jKZNDbVRYJf3UcFy8jX1fWC0JT6xVbdB/ujaB7FkPBTIQTo3UDSO5lph+CKE +jGsMeuYBgPcJ1XN9V0/G+sT5T3bZ4tPoFG0TrsJyjd1Q+qrGV6Ymh3m4rgvxzsJN +IDK1evdBpwASdI+Zsm5cbmkNMJrVpUTnML5niLNd3mKss7CXPcuogarLIFwP78MC +AwEAAaNTMFEwHQYDVR0OBBYEFJRopUpiluMePMGxxsWLyfMPBAqBMB8GA1UdIwQY +MBaAFJRopUpiluMePMGxxsWLyfMPBAqBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI +hvcNAQELBQADggIBAGycDJGE4DeJ/6X5V90ejTmujmb6u4sSEDlMO6Sly9ERcUaw +DGhA5lvoCik21c8nboRv3klzu4VQgzRIpqE/1n91o49QsjKjiHUSJmbER/bdnGoF +HyqwD9PGODgMJwZ8gqsRQoxFRsbKiw5Bejq9l9tkSntxPTXgRP5f6yhfeq1I3oB9 +hdPhsDBthNbRr7lMh45xM1lLgj0zvefEaRti68N9/1NSwX0gaYvYTZmaSyH/NWyy +QBo3EDC+WFU6vdl/GN7axo1DWMNRgFPK2CA8KlLSBxNcDEFfbcqqlHjLNk0Zk8FC +YxrnCl+wwNWDNwj6Dcy0iGaioohLftXPvwvIgTj/zkWWEbHhugvTvVp8dciVwqu+ +HztfUZPjbb/E1gq6AHIMFbHxyf/3GyAaZl/ij8bHmZfgn4jrwSw2pJFvu8m7i4i9 ++HMScGMJIMgOXhUUPTaMJNkfS+Bv+pxNFy6D/62O8gugqs/Z3p6r3gtkv2AiKHI8 +PVqIZp+0k5SqHKuZw+xxU6phxjQWQInz7zRvVno1LkVxXeKgiv/WDLRZLdHnnhuu +32FsNGKAJ0/4YM3/tiLkpVa9ElmE6BY4V0sBy63gG0UyHRIiQuPgGmlpM+qXTX87 +gdWXxsa421+RpqUXu7RfXsACtgWKOir8NZqitII7AAiCXDxIRiY+EB5EZkN/ +-----END CERTIFICATE----- -- 2.45.2 From 6383cce853b595b78eb686984b6e17c690f09751 Mon Sep 17 00:00:00 2001 From: William Luke Date: Wed, 26 Jan 2022 11:16:41 +0300 Subject: [PATCH 12/17] Add install oneliner and rsync --- install.sh | 32 ++++++++++++++++++++++++++++++++ rsync-install-script.sh | 9 +++++++++ 2 files changed, 41 insertions(+) create mode 100644 install.sh create mode 100644 rsync-install-script.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..b79b08f --- /dev/null +++ b/install.sh @@ -0,0 +1,32 @@ +# Example Usage +# bash <(curl -s https://pip.grassrootseconomics.net/cic-staff-installer.sh) -h +# This is currently living on at pip because root is using a self signed cert +# When changes are made to this file you must run bash ./rsync-install-script.sh to sync it to the server + +branch='master' +verbose='false' + +print_usage() { + printf "CIC Staff Installer + Options: + -b Name of the branch you want use to install + -v Verbose + -h Print this help message +" +} + +while getopts 'hb:v' flag; do + case "${flag}" in + b) branch="${OPTARG}" ;; + v) verbose='true' ;; + h) print_usage + exit 0 ;; + *) print_usage + exit 1 ;; + esac +done + +temp_dir=`mktemp -d` +git clone -b $branch https://git.grassecon.net/grassrootseconomics/cic-staff-installer.git $temp_dir +cd $temp_dir +bash setup.sh \ No newline at end of file diff --git a/rsync-install-script.sh b/rsync-install-script.sh new file mode 100644 index 0000000..f17a36e --- /dev/null +++ b/rsync-install-script.sh @@ -0,0 +1,9 @@ +host='root.grassrootseconomics.net' +file_to_sync='./install.sh' +distination_dir='/usr/local/share/python/packages' +distination_file_name='cic-staff-installer.sh' +user='root' + +echo Syncing $file_to_sync to $distination_dir as $user on $host + +rsync -avz --progress $file_to_sync $user@$host:$distination_dir/$distination_file_name -- 2.45.2 From 6892f0d08fca89b79353ab10e0a1acfcdacb3854 Mon Sep 17 00:00:00 2001 From: William Luke Date: Thu, 27 Jan 2022 12:25:17 +0300 Subject: [PATCH 13/17] Add support for Kitabu --- install.sh | 7 +- setup.sh | 2 +- setup_bloxberg.sh | 48 -- setup_evm.sh | 80 ++ setup_systemd.sh | 2 +- systemd/env/01-bloxberg.conf | 1 + systemd/env/01-kitabu.conf | 3 + systemd/{bloxberg.service => node.service} | 2 +- uninstall-evm.sh | 32 + uninstall.sh | 2 +- var/kitabu/bootnode.toml | 45 + var/kitabu/kitabu.json | 934 +++++++++++++++++++++ 12 files changed, 1104 insertions(+), 54 deletions(-) delete mode 100644 setup_bloxberg.sh create mode 100644 setup_evm.sh create mode 100644 systemd/env/01-kitabu.conf rename systemd/{bloxberg.service => node.service} (74%) create mode 100644 uninstall-evm.sh create mode 100644 var/kitabu/bootnode.toml create mode 100644 var/kitabu/kitabu.json diff --git a/install.sh b/install.sh index b79b08f..3219392 100644 --- a/install.sh +++ b/install.sh @@ -5,19 +5,22 @@ branch='master' verbose='false' +evm= # kitabu | bloxberg print_usage() { printf "CIC Staff Installer Options: -b Name of the branch you want use to install + -e Name of the EVM you want to install (kitabu, bloxberg) -v Verbose -h Print this help message " } -while getopts 'hb:v' flag; do +while getopts 'e:hb:v' flag; do case "${flag}" in b) branch="${OPTARG}" ;; + e) evm="${OPTARG}" ;; v) verbose='true' ;; h) print_usage exit 0 ;; @@ -25,7 +28,7 @@ while getopts 'hb:v' flag; do exit 1 ;; esac done - +export INSTALL_EVM=${evm} temp_dir=`mktemp -d` git clone -b $branch https://git.grassecon.net/grassrootseconomics/cic-staff-installer.git $temp_dir cd $temp_dir diff --git a/setup.sh b/setup.sh index 3f8cbf8..b0bd82e 100644 --- a/setup.sh +++ b/setup.sh @@ -168,7 +168,7 @@ set +a . setup_systemd.sh if [ ! -z $INSTALL_EVM ]; then - . setup_${INSTALL_EVM}.sh + . setup_evm.sh fi diff --git a/setup_bloxberg.sh b/setup_bloxberg.sh deleted file mode 100644 index d5d151e..0000000 --- a/setup_bloxberg.sh +++ /dev/null @@ -1,48 +0,0 @@ -. aux/bdbg/bdbg.sh -. setup_path.sh - -GIT_OPENETHEREUM=${GIT_OPENETHEREUM:-https://github.com/openethereum/openethereum} -OPENETHEREUM_PATH=${OPENETHEREUM_PATH:-$HOME/.local/bin/parity} -openethereum_dir=`realpath $(dirname $OPENETHEREUM_PATH)` -default_openethereum_run=$HOME/.local/share/io.parity.ethereum/bloxberg -default_openethereum_config=$HOME/.config/io.parity.ethereum/bloxberg -export OPENETHEREUM_RUN=${OPENETHEREUM_RUN:-$default_openethereum_run} -export OPENETHEREUM_CONFIG=${OPENETHEREUM_CONFIG:-$default_openethereum_config} - -install_env= -if [ ! -f $OPENETHEREUM_PATH ]; then - dbg $dbg_debug "downloading bloxberg node" - t=`mktemp -d` - pushd $t - install_env=1 - git clone $GIT_OPENETHEREUM - cd openethereum - git checkout 2662d1925ec794f3ad7c5759b2412ff5128d259b - rustup install 1.47.0 - cargo build --release --features final - cp -v $t/target/release/parity $HOME/.local/bin/ - export OPENETHEREUM_PATH=$HOME/.local/bin/parity -else - dbg $dbg_info "found bloxberg node executable in $OPENETHEREUM_PATH" -fi - -#OPENETHEREUM_RUN=$HOME/.local/share/bloxberg -if [ ! -d $OPENETHEREUM_RUN ]; then - mkdir -vp $OPENETHEREUM_RUN/bootnode - mkdir -vp $OPENETHEREUM_CONFIG - touch $OPENETHEREUM_CONFIG/bootnode.pwd - dd status=xfer if=/dev/urandom bs=32 count=1 2> /dev/null | hexdump -v -n 32 -e '1/1 "%02x"' > $OPENETHEREUM_CONFIG/bootnode.pwd - chmod -v 400 $OPENETHEREUM_CONFIG/bootnode.pwd - ./aux/bash-templater/templater.sh var/bloxberg/bootnode.toml > $OPENETHEREUM_CONFIG/bootnode.toml - cp -v var/bloxberg/bloxberg.json $OPENETHEREUM_CONFIG/ - cp -v var/bloxberg/bootnodes.txt $OPENETHEREUM_CONFIG/ - cp -v systemd/bloxberg.service $HOME/.config/systemd/user/ - ./aux/bash-templater/templater.sh systemd/env/01-bloxberg.conf > $HOME/.config/environment.d/01-bloxberg.conf - systemctl --user daemon-reload -fi - -update_path $openethereum_dir - -if [ ! -z "$install_env" ]; then - popd -fi diff --git a/setup_evm.sh b/setup_evm.sh new file mode 100644 index 0000000..9be6c6b --- /dev/null +++ b/setup_evm.sh @@ -0,0 +1,80 @@ +. aux/bdbg/bdbg.sh +. setup_path.sh +# set -o xtrace +GIT_OPENETHEREUM=${GIT_OPENETHEREUM:-https://github.com/openethereum/openethereum} + +default_openethereum_chain="kitabu" # bloxberg | kitabu +export OPENETHEREUM_CHAIN=${INSTALL_EVM:-$default_openethereum_chain} + +OPENETHEREUM_PATH=${OPENETHEREUM_PATH:-$HOME/.local/bin/parity} +openethereum_dir=`realpath $(dirname $OPENETHEREUM_PATH)` + +default_openethereum_run=$HOME/.local/share/io.parity.ethereum/$OPENETHEREUM_CHAIN +default_openethereum_config=$HOME/.config/io.parity.ethereum/$OPENETHEREUM_CHAIN + +export OPENETHEREUM_RUN=${OPENETHEREUM_RUN:-$default_openethereum_run} +export OPENETHEREUM_CONFIG=${OPENETHEREUM_CONFIG:-$default_openethereum_config} +default_openethereum_type="binary" # source | binary +export OPENETHEREUM_TYPE=${OPENETHEREUM_TYPE:-$default_openethereum_type} + +download_openethereum() { + openethereum_version="3.3.3" + if [ ! -f "$PWD/openethereum-linux-v$openethereum_version.zip" ]; then + wget https://github.com/openethereum/openethereum/releases/download/v$openethereum_version/openethereum-linux-v$openethereum_version.zip + fi + unzip openethereum-linux-v$openethereum_version.zip + rm openethereum-linux-v$openethereum_version.zip + ./openethereum --version + mv ./openethereum $openethereum_dir/parity + export OPENETHEREUM_PATH=$openethereum_dir/parity +} +build_openethereum() { + dbg $dbg_debug "downloading bloxberg node" + t=`mktemp -d` + pushd $t + install_env=1 + git clone $GIT_OPENETHEREUM + cd openethereum + git checkout 2662d1925ec794f3ad7c5759b2412ff5128d259b + rustup install 1.47.0 + cargo build --release --features final + cp -v $t/target/release/parity $openethereum_dir + export OPENETHEREUM_PATH=$openethereum_dir/parity +} +install_env= +if [ ! -f $OPENETHEREUM_PATH ]; then +# Download and Build parity from git $GIT_OPENETHEREUM + if [ "$OPENETHEREUM_TYPE" = "source" ]; then + build_openethereum + else + download_openethereum + fi +else + dbg $dbg_info "found bloxberg node executable in $OPENETHEREUM_PATH" +fi + +#OPENETHEREUM_RUN=~/.local/share/io.parity.ethereum/$OPENETHEREUM_CHAIN +if [ ! -d $OPENETHEREUM_RUN ]; then + mkdir -vp $OPENETHEREUM_RUN/bootnode + mkdir -vp $OPENETHEREUM_CONFIG + touch $OPENETHEREUM_CONFIG/bootnode.pwd + dd status=xfer if=/dev/urandom bs=32 count=1 2> /dev/null | hexdump -v -n 32 -e '1/1 "%02x"' > $OPENETHEREUM_CONFIG/bootnode.pwd + chmod -v 400 $OPENETHEREUM_CONFIG/bootnode.pwd + ./aux/bash-templater/templater.sh var/$OPENETHEREUM_CHAIN/bootnode.toml > $OPENETHEREUM_CONFIG/bootnode.toml + cp -v var/$OPENETHEREUM_CHAIN/$OPENETHEREUM_CHAIN.json $OPENETHEREUM_CONFIG/ + if [ -f var/$OPENETHEREUM_CHAIN/bootnodes.txt ] ; then + cp -v var/$OPENETHEREUM_CHAIN/bootnodes.txt $OPENETHEREUM_CONFIG/ + fi + ./aux/bash-templater/templater.sh systemd/node.service > $HOME/.config/systemd/user/$OPENETHEREUM_CHAIN.service + ./aux/bash-templater/templater.sh systemd/env/01-$OPENETHEREUM_CHAIN.conf > $HOME/.config/environment.d/01-$OPENETHEREUM_CHAIN.conf + systemctl --user daemon-reload +else + echo Found $OPENETHEREUM_RUN directory! Skipping +fi + + +update_path $openethereum_dir + +if [ ! -z "$install_env" ]; then + popd +fi diff --git a/setup_systemd.sh b/setup_systemd.sh index 7a13e8f..1ddccd8 100644 --- a/setup_systemd.sh +++ b/setup_systemd.sh @@ -7,7 +7,7 @@ _level=2 _debug=1 cp -v systemd/cic-cache-server.service $HOME/.config/systemd/user/ -cp -v systemd/bloxberg.service $HOME/.config/systemd/user/ + dbg $dbg_debug "writing rendered services file $p" export PYTHON_BIN_PATH=`. aux/pylocation/pylocation.sh 2> /dev/null` diff --git a/systemd/env/01-bloxberg.conf b/systemd/env/01-bloxberg.conf index a531617..afe1e7d 100644 --- a/systemd/env/01-bloxberg.conf +++ b/systemd/env/01-bloxberg.conf @@ -1,2 +1,3 @@ OPENETHEREUM_PATH={{OPENETHEREUM_PATH}} OPENETHEREUM_CONFIG={{OPENETHEREUM_CONFIG}} +OPENETHEREUM_CHAIN={{OPENETHEREUM_CHAIN}} diff --git a/systemd/env/01-kitabu.conf b/systemd/env/01-kitabu.conf new file mode 100644 index 0000000..afe1e7d --- /dev/null +++ b/systemd/env/01-kitabu.conf @@ -0,0 +1,3 @@ +OPENETHEREUM_PATH={{OPENETHEREUM_PATH}} +OPENETHEREUM_CONFIG={{OPENETHEREUM_CONFIG}} +OPENETHEREUM_CHAIN={{OPENETHEREUM_CHAIN}} diff --git a/systemd/bloxberg.service b/systemd/node.service similarity index 74% rename from systemd/bloxberg.service rename to systemd/node.service index f6e7d54..c067f6d 100644 --- a/systemd/bloxberg.service +++ b/systemd/node.service @@ -1,5 +1,5 @@ [Unit] -Description=Bloxberg openethereum node +Description="{{OPENETHEREUM_CHAIN}} openethereum node" After=network.target [Service] diff --git a/uninstall-evm.sh b/uninstall-evm.sh new file mode 100644 index 0000000..7e9c995 --- /dev/null +++ b/uninstall-evm.sh @@ -0,0 +1,32 @@ +red=`tput setaf 1` +reset=`tput sgr0` +echo -n " +${red}WARNING:${reset} The following will be DELETED if present: + Directories: + $HOME/.local/share/io.parity.ethereum + $HOME/.config/io.parity.ethereum + Files: + $HOME/.local/bin/openethereum + $HOME/.local/bin/parity + $HOME/.config/systemd/user/kitabu.service + $HOME/.config/systemd/user/bloxberg.service + $HOME/.config/environment.d/01-bloxberg.conf + $HOME/.config/environment.d/01-kitabu.conf + +Would you still like to continue? (y/n):" + read confirmed + if [ "$confirmed" == "y" ]; then + echo "Deleting..." + rm -rf $HOME/.local/share/io.parity.ethereum + rm -rf $HOME/.config/io.parity.ethereum + rm $HOME/.local/bin/openethereum + rm $HOME/.local/bin/parity + rm $HOME/.config/systemd/user/kitabu.service + rm $HOME/.config/systemd/user/bloxberg.service + rm $HOME/.config/environment.d/01-bloxberg.conf + rm $HOME/.config/environment.d/01-kitabu.conf + echo "Done" + else + echo "Aborting" + fi +exit 0 diff --git a/uninstall.sh b/uninstall.sh index 2d52a30..722c502 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -12,4 +12,4 @@ echo -n "${red}WARNING:${reset} This will delete all your keys and settings. Con else echo "Aborting" fi -exit 0 \ No newline at end of file +exit 0 diff --git a/var/kitabu/bootnode.toml b/var/kitabu/bootnode.toml new file mode 100644 index 0000000..acf7169 --- /dev/null +++ b/var/kitabu/bootnode.toml @@ -0,0 +1,45 @@ + +[parity] +chain = "kitabu.json" +base_path = "data" + +[network] +port = 30303 +#reserved_peers = "{{CONFIG_DIR}}/bootnodes.txt" +# reserved_only = true +max_peers = 10 +snapshot_peers = 25 +#nat = "extip:100.102.26.121" +nat = "extip:159.223.92.107" + +[rpc] +port = 8545 +apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"] +interface = "all" +cors = ["*"] + +[websockets] +disable = false +port = 8546 +interface = "all" +origins = ["all"] + +[account] +password = ["kitabu.pwd"] + +[mining] +#CHANGE ENGINE SIGNER TO VALIDATOR ADDRESS +engine_signer = "0x4081020ac03e06391b6045ad14553e75edec9e67" +reseal_on_txs = "none" +force_sealing = true +min_gas_price = 1 +gas_floor_target = "1" + +[footprint] +tracing = "on" +pruning = "archive" +pruning_history = 256 +cache_size_db = 2000 + +[misc] +log_file = "kitabu.log" diff --git a/var/kitabu/kitabu.json b/var/kitabu/kitabu.json new file mode 100644 index 0000000..d6a23f8 --- /dev/null +++ b/var/kitabu/kitabu.json @@ -0,0 +1,934 @@ +{ + "name": "Kitabu Sarafu", + "dataDir": "kitabu_sarafu", + "engine": { + "clique": { + "params": { + "period": 2, + "epoch": 30000, + "validators": [ + "0x4081020ac03e06391b6045ad14553e75edec9e67" + ] + } + } + }, + "params": { + "accountStartNonce": "0x0", + "chainID": "0x1a0a", + "eip140Transition": "0x0", + "eip145Transition": "0x0", + "eip150Transition": "0x0", + "eip155Transition": "0x0", + "eip160Transition": "0x0", + "eip161abcTransition": "0x0", + "eip161dTransition": "0x0", + "eip211Transition": "0x0", + "eip214Transition": "0x0", + "eip658Transition": "0x0", + "eip1014Transition": "0x0", + "eip1052Transition": "0x0", + "eip1283Transition": "0x0", + "eip1283DisableTransition": "0x0", + "eip1283ReenableTransition": "0x0", + "eip1344Transition": "0x0", + "eip1706Transition": "0x0", + "eip1884Transition": "0x0", + "eip2028Transition": "0x0", + "eip1559Transition": "0x1", + "eip1559BaseFeeMaxChangeDenominator": "0x8", + "eip1559ElasticityMultiplier": "0x2", + "gasLimitBoundDivisor": "0x400", + "maxCodeSize": "0x6000", + "maxCodeSizeTransition": "0x0", + "maximumExtraDataSize": "0xffff", + "minGasLimit": "0x1", + "networkID": "0x1a0a" + }, + "genesis": { + "author": "0x0000000000000000000000000000000000000000", + "difficulty": "0x1", + "extraData": "0x536172616675204b61726962752053616e6100000000000000000000000000005C5aB0D602EEF41f82B6fc087A24e61383589C398c6f7b75d90c3b32bdc9b4fcfbb4ad43c853446a2c0c9d3a9590a3349c8e45ce50446bd276cbb99c1f38132cd7e520d6be0ccba78acc59ab50a82f711ff7cb9d00", + "gasLimit": "0xb00000", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "seal": { + "ethereum": { + "nonce": "0x0000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "timestamp": "0x5c51a607" + }, + "accounts": { + "0x0000000000000000000000000000000000000000": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000001": { + "balance": "0x1", + "builtin": { + "name": "ecrecover", + "pricing": { + "linear": { + "base": 3000, + "word": 0 + } + } + } + }, + "0x0000000000000000000000000000000000000002": { + "balance": "0x1", + "builtin": { + "name": "sha256", + "pricing": { + "linear": { + "base": 60, + "word": 12 + } + } + } + }, + "0x0000000000000000000000000000000000000003": { + "balance": "0x1", + "builtin": { + "name": "ripemd160", + "pricing": { + "linear": { + "base": 600, + "word": 120 + } + } + } + }, + "0x0000000000000000000000000000000000000004": { + "balance": "0x1", + "builtin": { + "name": "identity", + "pricing": { + "linear": { + "base": 15, + "word": 3 + } + } + } + }, + "0x0000000000000000000000000000000000000005": { + "balance": "0x1", + "builtin": { + "name": "modexp", + "pricing": { + "0x0": { + "info": "EIP-198: Big integer modular exponentiation. Byzantium hardfork", + "price": { + "modexp": { + "divisor": 20 + } + } + }, + "0x441064": { + "info": "EIP-2565: ModExp Gas Cost. Berlin hardfork (4_460_644)", + "price": { + "modexp2565": {} + } + } + } + } + }, + "0x0000000000000000000000000000000000000006": { + "balance": "0x1", + "builtin": { + "name": "alt_bn128_add", + "pricing": { + "0": { + "price": { "alt_bn128_const_operations": { "price": 500 } } + }, + "0x17d433": { + "info": "EIP 1108 transition at block 1_561_651 (0x17d433)", + "price": { "alt_bn128_const_operations": { "price": 150 } } + } + } + } + }, + "0x0000000000000000000000000000000000000007": { + "balance": "0x1", + "builtin": { + "name": "alt_bn128_mul", + "pricing": { + "0": { + "price": { "alt_bn128_const_operations": { "price": 40000 } } + }, + "0x17d433": { + "info": "EIP 1108 transition at block 1_561_651 (0x17d433)", + "price": { "alt_bn128_const_operations": { "price": 6000 } } + } + } + } + }, + "0x0000000000000000000000000000000000000008": { + "balance": "0x1", + "builtin": { + "name": "alt_bn128_pairing", + "pricing": { + "0": { + "price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } + }, + "0x17d433": { + "info": "EIP 1108 transition at block 1_561_651 (0x17d433)", + "price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 } } + } + } + } + }, + "0x0000000000000000000000000000000000000009": { + "balance": "0x1", + "builtin": { + "name": "blake2_f", + "activate_at": "0x17d433", + "pricing": { + "blake2_f": { + "gas_per_round": 1 + } + } + } + }, + "0x000000000000000000000000000000000000000a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000000b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000000c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000000d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000000e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000000f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000010": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000011": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000012": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000013": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000014": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000015": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000016": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000017": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000018": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000019": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000020": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000021": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000022": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000023": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000024": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000025": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000026": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000027": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000028": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000029": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000030": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000031": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000032": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000033": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000034": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000035": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000036": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000037": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000038": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000039": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000040": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000041": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000042": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000043": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000044": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000045": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000046": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000047": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000048": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000049": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000050": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000051": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000052": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000053": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000054": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000055": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000056": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000057": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000058": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000059": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000060": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000061": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000062": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000063": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000064": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000065": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000066": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000067": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000068": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000069": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000070": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000071": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000072": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000073": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000074": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000075": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000076": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000077": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000078": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000079": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000080": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000081": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000082": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000083": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000084": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000085": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000086": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000087": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000088": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000089": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000090": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000091": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000092": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000093": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000094": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000095": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000096": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000097": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000098": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000099": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009f": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000aa": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ab": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ac": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ad": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ae": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000af": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ba": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000bb": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000bc": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000bd": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000be": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000bf": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ca": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000cb": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000cc": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000cd": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ce": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000cf": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000da": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000db": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000dc": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000dd": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000de": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000df": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ea": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000eb": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ec": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ed": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ee": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ef": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000fa": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000fb": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000fc": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000fd": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000fe": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ff": { + "balance": "0x1" + }, + "0x4081020ac03e06391b6045ad14553e75edec9e67": { + "balance": "0x152d02c7e14af6800000" + } + } +} -- 2.45.2 From 3fbaed4c7117232c00c308d7844b7f69f5ec8f5d Mon Sep 17 00:00:00 2001 From: William Luke Date: Thu, 27 Jan 2022 15:19:16 +0300 Subject: [PATCH 14/17] Add personal pgp key --- ...5D7EB6661AD0424219FA3AB4F81B106B081C23.asc | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 keys/215D7EB6661AD0424219FA3AB4F81B106B081C23.asc diff --git a/keys/215D7EB6661AD0424219FA3AB4F81B106B081C23.asc b/keys/215D7EB6661AD0424219FA3AB4F81B106B081C23.asc new file mode 100644 index 0000000..d6c57fd --- /dev/null +++ b/keys/215D7EB6661AD0424219FA3AB4F81B106B081C23.asc @@ -0,0 +1,41 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGNBGHv7EEBDADiFgzf+SixK1Wnj4A8tutjX6/k4cwqpna3FIolCCZO+6N9bDPH +KY4QoDJdEDwfgtSiMy9NFAuqdSifVCYkkoQxT0b9Wk7o8N0cjVFoNyniwNcD5ZBJ +tB5eUvq3VTUgJT0S2QavLG2/owVUi92qezXZ/AvYMmSVh/j8hJO7Y+HtTdddb9Yr +HycNNVBCBo8/LBwq3YmoE4i1V014hM1sWgvoEG/eOMs4fnRRBYA7Vst8W6UO131/ +7oDH4bkL8B/RicP3y/dJulbngW0FjhE3BufDkHabYEsV6CSzUIBV/bV3LexPSv7G +IjwaReETpLN7xzFoYO9q6VIDH6Al79yf5Oo3vAkAjw8tGaV+CvNiT/uFR4W7PrKK +KV/7ozR1rCB629Nvh3COcOQB/B/redyE4FqjQ6g3R9FldJ/ZudSUqQHNvVvmAbxM +R0IZDn9mug7TWspM5Y/0vfffb3d/Mc7bifdVtWZ8vCBLERwej8QjwFc3s5xRrZlu +h0UuGf7tcd3Rg/UAEQEAAbQlV2lsbGlhbSBMdWtlIDx3aWxsaWFtbHVrZTRAZ21h +aWwuY29tPokBzgQTAQoAOBYhBCFdfrZmGtBCQhn6OrT4GxBrCBwjBQJh7+xBAhsD +BQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJELT4GxBrCBwjjVwL/2vvc7iIeWgq +/cmc5o7ALzN0OQeph0ZYMY9nSM4Li4pY0UPtUrw0nw5FqEisQZ047lli6B2sLR4p +9PP932k5XpL8Xf7bSe39bUc5HMJSlmhdMVNz90MGHXyWAlIVxWCP18W+TLRgvg4H +RMpF0ij8tBUgFHBY7OJ8MKr7ruLWsMqatgUQ3XZUsbFKmKLsJEIj1Fe58ZoUqYUz +SHtTVC0IRbxipijry6XKeMPif/N1csM/RPs22nBvg9+vYw/1hnmNbRxBqJgoJPwl +tUkv71jH/iXpDL/I8i4Hphai3ndh3x8COV6PuQUX09yvfryclyLylX5+X902s8+b +l6ZNHKXAfpMMiawBHkscBf9ZpeY9HRsfqOUaVuk7EoM2O7YCrps/hzsVYYhCqXMf +R14AVnlDuME+YVbLLQObamm0lMJ9rd8QRZLowk30xR4Oa4QBTh0M6De5XDjvVKcJ +c6q0GGCQRb7eSE/y90+5+YxHweJR8rTljEUpHVwp2KgQ3DzsqWZhXbkBjQRh7+xB +AQwAmSg3ZGyxviv3SvsMLAOP0/wHJr7U0p6ss5okZR76Pc3Wy0UbUM5xXKOzxLgI +vzzDoGydintHTMqLet4huNtc/K1fDE48VsJ1+Lw5+bg91WPVdmmJp3ObYPg71e6S +YLHbGZN4Np1icEw8lXHxppBaxdhfjqrhEBo5aDO0VAN6VVeawXj7tln3wsdK5NFZ +tOouRaQJYDeBLggAFgp2jmopBcVxZ2LWObHuHxTwlSoUcmKhxNf9qy/ZI3ivbeml +uSUr/aGMdarzFaLB4IpUXnUK/cbAsRbxqqo35XGDDXVY5yPcweLvwrxLlwHIt+Uj +R7LMZfkm7KrDxCzQ5XKKV7NhfpwnpoHgNnfCn1vXoljK8JhjqNUANXNMPflN53rL +3A0fiBsczZoV/62nJZAvxohe6QKuxsVuPSEq+jbd+emRSLi3ohwmg6XR1g0JBIsO +8ubMrvswYtgBhScKQfa6TG4TF4N3O9lVc42CD2kCUXc2aApi1PIy3LpaTIp8TF/o +XV4RABEBAAGJAbYEGAEKACAWIQQhXX62ZhrQQkIZ+jq0+BsQawgcIwUCYe/sQQIb +DAAKCRC0+BsQawgcI/8ZC/0VIxMGXxHk7CYuL0f5jZWzMoViosgwqSlvF0wJuLJs +8tLn2hcULraaw2j7XNGN/cWzW9TwEgWCcau2HG05W2Q+6osJ8QYe14mtxl/T9WIF +iKbi4YXofq+JApcc8zNGCQ2GnwAcMu/mH9CwpYnivv0/1tKZOs6LmRuFmTVcKFO2 +bctUTvlCLhIXvu5NCdWGckt87i+9Cv83wcBjbumbqCPSr2TZkeFUbeJL0dpDSuSY +DPuZOWPm/PujOkTLCUj+37fem/TZuSTyTYPz4bClN1pBKugG/H7GA1CFpDNzrnyL +y1sGsQxDiE1O45lF1q5ZrOQbYowheIgfpiZASbWt9N9sTx09uTdKIWloa2PRIK0F +AHUClIStaFrRi5gJzvfCP7MSerhlgPiLv+Sk0QFOjO6YUN9FkF3D2YLLUmH66Lls +2BfKhS62MfCh8sb/4c9Jdm++2BPIg/FzLnUIRMfCum6JVjjIvEpwRjq6+ZgLt6fB +j+orBrlqTqtLDl2qxtffkEg= +=59sm +-----END PGP PUBLIC KEY BLOCK----- \ No newline at end of file -- 2.45.2 From 5c0ae5a43028806cb5c6dca6dfbd175885da407c Mon Sep 17 00:00:00 2001 From: William Luke Date: Thu, 27 Jan 2022 15:32:53 +0300 Subject: [PATCH 15/17] Add lums fingerprint to trust --- keys/trust | 1 + 1 file changed, 1 insertion(+) diff --git a/keys/trust b/keys/trust index 6be4af9..a1daaf2 100644 --- a/keys/trust +++ b/keys/trust @@ -1 +1,2 @@ 0826EDA1702D1E87C6E2875121D2E7BB88C2A746:6: +215D7EB6661AD0424219FA3AB4F81B106B081C23:6: \ No newline at end of file -- 2.45.2 From d6114f43f28d04fe0ab597522c26244067925157 Mon Sep 17 00:00:00 2001 From: William Luke Date: Mon, 14 Feb 2022 16:31:24 +0300 Subject: [PATCH 16/17] chore: cleanup --- install.sh | 12 +- keys/trust | 2 +- rsync-scripts.sh | 2 + .../rsync-install-script.sh | 0 rsync/rsync-uninstall-script.sh | 9 + setup.sh | 311 +-- setup_evm.sh | 166 +- setup_key.sh | 2 +- setup_systemd.sh | 14 +- systemd/node.service | 2 +- uninstall-evm.sh | 18 +- uninstall.sh | 80 +- var/kitabu/bootnode.toml | 24 +- var/kitabu/bootnodes.txt | 1 + var/kitabu/kitabu.json | 1869 +++++++++-------- 15 files changed, 1344 insertions(+), 1168 deletions(-) create mode 100644 rsync-scripts.sh rename rsync-install-script.sh => rsync/rsync-install-script.sh (100%) create mode 100644 rsync/rsync-uninstall-script.sh create mode 100644 var/kitabu/bootnodes.txt diff --git a/install.sh b/install.sh index 3219392..1098156 100644 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ # Example Usage -# bash <(curl -s https://pip.grassrootseconomics.net/cic-staff-installer.sh) -h +# bash <(curl -s https://git.grassecon.net/grassrootseconomics/cic-staff-installer/raw/branch/lum/kitabu/install.sh) -h # This is currently living on at pip because root is using a self signed cert -# When changes are made to this file you must run bash ./rsync-install-script.sh to sync it to the server +# When changes are made to this file you must run bash ./rsync/rsync-install-script.sh to sync it to the server branch='master' verbose='false' @@ -11,7 +11,7 @@ print_usage() { printf "CIC Staff Installer Options: -b Name of the branch you want use to install - -e Name of the EVM you want to install (kitabu, bloxberg) + -e Name of the EVM you want to install (kitabu, bloxberg; default is none) -v Verbose -h Print this help message " @@ -29,7 +29,13 @@ while getopts 'e:hb:v' flag; do esac done export INSTALL_EVM=${evm} +if [ ! -z $INSTALL_EVM ]; then + . setup_evm.sh +fi temp_dir=`mktemp -d` git clone -b $branch https://git.grassecon.net/grassrootseconomics/cic-staff-installer.git $temp_dir cd $temp_dir + +export BASH_DEBUG_LEVEL=4 # all=1 trace=2 debug=3 info=4 warn=5 error=6 +export BASH_DEBUG=1 bash setup.sh \ No newline at end of file diff --git a/keys/trust b/keys/trust index a1daaf2..536c3f2 100644 --- a/keys/trust +++ b/keys/trust @@ -1,2 +1,2 @@ 0826EDA1702D1E87C6E2875121D2E7BB88C2A746:6: -215D7EB6661AD0424219FA3AB4F81B106B081C23:6: \ No newline at end of file +215D7EB6661AD0424219FA3AB4F81B106B081C23:6: diff --git a/rsync-scripts.sh b/rsync-scripts.sh new file mode 100644 index 0000000..96e4afd --- /dev/null +++ b/rsync-scripts.sh @@ -0,0 +1,2 @@ +bash ./rsync/rsync-install-script.sh +bash ./rsync/rsync-uninstall-script.sh \ No newline at end of file diff --git a/rsync-install-script.sh b/rsync/rsync-install-script.sh similarity index 100% rename from rsync-install-script.sh rename to rsync/rsync-install-script.sh diff --git a/rsync/rsync-uninstall-script.sh b/rsync/rsync-uninstall-script.sh new file mode 100644 index 0000000..ac49fcc --- /dev/null +++ b/rsync/rsync-uninstall-script.sh @@ -0,0 +1,9 @@ +host='root.grassrootseconomics.net' +file_to_sync='./uninstall.sh' +distination_dir='/usr/local/share/python/packages' +distination_file_name='cic-staff-uninstaller.sh' +user='root' + +echo Syncing $file_to_sync to $distination_dir as $user on $host + +rsync -avz --progress $file_to_sync $user@$host:$distination_dir/$distination_file_name \ No newline at end of file diff --git a/setup.sh b/setup.sh index b0bd82e..4cd3510 100644 --- a/setup.sh +++ b/setup.sh @@ -2,12 +2,168 @@ want_cic_cache_version=0.3.0a2 want_cicada_version=0.0.6rc1 -#INSTALL_EVM=bloxberg -. aux/bdbg/bdbg.sh +setup_debug(){ + . aux/bdbg/bdbg.sh + _level=${BASH_DEBUG_LEVEL:-2} + _debug=${BASH_DEBUG:-0} + debug_flag= + if [ ! -z "$_debug"] && [ "$_level" -eq 1 ]; then + debug_flag="$debug_flag" + elif [ ! -z "$_debug"] && [ "$_level" -gt 1 ]; then + debug_flag="-v" + fi +} -_level=2 -_debug=1 +setup_cic_gpg(){ + mkdir -vp $HOME/.local/share/cic/.gnupg + chmod 700 $HOME/.local/share/cic/.gnupg + for f in ./keys/*.asc; do + gpg --homedir $HOME/.local/share/cic/.gnupg --import $f + done + gpg --homedir $HOME/.local/share/cic/.gnupg --import-ownertrust ./keys/trust +} + + + + +get_default_enviroment(){ + dbg $dbg_debug "load default environment" + + config_directives=(CIC_REGISTRY_ADDRESS CIC_TRUST_ADDRESS META_URL TX_CACHE_URL CHAIN_SPEC) + + for c in ${config_directives[@]}; do + v=${!c} + if [ -z "$v" ]; then + d=`mktemp -d` + curl -X GET --cacert $CIC_ROOT_CA_FILE $CIC_ROOT_URL/$c -o $d/$c + gpg --homedir $HOME/.local/share/cic/.gnupg --verify $d/$c + v=`gpg --homedir $HOME/.local/share/cic/.gnupg -d $d/$c` # Decrypt + echo $v >> $t + dbg $dbg_debug "fetched environment variable $v" + else + dbg $dbg_debug "using predefined environment variable for $c = $v" + fi + done +} +init_env(){ + dbg $dbg_debug "identify root values" + t=`mktemp` + set -e # Exit immediately if a command exits with a non-zero status + get_default_enviroment + set -a + . $t + set +a + + # DATABASE_NAME set here works as long as only one database is involved... + export DATABASE_PREFIX=$HOME/.local/share/cic/cache/${DATABASE_PREFIX:-staffclient} + export DATABASE_ENGINE=sqlite + export DATABASE_DRIVER=pysqlite + export DATABASE_DEBUG=0 + export DATABASE_POOL_SIZE=0 + export DATABASE_USER=postgres + export DATABASE_PASSWORD=`dd if=/dev/urandom bs=32 count=1 2> /dev/null | hexdump -v -n 32 -e '1/1 "%02x"'` + if [ -d "$HOME/.config/cic/staff-client/.gnupg" ]; then + echo "Staff Client GPG keyring already exists" + else + dbg $dbg_debug "set up keys" + if [ -z "$AUTH_KEY" ]; then + . setup_key.sh + else + t=`mktemp` + gpg --export -a $AUTH_KEY > $t + echo -n $AUTH_KEY > $HOME/.config/cic/staff-client/key_fingerprint + dbg $dbg_info "using key $AUTH_KEY" + fi + fi + export AUTH_KEY=`cat $HOME/.config/cic/staff-client/key_fingerprint` + export AUTH_KEYRING_PATH=$HOME/.config/cic/staff-client/.gnupg + export AUTH_DB_PATH=$HOME/.local/share/cic/clicada + + touch "$HOME/.config/cic/staff-client/.envinit" +} + +check_cache_version(){ + v=`pip show cic-cache | awk '/^Version/ {print $2;}'` + if [ "$?" -ne 0 ]; then + dbg $dbg_warn "cic-cache is not installed. will update" + update=1 + elif [ "$v" != "$want_cic_cache_version" ]; then + dbg $dbg_warn "cic-cache version $v installed but need $want_cic_cache_version, will update" + update=1 + else + dbg $dbg_info "cic-cache version $v found" + fi +} + +check_cicada_version(){ + v=`pip show clicada | awk '/^Version/ {print $2;}'` + if [ "$?" -ne 0 ]; then + dbg $dbg_warn "clicada is not installed, will update" + update=1 + elif [ "$v" != "$want_cicada_version" ]; then + dbg $dbg_warn "clicada version $v installed but need $want_cicada_version, will update" + update=1 + else + dbg $dbg_info "clicada version $v found" + fi +} + +update_requirements(){ + if [ $update -gt 0 ]; then + dbg $dbg_debug "installing application files" + + pip3 install --user --index-url $PIP_INDEX_URL --extra-index-url $PIP_EXTRA_INDEX_URL $PIP_EXTRA_ARGS $debug_flag -r requirements.txt + update_path $HOME/.local/bin + fi +} + +install_cache_configuration(){ + if [ -f $HOME/.config/cic/cache/config.ini ]; then + dbg $dbg_debug "migrating existing configuration" + cic_cache_config_flag="-c $HOME/.config/cic/cache" + fi + cic-cache-trackerd --dumpconfig ini $cic_cache_config_flag $debug_flag > $t + + mkdir -vp $HOME/.config/cic/cache + mv -v $t $HOME/.config/cic/cache/config.ini +} + +install_clicada_configuration(){ + if [ -d $HOME/.config/cic/clicada/config.ini ]; then + dbg $dbg_debug "migrating existing clicada configuration" + clicada_config_flag="-c $HOME/.config/cic/clicada" + fi + clicada --dumpconfig ini $clicada_config_flag > $t + + mkdir -vp $HOME/.config/cic/clicada + mv -v $t $HOME/.config/cic/clicada/config.ini +} + + +export_cache_tracker_config(){ + t=`mktemp` + cic-cache-trackerd --dumpconfig env $cic_cache_config_flag $debug_flag > $t + + set -a # Forces a variable to be exported even if it wasn't before + . $t + set +a +} +execute_cache_database_migrations(){ + dbg $dbg_debug "execute database migrations" + mkdir -vp $HOME/.local/share/cic/cache + # This has the default log level set to debug + migrate_cic_cache.py -c $HOME/.config/cic/cache/ +} +export_clicada_config(){ + t=`mktemp` + clicada --dumpconfig env $clicada_config_flag $debug_flag > $t + set -a + . $t + set +a +} + +setup_debug PIP_EXTRA_ARGS=$PIP_EXTRA_ARGS PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net} @@ -17,8 +173,8 @@ CIC_ROOT_URL=${CIC_ROOT_URL:-https://root.grassrootseconomics.net/env/dev} CIC_ROOT_CA_FILE=${CIC_ROOT_CA_FILE:-keys/ge.ca} if [ "$UID" -eq 0 ]; then - dbg $dbg_error "This cannot be run as root" - exit 1 + dbg $dbg_error "This cannot be run as root" + exit 1 fi . setup_check.sh @@ -27,148 +183,27 @@ fi mkdir -vp $HOME/.local/bin dbg $dbg_debug "importing keys" - -mkdir -vp $HOME/.local/share/cic/.gnupg -chmod 700 $HOME/.local/share/cic/.gnupg -for f in ./keys/*.asc; do - gpg --homedir $HOME/.local/share/cic/.gnupg --import $f -done -gpg --homedir $HOME/.local/share/cic/.gnupg --import-ownertrust ./keys/trust - -t=`mktemp` -dbg $dbg_debug "identify root values" - -set -e +setup_cic_gpg # check if we have existing setup if [ ! -e "$HOME/.config/cic/staff-client/.envinit" ]; then - dbg $dbg_debug "load default environment" - - config_directives=(CIC_REGISTRY_ADDRESS CIC_TRUST_ADDRESS META_URL TX_CACHE_URL CHAIN_SPEC) - - for c in ${config_directives[@]}; do - v=${!c} - if [ -z "$v" ]; then - d=`mktemp -d` - curl -X GET --cacert $CIC_ROOT_CA_FILE $CIC_ROOT_URL/$c -o $d/$c - gpg --homedir $HOME/.local/share/cic/.gnupg --verify $d/$c - v=`gpg --homedir $HOME/.local/share/cic/.gnupg -d $d/$c` - echo $v >> $t - dbg $dbg_debug "fetched environment variable $v" - else - dbg $dbg_debug "using predefined environment variable for $c = $v" - fi - done - - set -a - . $t - set +a - - # DATABASE_NAME set here works as long as only one database is involved... - export DATABASE_PREFIX=$HOME/.local/share/cic/cache/${DATABASE_PREFIX:-staffclient} - export DATABASE_ENGINE=sqlite - export DATABASE_DRIVER=pysqlite - export DATABASE_DEBUG=0 - export DATABASE_POOL_SIZE=0 - export DATABASE_USER=postgres - export DATABASE_PASSWORD=`dd if=/dev/urandom bs=32 count=1 2> /dev/null | hexdump -v -n 32 -e '1/1 "%02x"'` - - dbg $dbg_debug "set up keys" - if [ -z "$AUTH_KEY" ]; then - . setup_key.sh - else - t=`mktemp` - gpg --export -a $AUTH_KEY > $t - echo -n $AUTH_KEY > $HOME/.config/cic/staff-client/key_fingerprint - dbg $dbg_info "using key $AUTH_KEY" - fi - export AUTH_KEY=`cat $HOME/.config/cic/staff-client/key_fingerprint` - export AUTH_KEYRING_PATH=$HOME/.config/cic/staff-client/.gnupg - export AUTH_DB_PATH=$HOME/.local/share/cic/clicada - - touch "$HOME/.config/cic/staff-client/.envinit" + init_env fi + set +e - dbg $dbg_debug "checking installed versions" - update=0 -v=`pip show cic-cache | awk '/^Version/ {print $2;}'` -if [ "$?" -ne 0 ]; then - dbg $dbg_warn "cic-cache is not installed. will update" - update=1 -elif [ "$v" != "$want_cic_cache_version" ]; then - dbg $dbg_warn "cli-cache version $v installed but need $want_cic_cache_version, will update" - update=1 -else - dbg $dbg_info "cli-cache version $v found" -fi - -v=`pip show clicada | awk '/^Version/ {print $2;}'` -if [ "$?" -ne 0 ]; then - dbg $dbg_warn "clicada is not installed, will update" - update=1 -elif [ "$v" != "$want_cicada_version" ]; then - dbg $dbg_warn "clicada version $v installed but need $want_cicada_version, will update" - update=1 -else - dbg $dbg_info "clicada version $v found" -fi - +check_cache_version +check_cicada_version set -e - -if [ $update -gt 0 ]; then - dbg $dbg_debug "installing application files" - - debug_flag= - if [ "$_level" -eq 1 ]; then - debug_flag="-v" - fi - pip install --index-url $PIP_INDEX_URL --extra-index-url $PIP_EXTRA_INDEX_URL $PIP_EXTRA_ARGS $debug_flag -r requirements.txt - update_path $HOME/.local/bin -fi - - +update_requirements dbg $dbg_debug "installing configurations" t=`mktemp` -if [ -f $HOME/.config/cic/cache/config.ini ]; then - dbg $dbg_debug "migrating existing configuration" - cic_cache_config_flag="-c $HOME/.config/cic/cache" -fi -cic-cache-trackerd --dumpconfig ini $cic_cache_config_flag -vv > $t -mkdir -vp $HOME/.config/cic/cache -mv -v $t $HOME/.config/cic/cache/config.ini - -if [ -d $HOME/.config/cic/clicada/config.ini ]; then - dbg $dbg_debug "migrating existing clicada configuration" - clicada_config_flag="-c $HOME/.config/cic/clicada" -fi - -clicada --dumpconfig ini $clicada_config_flag > $t -mkdir -vp $HOME/.config/cic/clicada -mv -v $t $HOME/.config/cic/clicada/config.ini - -t=`mktemp` -cic-cache-trackerd --dumpconfig env $cic_cache_config_flag -vv > $t -set -a -. $t -set +a - -dbg $dbg_debug "execute database migrations" - -mkdir -vp $HOME/.local/share/cic/cache - -migrate_cic_cache.py -c $HOME/.config/cic/cache/ - -t=`mktemp` -clicada --dumpconfig env $clicada_config_flag -vv > $t -set -a -. $t -set +a +install_cache_configuration +install_clicada_configuration +export_cache_tracker_config +execute_cache_database_migrations +export_clicada_config . setup_systemd.sh -if [ ! -z $INSTALL_EVM ]; then - . setup_evm.sh -fi - diff --git a/setup_evm.sh b/setup_evm.sh index 9be6c6b..fe36c4a 100644 --- a/setup_evm.sh +++ b/setup_evm.sh @@ -1,80 +1,120 @@ +load_env(){ + GIT_OPENETHEREUM=${GIT_OPENETHEREUM:-https://github.com/openethereum/openethereum} + + + default_openethereum_chain="kitabu" # bloxberg | kitabu + export OPENETHEREUM_CHAIN=${INSTALL_EVM:-$default_openethereum_chain} + + OPENETHEREUM_PATH=${OPENETHEREUM_PATH:-$HOME/.local/bin/openethereum} + openethereum_dir=`realpath $(dirname $OPENETHEREUM_PATH)` + + default_openethereum_config=$HOME/.config/io.parity.ethereum/$OPENETHEREUM_CHAIN + + export OPENETHEREUM_CONFIG=${OPENETHEREUM_CONFIG:-$default_openethereum_config} + default_openethereum_type="binary" # source | binary + export OPENETHEREUM_TYPE=${OPENETHEREUM_TYPE:-$default_openethereum_type} +} + +download_openethereum() { + dbg $dbg_debug "downloading openethereum node" + + openethereum_version="3.3.3" + if [ ! -f "$PWD/openethereum-linux-v$openethereum_version.zip" ]; then + wget https://github.com/openethereum/openethereum/releases/download/v$openethereum_version/openethereum-linux-v$openethereum_version.zip + fi + unzip openethereum-linux-v$openethereum_version.zip + rm openethereum-linux-v$openethereum_version.zip + ./openethereum --version + mv ./openethereum $openethereum_dir/openethereum + export OPENETHEREUM_PATH=$openethereum_dir/openethereum +} +build_openethereum() { + dbg $dbg_debug "building bloxberg node" + t=`mktemp -d` + pushd $t + install_env=1 + git clone $GIT_OPENETHEREUM + cd openethereum + git checkout 2662d1925ec794f3ad7c5759b2412ff5128d259b + rustup install 1.47.0 + cargo build --release --features final + cp -v $t/target/release/parity $openethereum_dir/openethereum + export OPENETHEREUM_PATH=$openethereum_dir/openethereum +} . aux/bdbg/bdbg.sh . setup_path.sh # set -o xtrace -GIT_OPENETHEREUM=${GIT_OPENETHEREUM:-https://github.com/openethereum/openethereum} +load_env -default_openethereum_chain="kitabu" # bloxberg | kitabu -export OPENETHEREUM_CHAIN=${INSTALL_EVM:-$default_openethereum_chain} - -OPENETHEREUM_PATH=${OPENETHEREUM_PATH:-$HOME/.local/bin/parity} -openethereum_dir=`realpath $(dirname $OPENETHEREUM_PATH)` - -default_openethereum_run=$HOME/.local/share/io.parity.ethereum/$OPENETHEREUM_CHAIN -default_openethereum_config=$HOME/.config/io.parity.ethereum/$OPENETHEREUM_CHAIN - -export OPENETHEREUM_RUN=${OPENETHEREUM_RUN:-$default_openethereum_run} -export OPENETHEREUM_CONFIG=${OPENETHEREUM_CONFIG:-$default_openethereum_config} -default_openethereum_type="binary" # source | binary -export OPENETHEREUM_TYPE=${OPENETHEREUM_TYPE:-$default_openethereum_type} - -download_openethereum() { - openethereum_version="3.3.3" - if [ ! -f "$PWD/openethereum-linux-v$openethereum_version.zip" ]; then - wget https://github.com/openethereum/openethereum/releases/download/v$openethereum_version/openethereum-linux-v$openethereum_version.zip - fi - unzip openethereum-linux-v$openethereum_version.zip - rm openethereum-linux-v$openethereum_version.zip - ./openethereum --version - mv ./openethereum $openethereum_dir/parity - export OPENETHEREUM_PATH=$openethereum_dir/parity -} -build_openethereum() { - dbg $dbg_debug "downloading bloxberg node" - t=`mktemp -d` - pushd $t - install_env=1 - git clone $GIT_OPENETHEREUM - cd openethereum - git checkout 2662d1925ec794f3ad7c5759b2412ff5128d259b - rustup install 1.47.0 - cargo build --release --features final - cp -v $t/target/release/parity $openethereum_dir - export OPENETHEREUM_PATH=$openethereum_dir/parity -} install_env= if [ ! -f $OPENETHEREUM_PATH ]; then -# Download and Build parity from git $GIT_OPENETHEREUM - if [ "$OPENETHEREUM_TYPE" = "source" ]; then - build_openethereum - else - download_openethereum - fi + # Download and Build parity from git $GIT_OPENETHEREUM + if [ "$OPENETHEREUM_TYPE" = "source" ]; then + build_openethereum + else + download_openethereum + fi else - dbg $dbg_info "found bloxberg node executable in $OPENETHEREUM_PATH" + dbg $dbg_info "found evm node executable in $OPENETHEREUM_PATH" fi -#OPENETHEREUM_RUN=~/.local/share/io.parity.ethereum/$OPENETHEREUM_CHAIN -if [ ! -d $OPENETHEREUM_RUN ]; then - mkdir -vp $OPENETHEREUM_RUN/bootnode - mkdir -vp $OPENETHEREUM_CONFIG - touch $OPENETHEREUM_CONFIG/bootnode.pwd - dd status=xfer if=/dev/urandom bs=32 count=1 2> /dev/null | hexdump -v -n 32 -e '1/1 "%02x"' > $OPENETHEREUM_CONFIG/bootnode.pwd - chmod -v 400 $OPENETHEREUM_CONFIG/bootnode.pwd - ./aux/bash-templater/templater.sh var/$OPENETHEREUM_CHAIN/bootnode.toml > $OPENETHEREUM_CONFIG/bootnode.toml - cp -v var/$OPENETHEREUM_CHAIN/$OPENETHEREUM_CHAIN.json $OPENETHEREUM_CONFIG/ - if [ -f var/$OPENETHEREUM_CHAIN/bootnodes.txt ] ; then - cp -v var/$OPENETHEREUM_CHAIN/bootnodes.txt $OPENETHEREUM_CONFIG/ - fi - ./aux/bash-templater/templater.sh systemd/node.service > $HOME/.config/systemd/user/$OPENETHEREUM_CHAIN.service - ./aux/bash-templater/templater.sh systemd/env/01-$OPENETHEREUM_CHAIN.conf > $HOME/.config/environment.d/01-$OPENETHEREUM_CHAIN.conf - systemctl --user daemon-reload +#OPENETHEREUM_CONFIG=$HOME/.config/io.parity.ethereum/$OPENETHEREUM_CHAIN +if [ ! -d $OPENETHEREUM_CONFIG ]; then + install_dir=$(pwd) + mkdir -vp $OPENETHEREUM_CONFIG + cd $OPENETHEREUM_CONFIG + touch ./bootnode.pwd + read -p "enter a passphrase for your keyfile: " PASSPHRASE + VANITY_STRING=${VANITY_STRING:-"Kitabu Sarafu Karibu Sana"} + echo -n "$VANITY_STRING" > ./.vanity + truncate ./.vanity -s 32 && \ + hexdump -v -n 32 -e '1/1 "%02x"' ./.vanity > ./.extra + + WALLET_PASSPHRASE=$PASSPHRASE eth-keyfile -0 > ./keyfile_validator.json + WALLET_PASSPHRASE=$PASSPHRASE eth-sign-msg -0 -f ./keyfile_validator.json `cat ./.extra` > ./.sig + WALLET_PASSPHRASE=$PASSPHRASE eth-keyfile -0 -d ./keyfile_validator.json >> ./.extra + cat ./.sig >> ./.extra + echo $PASSPHRASE > ./bootnode.pwd + chmod -v 400 ./bootnode.pwd + mkdir -vp $OPENETHEREUM_CONFIG/data/keys/kitabu_sarafu + cp -v ./keyfile_validator.json $OPENETHEREUM_CONFIG/data/keys/kitabu_sarafu/ + echo Changing back to $install_dir + cd $install_dir + + + # config.json + export DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER=${DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER:-"0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C"} + export DEV_ETH_GENESIS_START_GAS=${DEV_ETH_GENESIS_START_GAS:-"0x204fce5e3e25026110000000"} + export DEV_ETH_ACCOUNT_VALIDATOR="0x$(eth-keyfile -d $OPENETHEREUM_CONFIG/keyfile_validator.json)" + # export DEV_ETH_ACCOUNT_VALIDATOR="0xFA14198a6dc184D758F3B7308a2a85F361123e85" + + # export DEV_ETH_GENESIS_EXTRA_DATA="0x$(cat $OPENETHEREUM_CHAIN/.extra)" + cp -v var/$OPENETHEREUM_CHAIN/$OPENETHEREUM_CHAIN.json > $OPENETHEREUM_CONFIG/$OPENETHEREUM_CHAIN.json + + + # Bootnode.toml + export SIGNER_ADDRESS=$DEV_ETH_ACCOUNT_VALIDATOR + + ./aux/bash-templater/templater.sh var/$OPENETHEREUM_CHAIN/bootnode.toml > $OPENETHEREUM_CONFIG/bootnode.toml + + if [ -f var/$OPENETHEREUM_CHAIN/bootnodes.txt ] ; then + cp -v var/$OPENETHEREUM_CHAIN/bootnodes.txt $OPENETHEREUM_CONFIG/ + fi + + + # Systemd + ./aux/bash-templater/templater.sh systemd/node.service > $HOME/.config/systemd/user/$OPENETHEREUM_CHAIN.service + ./aux/bash-templater/templater.sh systemd/env/01-$OPENETHEREUM_CHAIN.conf > $HOME/.config/environment.d/01-$OPENETHEREUM_CHAIN.conf + systemctl --user daemon-reload + systemctl --user enable $OPENETHEREUM_CHAIN + systemctl --user start $OPENETHEREUM_CHAIN else - echo Found $OPENETHEREUM_RUN directory! Skipping + echo Found $OPENETHEREUM_CONFIG directory! Skipping fi update_path $openethereum_dir if [ ! -z "$install_env" ]; then - popd + popd fi diff --git a/setup_key.sh b/setup_key.sh index 341c230..060f51f 100644 --- a/setup_key.sh +++ b/setup_key.sh @@ -65,7 +65,7 @@ chmod 0700 -v $HOME/.config/cic/staff-client/.gnupg gpg --homedir $t --pinentry-mode loopback --passphrase-file $password_file --export-secret-keys | gpg --pinentry-mode loopback --passphrase-file $password_file --homedir $HOME/.config/cic/staff-client/.gnupg --import gpg --homedir $HOME/.config/cic/staff-client/.gnupg --export -a > $HOME/.config/cic/staff-client/user.asc -gpg --list-packets $HOME/.config/cic/staff-client/user.asc | awk '/issuer fpr/ { print $9; }' | cut -b -40 > $HOME/.config/cic/staff-client/key_fingerprint +gpg --list-packets $HOME/.config/cic/staff-client/user.asc | awk '/issuer fpr/ { print $9; exit}' | cut -b -40 > $HOME/.config/cic/staff-client/key_fingerprint gpg --homedir $HOME/.config/cic/staff-client/.gnupg --pinentry-mode loopback --passphrase-file $password_file --quick-add-key `cat $HOME/.config/cic/staff-client/key_fingerprint` default encrypt 0 diff --git a/setup_systemd.sh b/setup_systemd.sh index 1ddccd8..c488375 100644 --- a/setup_systemd.sh +++ b/setup_systemd.sh @@ -3,8 +3,8 @@ mkdir -vp $HOME/.config/environment.d . aux/bdbg/bdbg.sh -_level=2 -_debug=1 +_level=${BASH_DEBUG_LEVEL:-2} +_debug=${BASH_DEBUG:-0} cp -v systemd/cic-cache-server.service $HOME/.config/systemd/user/ @@ -15,10 +15,10 @@ dbg $dbg_info "using python bin path $PYTHON_BIN_PATH for systemd executables" PYTHON_BIN_PATH=$PYTHON_BIN_PATH ./aux/bash-templater/templater.sh systemd/cic-cache-tracker.service > $HOME/.config/systemd/user/cic-cache-tracker.service for f in systemd/env/*.conf; do - b=`basename $f` - p=$HOME/.config/environment.d/$b - dbg $dbg_debug "writing rendered environment file $p" - ./aux/bash-templater/templater.sh $f > $p + b=`basename $f` + p=$HOME/.config/environment.d/$b + dbg $dbg_debug "writing rendered environment file $p" + ./aux/bash-templater/templater.sh $f > $p done #cp -v systemd/env/*.conf $HOME/.config/environment.d/ @@ -27,3 +27,5 @@ cp -v systemd/bin/cic_cache_server_start.sh $HOME/.local/bin/ chmod -v 750 $HOME/.local/bin/cic_cache_server_start.sh systemctl --user daemon-reload +systemctl --user start cic-cache-tracker +systemctl --user start cic-cache-server diff --git a/systemd/node.service b/systemd/node.service index c067f6d..ba0255d 100644 --- a/systemd/node.service +++ b/systemd/node.service @@ -3,7 +3,7 @@ Description="{{OPENETHEREUM_CHAIN}} openethereum node" After=network.target [Service] -ExecStart=/bin/bash -c ${OPENETHEREUM_PATH} --config ${OPENETHEREUM_CONFIG}/bootnode.toml +ExecStart={{OPENETHEREUM_PATH}} --config {{OPENETHEREUM_CONFIG}}/bootnode.toml [Install] WantedBy=network.target diff --git a/uninstall-evm.sh b/uninstall-evm.sh index 7e9c995..db94829 100644 --- a/uninstall-evm.sh +++ b/uninstall-evm.sh @@ -1,12 +1,17 @@ red=`tput setaf 1` reset=`tput sgr0` +systemctl --user stop kitabu +systemctl --user stop bloxberg +systemctl --user disable kitabu +systemctl --user disable bloxberg echo -n " ${red}WARNING:${reset} The following will be DELETED if present: Directories: $HOME/.local/share/io.parity.ethereum - $HOME/.config/io.parity.ethereum + $HOME/.config/io.parity.ethereum Files: $HOME/.local/bin/openethereum + $HOME/.local/share/openethereum $HOME/.local/bin/parity $HOME/.config/systemd/user/kitabu.service $HOME/.config/systemd/user/bloxberg.service @@ -14,19 +19,20 @@ ${red}WARNING:${reset} The following will be DELETED if present: $HOME/.config/environment.d/01-kitabu.conf Would you still like to continue? (y/n):" - read confirmed - if [ "$confirmed" == "y" ]; then +read confirmed +if [ "$confirmed" == "y" ]; then echo "Deleting..." rm -rf $HOME/.local/share/io.parity.ethereum - rm -rf $HOME/.config/io.parity.ethereum + rm -rf $HOME/.config/io.parity.ethereum rm $HOME/.local/bin/openethereum rm $HOME/.local/bin/parity + rm -rf $HOME/.local/share/openethereum rm $HOME/.config/systemd/user/kitabu.service rm $HOME/.config/systemd/user/bloxberg.service rm $HOME/.config/environment.d/01-bloxberg.conf rm $HOME/.config/environment.d/01-kitabu.conf echo "Done" - else +else echo "Aborting" - fi +fi exit 0 diff --git a/uninstall.sh b/uninstall.sh index 722c502..48de10b 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,15 +1,75 @@ -# Usefull when an install fails half way through +# Example Usage +# bash <(curl -s https://git.grassecon.net/grassrootseconomics/cic-staff-installer/raw/branch/lum/kitabu/uninstall.sh) +# This is currently living on at pip because root is using a self signed cert +# When changes are made to this file you must run bash ./rsync/rsync-install-script.sh to sync it to the server red=`tput setaf 1` +green=`tput setaf 2` reset=`tput sgr0` -echo -n "${red}WARNING:${reset} This will delete all your keys and settings. Continue? (y/n):" - read confirmed - if [ "$confirmed" == "y" ]; then - echo "Deleting all keys and settings..." - rm -rf $HOME/.local/share/cic/ - rm -rf $HOME/.config/cic - echo "Done" - else +bold=$(tput bold) +normal=$(tput sgr0) + +echo -n " +${red}WARNING:${reset} The following will be DELETED if present: + Directories: + $HOME/.local/share/cic/cache + $HOME/.local/share/cic/clicada + $HOME/.config/cic/clicada + $HOME/.config/cic/cache + Files: + $HOME/.config/cic/staff-client/.envinit + $HOME/.config/systemd/user/cic-cache-tracker.service + $HOME/.config/systemd/user/cic-cache-server.service + $HOME/.config/environment.d/01-cic-cache-server.conf + $HOME/.config/environment.d/01-cic-cache-tracker.conf + $HOME/.local/bin/cic_cache_server_start.sh + $HOME/.local/bin/migrate_cic_cache.py + +Would you still like to continue? (y/n):" +read confirmed + +if [ "$confirmed" == "y" ]; then + echo "Stopping Services.." + systemctl --user stop cic-cache-tracker + systemctl --user stop cic-cache-server + systemctl --user disable cic-cache-tracker + systemctl --user disable cic-cache-server + pip3 uninstall clicada cic cic-cache + echo "Deleting..." + rm -rf $HOME/.local/share/cic/cache + rm -rf $HOME/.local/share/cic/clicada + + rm -rf $HOME/.config/cic/clicada + rm -rf $HOME/.config/cic/cache + rm $HOME/.config/cic/staff-client/.envinit + rm $HOME/.config/systemd/user/cic-cache-tracker.service + rm $HOME/.config/systemd/user/cic-cache-server.service + + rm $HOME/.config/environment.d/01-cic-cache-server.conf + rm $HOME/.config/environment.d/01-cic-cache-tracker.conf + rm $HOME/.local/bin/cic_cache_server_start.sh + rm $HOME/.local/bin/migrate_cic_cache.py + echo "${green}Done${reset}" +else echo "Aborting" - fi +fi + +echo -n "${bold}${red}WARNING:${reset} The following will be ${bold}${red}DELETED${reset} if present: + Directories: + $HOME/.local/share/cic/.gnupg + $HOME/.config/cic/staff-client/.gnupg + Files: + $HOME/.config/cic/staff-client/user.asc + $HOME/.config/cic/staff-client/key_fingerprint +${bold}${red} Would you like to delete the CIC Keyrings? (y/n): +" +read confirmed +if [ "$confirmed" == "y" ]; then + echo "Deleting all keychains..." + rm -rf $HOME/.local/share/cic/.gnupg + rm -rf $HOME/.config/cic/staff-client/.gnupg + echo "${green}Done${reset}" +else + echo "Aborting" +fi exit 0 diff --git a/var/kitabu/bootnode.toml b/var/kitabu/bootnode.toml index acf7169..f2c518a 100644 --- a/var/kitabu/bootnode.toml +++ b/var/kitabu/bootnode.toml @@ -1,20 +1,30 @@ [parity] -chain = "kitabu.json" -base_path = "data" +chain = "{{OPENETHEREUM_CONFIG}}/{{OPENETHEREUM_CHAIN}}.json" +base_path = "{{OPENETHEREUM_CONFIG}}/data" [network] port = 30303 -#reserved_peers = "{{CONFIG_DIR}}/bootnodes.txt" # reserved_only = true max_peers = 10 snapshot_peers = 25 #nat = "extip:100.102.26.121" -nat = "extip:159.223.92.107" +nat = "extip:159.223.92.107" # !TODO ask louis +reserved_peers = "{{OPENETHEREUM_CONFIG}}/bootnodes.txt" [rpc] port = 8545 -apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"] +apis = [ + "web3", + "eth", + "net", + "personal", + "parity", + "parity_set", + "traces", + "rpc", + "parity_accounts", +] interface = "all" cors = ["*"] @@ -25,11 +35,11 @@ interface = "all" origins = ["all"] [account] -password = ["kitabu.pwd"] +password = ["{{OPENETHEREUM_CONFIG}}/bootnode.pwd"] [mining] #CHANGE ENGINE SIGNER TO VALIDATOR ADDRESS -engine_signer = "0x4081020ac03e06391b6045ad14553e75edec9e67" +engine_signer = "{{SIGNER_ADDRESS}}" reseal_on_txs = "none" force_sealing = true min_gas_price = 1 diff --git a/var/kitabu/bootnodes.txt b/var/kitabu/bootnodes.txt new file mode 100644 index 0000000..c708123 --- /dev/null +++ b/var/kitabu/bootnodes.txt @@ -0,0 +1 @@ +enode://1afcca0aa282672539aa16c4319b659476fa2c05bf0756408108bf149c5c31c59e71a7f5ac98c1335a59653f25c93c54afacbb101e48d361f55c6cf224c6966e@159.223.42.214:30303 \ No newline at end of file diff --git a/var/kitabu/kitabu.json b/var/kitabu/kitabu.json index d6a23f8..398d397 100644 --- a/var/kitabu/kitabu.json +++ b/var/kitabu/kitabu.json @@ -1,934 +1,939 @@ { - "name": "Kitabu Sarafu", - "dataDir": "kitabu_sarafu", - "engine": { - "clique": { - "params": { - "period": 2, - "epoch": 30000, - "validators": [ - "0x4081020ac03e06391b6045ad14553e75edec9e67" - ] - } - } - }, - "params": { - "accountStartNonce": "0x0", - "chainID": "0x1a0a", - "eip140Transition": "0x0", - "eip145Transition": "0x0", - "eip150Transition": "0x0", - "eip155Transition": "0x0", - "eip160Transition": "0x0", - "eip161abcTransition": "0x0", - "eip161dTransition": "0x0", - "eip211Transition": "0x0", - "eip214Transition": "0x0", - "eip658Transition": "0x0", - "eip1014Transition": "0x0", - "eip1052Transition": "0x0", - "eip1283Transition": "0x0", - "eip1283DisableTransition": "0x0", - "eip1283ReenableTransition": "0x0", - "eip1344Transition": "0x0", - "eip1706Transition": "0x0", - "eip1884Transition": "0x0", - "eip2028Transition": "0x0", - "eip1559Transition": "0x1", - "eip1559BaseFeeMaxChangeDenominator": "0x8", - "eip1559ElasticityMultiplier": "0x2", - "gasLimitBoundDivisor": "0x400", - "maxCodeSize": "0x6000", - "maxCodeSizeTransition": "0x0", - "maximumExtraDataSize": "0xffff", - "minGasLimit": "0x1", - "networkID": "0x1a0a" - }, - "genesis": { - "author": "0x0000000000000000000000000000000000000000", - "difficulty": "0x1", - "extraData": "0x536172616675204b61726962752053616e6100000000000000000000000000005C5aB0D602EEF41f82B6fc087A24e61383589C398c6f7b75d90c3b32bdc9b4fcfbb4ad43c853446a2c0c9d3a9590a3349c8e45ce50446bd276cbb99c1f38132cd7e520d6be0ccba78acc59ab50a82f711ff7cb9d00", - "gasLimit": "0xb00000", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "seal": { - "ethereum": { - "nonce": "0x0000000000000000", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000" - } - }, - "timestamp": "0x5c51a607" - }, - "accounts": { - "0x0000000000000000000000000000000000000000": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000001": { - "balance": "0x1", - "builtin": { - "name": "ecrecover", - "pricing": { - "linear": { - "base": 3000, - "word": 0 - } - } - } - }, - "0x0000000000000000000000000000000000000002": { - "balance": "0x1", - "builtin": { - "name": "sha256", - "pricing": { - "linear": { - "base": 60, - "word": 12 - } - } - } - }, - "0x0000000000000000000000000000000000000003": { - "balance": "0x1", - "builtin": { - "name": "ripemd160", - "pricing": { - "linear": { - "base": 600, - "word": 120 - } - } - } - }, - "0x0000000000000000000000000000000000000004": { - "balance": "0x1", - "builtin": { - "name": "identity", - "pricing": { - "linear": { - "base": 15, - "word": 3 - } - } - } - }, - "0x0000000000000000000000000000000000000005": { - "balance": "0x1", - "builtin": { - "name": "modexp", - "pricing": { - "0x0": { - "info": "EIP-198: Big integer modular exponentiation. Byzantium hardfork", - "price": { - "modexp": { - "divisor": 20 - } - } - }, - "0x441064": { - "info": "EIP-2565: ModExp Gas Cost. Berlin hardfork (4_460_644)", - "price": { - "modexp2565": {} - } - } - } - } - }, - "0x0000000000000000000000000000000000000006": { - "balance": "0x1", - "builtin": { - "name": "alt_bn128_add", - "pricing": { - "0": { - "price": { "alt_bn128_const_operations": { "price": 500 } } - }, - "0x17d433": { - "info": "EIP 1108 transition at block 1_561_651 (0x17d433)", - "price": { "alt_bn128_const_operations": { "price": 150 } } - } - } - } - }, - "0x0000000000000000000000000000000000000007": { - "balance": "0x1", - "builtin": { - "name": "alt_bn128_mul", - "pricing": { - "0": { - "price": { "alt_bn128_const_operations": { "price": 40000 } } - }, - "0x17d433": { - "info": "EIP 1108 transition at block 1_561_651 (0x17d433)", - "price": { "alt_bn128_const_operations": { "price": 6000 } } - } - } - } - }, - "0x0000000000000000000000000000000000000008": { - "balance": "0x1", - "builtin": { - "name": "alt_bn128_pairing", - "pricing": { - "0": { - "price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } - }, - "0x17d433": { - "info": "EIP 1108 transition at block 1_561_651 (0x17d433)", - "price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 } } - } - } - } - }, - "0x0000000000000000000000000000000000000009": { - "balance": "0x1", - "builtin": { - "name": "blake2_f", - "activate_at": "0x17d433", - "pricing": { - "blake2_f": { - "gas_per_round": 1 - } - } - } - }, - "0x000000000000000000000000000000000000000a": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000000b": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000000c": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000000d": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000000e": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000000f": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000010": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000011": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000012": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000013": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000014": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000015": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000016": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000017": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000018": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000019": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000001a": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000001b": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000001c": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000001d": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000001e": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000001f": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000020": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000021": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000022": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000023": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000024": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000025": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000026": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000027": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000028": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000029": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000002a": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000002b": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000002c": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000002d": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000002e": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000002f": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000030": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000031": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000032": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000033": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000034": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000035": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000036": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000037": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000038": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000039": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000003a": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000003b": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000003c": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000003d": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000003e": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000003f": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000040": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000041": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000042": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000043": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000044": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000045": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000046": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000047": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000048": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000049": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000004a": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000004b": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000004c": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000004d": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000004e": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000004f": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000050": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000051": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000052": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000053": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000054": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000055": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000056": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000057": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000058": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000059": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000005a": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000005b": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000005c": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000005d": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000005e": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000005f": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000060": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000061": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000062": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000063": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000064": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000065": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000066": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000067": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000068": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000069": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000006a": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000006b": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000006c": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000006d": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000006e": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000006f": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000070": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000071": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000072": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000073": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000074": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000075": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000076": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000077": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000078": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000079": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000007a": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000007b": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000007c": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000007d": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000007e": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000007f": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000080": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000081": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000082": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000083": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000084": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000085": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000086": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000087": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000088": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000089": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000008a": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000008b": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000008c": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000008d": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000008e": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000008f": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000090": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000091": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000092": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000093": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000094": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000095": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000096": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000097": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000098": { - "balance": "0x1" - }, - "0x0000000000000000000000000000000000000099": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000009a": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000009b": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000009c": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000009d": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000009e": { - "balance": "0x1" - }, - "0x000000000000000000000000000000000000009f": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000a0": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000a1": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000a2": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000a3": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000a4": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000a5": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000a6": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000a7": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000a8": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000a9": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000aa": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ab": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ac": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ad": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ae": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000af": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000b0": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000b1": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000b2": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000b3": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000b4": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000b5": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000b6": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000b7": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000b8": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000b9": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ba": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000bb": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000bc": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000bd": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000be": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000bf": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000c0": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000c1": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000c2": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000c3": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000c4": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000c5": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000c6": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000c7": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000c8": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000c9": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ca": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000cb": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000cc": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000cd": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ce": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000cf": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000d0": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000d1": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000d2": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000d3": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000d4": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000d5": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000d6": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000d7": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000d8": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000d9": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000da": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000db": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000dc": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000dd": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000de": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000df": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000e0": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000e1": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000e2": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000e3": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000e4": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000e5": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000e6": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000e7": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000e8": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000e9": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ea": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000eb": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ec": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ed": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ee": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ef": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000f0": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000f1": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000f2": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000f3": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000f4": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000f5": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000f6": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000f7": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000f8": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000f9": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000fa": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000fb": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000fc": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000fd": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000fe": { - "balance": "0x1" - }, - "0x00000000000000000000000000000000000000ff": { - "balance": "0x1" - }, - "0x4081020ac03e06391b6045ad14553e75edec9e67": { - "balance": "0x152d02c7e14af6800000" - } - } + "name": "Kitabu Sarafu", + "dataDir": "kitabu_sarafu", + "engine": { + "clique": { + "params": { + "period": 3, + "epoch": 30000, + "validators": [ + "0x77Bea3320Fa46aFF3C7c128B83F5E436596Ba73D", + "0xcC66240bAdA17eb4C6313FB3FF83e19dfB20C973", + "0xFA14198a6dc184D758F3B7308a2a85F361123e85" + ] + } + } + }, + "params": { + "accountStartNonce": "0x0", + "chainID": "0x1a0a", + "eip140Transition": "0x0", + "eip145Transition": "0x0", + "eip150Transition": "0x0", + "eip155Transition": "0x0", + "eip160Transition": "0x0", + "eip161abcTransition": "0x0", + "eip161dTransition": "0x0", + "eip211Transition": "0x0", + "eip214Transition": "0x0", + "eip658Transition": "0x0", + "eip1014Transition": "0x0", + "eip1052Transition": "0x0", + "eip1283Transition": "0x0", + "eip1283DisableTransition": "0x0", + "eip1283ReenableTransition": "0x0", + "eip1344Transition": "0x0", + "eip1706Transition": "0x0", + "eip1884Transition": "0x0", + "eip2028Transition": "0x0", + "eip1559Transition": "0x1", + "eip1559BaseFeeMaxChangeDenominator": "0x8", + "eip1559ElasticityMultiplier": "0x2", + "gasLimitBoundDivisor": "0x400", + "maxCodeSize": "0x6000", + "maxCodeSizeTransition": "0x0", + "maximumExtraDataSize": "0xffff", + "minGasLimit": "0x1", + "networkID": "0x1a0a" + }, + "genesis": { + "author": "0x0000000000000000000000000000000000000000", + "difficulty": "0x1", + "extraData": "0x4b697461627520536172616675204b61726962752053616e610000000000000077Bea3320Fa46aFF3C7c128B83F5E436596Ba73D8bb96896b28488cd7ee91949752970d2b6a89a41c775a616732c57edc7619c0a774b72f1b1df32930c1620aa834b202a86e300f7a8d885a635b778a32904703000", + "gasLimit": "0x7d0000", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "seal": { + "ethereum": { + "nonce": "0x0000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "timestamp": "0x5c51a607" + }, + "accounts": { + "0x0000000000000000000000000000000000000000": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000001": { + "balance": "0x1", + "builtin": { + "name": "ecrecover", + "pricing": { + "linear": { + "base": 3000, + "word": 0 + } + } + } + }, + "0x0000000000000000000000000000000000000002": { + "balance": "0x1", + "builtin": { + "name": "sha256", + "pricing": { + "linear": { + "base": 60, + "word": 12 + } + } + } + }, + "0x0000000000000000000000000000000000000003": { + "balance": "0x1", + "builtin": { + "name": "ripemd160", + "pricing": { + "linear": { + "base": 600, + "word": 120 + } + } + } + }, + "0x0000000000000000000000000000000000000004": { + "balance": "0x1", + "builtin": { + "name": "identity", + "pricing": { + "linear": { + "base": 15, + "word": 3 + } + } + } + }, + "0x0000000000000000000000000000000000000005": { + "balance": "0x1", + "builtin": { + "name": "modexp", + "pricing": { + "0x0": { + "info": "EIP-198: Big integer modular exponentiation. Byzantium hardfork", + "price": { + "modexp": { + "divisor": 20 + } + } + }, + "0x441064": { + "info": "EIP-2565: ModExp Gas Cost. Berlin hardfork (4_460_644)", + "price": { + "modexp2565": {} + } + } + } + } + }, + "0x0000000000000000000000000000000000000006": { + "balance": "0x1", + "builtin": { + "name": "alt_bn128_add", + "pricing": { + "0": { + "price": { "alt_bn128_const_operations": { "price": 500 } } + }, + "0x17d433": { + "info": "EIP 1108 transition at block 1_561_651 (0x17d433)", + "price": { "alt_bn128_const_operations": { "price": 150 } } + } + } + } + }, + "0x0000000000000000000000000000000000000007": { + "balance": "0x1", + "builtin": { + "name": "alt_bn128_mul", + "pricing": { + "0": { + "price": { "alt_bn128_const_operations": { "price": 40000 } } + }, + "0x17d433": { + "info": "EIP 1108 transition at block 1_561_651 (0x17d433)", + "price": { "alt_bn128_const_operations": { "price": 6000 } } + } + } + } + }, + "0x0000000000000000000000000000000000000008": { + "balance": "0x1", + "builtin": { + "name": "alt_bn128_pairing", + "pricing": { + "0": { + "price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } + }, + "0x17d433": { + "info": "EIP 1108 transition at block 1_561_651 (0x17d433)", + "price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 } } + } + } + } + }, + "0x0000000000000000000000000000000000000009": { + "balance": "0x1", + "builtin": { + "name": "blake2_f", + "activate_at": "0x17d433", + "pricing": { + "blake2_f": { + "gas_per_round": 1 + } + } + } + }, + "0x000000000000000000000000000000000000000a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000000b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000000c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000000d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000000e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000000f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000010": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000011": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000012": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000013": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000014": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000015": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000016": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000017": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000018": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000019": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000001f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000020": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000021": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000022": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000023": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000024": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000025": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000026": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000027": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000028": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000029": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000002f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000030": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000031": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000032": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000033": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000034": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000035": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000036": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000037": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000038": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000039": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000003f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000040": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000041": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000042": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000043": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000044": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000045": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000046": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000047": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000048": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000049": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000004f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000050": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000051": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000052": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000053": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000054": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000055": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000056": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000057": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000058": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000059": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000005f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000060": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000061": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000062": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000063": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000064": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000065": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000066": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000067": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000068": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000069": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000006f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000070": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000071": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000072": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000073": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000074": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000075": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000076": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000077": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000078": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000079": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000007f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000080": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000081": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000082": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000083": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000084": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000085": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000086": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000087": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000088": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000089": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000008f": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000090": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000091": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000092": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000093": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000094": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000095": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000096": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000097": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000098": { + "balance": "0x1" + }, + "0x0000000000000000000000000000000000000099": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009a": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009b": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009c": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009d": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009e": { + "balance": "0x1" + }, + "0x000000000000000000000000000000000000009f": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000a9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000aa": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ab": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ac": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ad": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ae": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000af": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000b9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ba": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000bb": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000bc": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000bd": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000be": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000bf": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000c9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ca": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000cb": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000cc": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000cd": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ce": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000cf": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000d9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000da": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000db": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000dc": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000dd": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000de": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000df": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000e9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ea": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000eb": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ec": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ed": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ee": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ef": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f0": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f1": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f2": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f3": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f4": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f5": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f6": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f7": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f8": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000f9": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000fa": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000fb": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000fc": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000fd": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000fe": { + "balance": "0x1" + }, + "0x00000000000000000000000000000000000000ff": { + "balance": "0x1" + }, + "0x77Bea3320Fa46aFF3C7c128B83F5E436596Ba73D": { + "balance": "0x204fce5e3e25026110000000" + }, + "0xcC66240bAdA17eb4C6313FB3FF83e19dfB20C973": { + "balance": "0x204fce5e3e25026110000000" + } + } } -- 2.45.2 From 6636270fcc9244b4a081d92b5b08d237e56a4c03 Mon Sep 17 00:00:00 2001 From: William Luke Date: Mon, 14 Feb 2022 18:00:34 +0300 Subject: [PATCH 17/17] test: path fix --- .gitignore | 1 + install.sh | 13 +++++++++---- setup.sh | 9 +++++++-- uninstall.sh | 4 +--- 4 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0fd9273 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.clicada \ No newline at end of file diff --git a/install.sh b/install.sh index 1098156..355055e 100644 --- a/install.sh +++ b/install.sh @@ -34,8 +34,13 @@ if [ ! -z $INSTALL_EVM ]; then fi temp_dir=`mktemp -d` git clone -b $branch https://git.grassecon.net/grassrootseconomics/cic-staff-installer.git $temp_dir -cd $temp_dir - -export BASH_DEBUG_LEVEL=4 # all=1 trace=2 debug=3 info=4 warn=5 error=6 +if [ ! -z $verbose ]; then + export BASH_DEBUG_LEVEL=${BASH_DEBUG_LEVEL:-1} # all=1 trace=2 debug=3 info=4 warn=5 error=6 +else + export BASH_DEBUG_LEVEL=${BASH_DEBUG_LEVEL:-4} # all=1 trace=2 debug=3 info=4 warn=5 error=6 +fi export BASH_DEBUG=1 -bash setup.sh \ No newline at end of file +# export CIC_ROOT_CA_FILE=$temp_dir/keys/ge.ca +pushd $temp_dir +bash setup.sh +popd \ No newline at end of file diff --git a/setup.sh b/setup.sh index 4cd3510..b55b81f 100644 --- a/setup.sh +++ b/setup.sh @@ -34,6 +34,7 @@ get_default_enviroment(){ for c in ${config_directives[@]}; do v=${!c} + dbg $dbg_debug "CIC_ROOT_CA_FILE $CIC_ROOT_CA_FILE" if [ -z "$v" ]; then d=`mktemp -d` curl -X GET --cacert $CIC_ROOT_CA_FILE $CIC_ROOT_URL/$c -o $d/$c @@ -113,7 +114,7 @@ update_requirements(){ if [ $update -gt 0 ]; then dbg $dbg_debug "installing application files" - pip3 install --user --index-url $PIP_INDEX_URL --extra-index-url $PIP_EXTRA_INDEX_URL $PIP_EXTRA_ARGS $debug_flag -r requirements.txt + pip install --index-url $PIP_INDEX_URL --extra-index-url $PIP_EXTRA_INDEX_URL $PIP_EXTRA_ARGS $debug_flag -r requirements.txt update_path $HOME/.local/bin fi } @@ -170,7 +171,9 @@ PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net} PIP_INDEX_URL=${PIP_INDEX_URL:-"https://pypi.org/simple"} CIC_SETUP_TRUSTED_FINGERPRINT=${CIC_SETUP_TRUSTED_FINGERPRINT:-0826EDA1702D1E87C6E2875121D2E7BB88C2A746} CIC_ROOT_URL=${CIC_ROOT_URL:-https://root.grassrootseconomics.net/env/dev} -CIC_ROOT_CA_FILE=${CIC_ROOT_CA_FILE:-keys/ge.ca} + +default_root_ca_file=`realpath ./keys/ge.ca` +CIC_ROOT_CA_FILE=${CIC_ROOT_CA_FILE:-$default_root_ca_file} if [ "$UID" -eq 0 ]; then dbg $dbg_error "This cannot be run as root" @@ -183,6 +186,8 @@ fi mkdir -vp $HOME/.local/bin dbg $dbg_debug "importing keys" + + setup_cic_gpg # check if we have existing setup if [ ! -e "$HOME/.config/cic/staff-client/.envinit" ]; then diff --git a/uninstall.sh b/uninstall.sh index 48de10b..613fc21 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -23,7 +23,6 @@ ${red}WARNING:${reset} The following will be DELETED if present: $HOME/.config/environment.d/01-cic-cache-server.conf $HOME/.config/environment.d/01-cic-cache-tracker.conf $HOME/.local/bin/cic_cache_server_start.sh - $HOME/.local/bin/migrate_cic_cache.py Would you still like to continue? (y/n):" read confirmed @@ -34,7 +33,7 @@ if [ "$confirmed" == "y" ]; then systemctl --user stop cic-cache-server systemctl --user disable cic-cache-tracker systemctl --user disable cic-cache-server - pip3 uninstall clicada cic cic-cache + pip uninstall -y clicada cic cic-cache echo "Deleting..." rm -rf $HOME/.local/share/cic/cache rm -rf $HOME/.local/share/cic/clicada @@ -48,7 +47,6 @@ if [ "$confirmed" == "y" ]; then rm $HOME/.config/environment.d/01-cic-cache-server.conf rm $HOME/.config/environment.d/01-cic-cache-tracker.conf rm $HOME/.local/bin/cic_cache_server_start.sh - rm $HOME/.local/bin/migrate_cic_cache.py echo "${green}Done${reset}" else echo "Aborting" -- 2.45.2