chore: clean up #2

Open
williamluke wants to merge 18 commits from lum/kitabu into master
27 changed files with 1606 additions and 223 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.clicada

10
CHANGELOG Normal file
View File

@ -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

1
VERSION Normal file
View File

@ -0,0 +1 @@
0.0.3

46
install.sh Normal file
View File

@ -0,0 +1,46 @@
# Example Usage
# 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/rsync-install-script.sh to sync it to the server
branch='master'
verbose='false'
evm= # kitabu | bloxberg
print_usage() {
printf "CIC Staff Installer
Options:
-b <branch> Name of the branch you want use to install
-e <evm> Name of the EVM you want to install (kitabu, bloxberg; default is none)
-v Verbose
-h Print this help message
"
}
while getopts 'e:hb:v' flag; do
case "${flag}" in
b) branch="${OPTARG}" ;;
e) evm="${OPTARG}" ;;
v) verbose='true' ;;
h) print_usage
exit 0 ;;
*) print_usage
exit 1 ;;
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
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
# export CIC_ROOT_CA_FILE=$temp_dir/keys/ge.ca
pushd $temp_dir
bash setup.sh
popd

View File

@ -0,0 +1,41 @@
-----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HztfUZPjbb/E1gq6AHIMFbHxyf/3GyAaZl/ij8bHmZfgn4jrwSw2pJFvu8m7i4i9
+HMScGMJIMgOXhUUPTaMJNkfS+Bv+pxNFy6D/62O8gugqs/Z3p6r3gtkv2AiKHI8
PVqIZp+0k5SqHKuZw+xxU6phxjQWQInz7zRvVno1LkVxXeKgiv/WDLRZLdHnnhuu
32FsNGKAJ0/4YM3/tiLkpVa9ElmE6BY4V0sBy63gG0UyHRIiQuPgGmlpM+qXTX87
gdWXxsa421+RpqUXu7RfXsACtgWKOir8NZqitII7AAiCXDxIRiY+EB5EZkN/
-----END CERTIFICATE-----

View File

@ -1 +1,2 @@
0826EDA1702D1E87C6E2875121D2E7BB88C2A746:6:
215D7EB6661AD0424219FA3AB4F81B106B081C23:6:

View File

@ -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.6rc1
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

View File

@ -1,3 +1,3 @@
cic-cache==0.3.0a2
clicada==0.0.2a3
clicada==0.0.6rc1
cic==0.0.2

2
rsync-scripts.sh Normal file
View File

@ -0,0 +1,2 @@
bash ./rsync/rsync-install-script.sh
bash ./rsync/rsync-uninstall-script.sh

View File

@ -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

View File

@ -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

317
setup.sh
View File

@ -1,23 +1,183 @@
#!/bin/bash
want_cic_cache_version=0.3.0a2
want_cicada_version=0.0.2a3
#INSTALL_EVM=bloxberg
want_cicada_version=0.0.6rc1
. 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}
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
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"
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
}
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}
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}
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"
exit 1
dbg $dbg_error "This cannot be run as root"
exit 1
fi
. setup_check.sh
@ -27,145 +187,28 @@ 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 [ ! -f "$HOME/.config/cic/staff-client/key_fingerprint" ]; 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 $CIC_ROOT_URL/cic-staff-client/$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
if [ ! -e "$HOME/.config/cic/staff-client/.envinit" ]; then
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_${INSTALL_EVM}.sh
fi

View File

@ -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

View File

@ -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)

120
setup_evm.sh Normal file
View File

@ -0,0 +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
load_env
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 evm node executable in $OPENETHEREUM_PATH"
fi
#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_CONFIG directory! Skipping
fi
update_path $openethereum_dir
if [ ! -z "$install_env" ]; then
popd
fi

View File

@ -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

View File

@ -3,11 +3,11 @@ 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/
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`
@ -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

View File

@ -1,9 +0,0 @@
[Unit]
Description=Bloxberg openethereum node
After=network.target
[Service]
ExecStart=/bin/bash -c ${OPENETHEREUM_PATH} --config ${OPENETHEREUM_CONFIG}/bootnode.toml
[Install]
WantedBy=network.target

View File

@ -1,2 +1,3 @@
OPENETHEREUM_PATH={{OPENETHEREUM_PATH}}
OPENETHEREUM_CONFIG={{OPENETHEREUM_CONFIG}}
OPENETHEREUM_CHAIN={{OPENETHEREUM_CHAIN}}

3
systemd/env/01-kitabu.conf vendored Normal file
View File

@ -0,0 +1,3 @@
OPENETHEREUM_PATH={{OPENETHEREUM_PATH}}
OPENETHEREUM_CONFIG={{OPENETHEREUM_CONFIG}}
OPENETHEREUM_CHAIN={{OPENETHEREUM_CHAIN}}

9
systemd/node.service Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description="{{OPENETHEREUM_CHAIN}} openethereum node"
After=network.target
[Service]
ExecStart={{OPENETHEREUM_PATH}} --config {{OPENETHEREUM_CONFIG}}/bootnode.toml
[Install]
WantedBy=network.target

38
uninstall-evm.sh Normal file
View File

@ -0,0 +1,38 @@
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
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
$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 -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
echo "Aborting"
fi
exit 0

73
uninstall.sh Normal file
View File

@ -0,0 +1,73 @@
# 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`
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
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
pip uninstall -y 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
echo "${green}Done${reset}"
else
echo "Aborting"
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

55
var/kitabu/bootnode.toml Normal file
View File

@ -0,0 +1,55 @@
[parity]
chain = "{{OPENETHEREUM_CONFIG}}/{{OPENETHEREUM_CHAIN}}.json"
base_path = "{{OPENETHEREUM_CONFIG}}/data"
[network]
port = 30303
# reserved_only = true
max_peers = 10
snapshot_peers = 25
#nat = "extip:100.102.26.121"
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",
]
interface = "all"
cors = ["*"]
[websockets]
disable = false
port = 8546
interface = "all"
origins = ["all"]
[account]
password = ["{{OPENETHEREUM_CONFIG}}/bootnode.pwd"]
[mining]
#CHANGE ENGINE SIGNER TO VALIDATOR ADDRESS
engine_signer = "{{SIGNER_ADDRESS}}"
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"

1
var/kitabu/bootnodes.txt Normal file
View File

@ -0,0 +1 @@
enode://1afcca0aa282672539aa16c4319b659476fa2c05bf0756408108bf149c5c31c59e71a7f5ac98c1335a59653f25c93c54afacbb101e48d361f55c6cf224c6966e@159.223.42.214:30303

939
var/kitabu/kitabu.json Normal file
View File

@ -0,0 +1,939 @@
{
"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"
}
}
}