Compare commits

..

No commits in common. "64d7e032a03b99470ca0cee059e86b2189789e6c" and "6c7050888fc79ffb5690b0488a0dbb007a80f9fa" have entirely different histories.

10 changed files with 13 additions and 94 deletions

View File

@ -2,4 +2,4 @@
t=`mktemp`
f=`python -c "import cic_cache; import os; s = os.path.dirname(cic_cache.__file__); print(os.path.join(s, 'runnable', 'daemons', 'server.py'))"`
uwsgi --plugin python --wsgi-file $f --http $SERVER_HOST:$SERVER_PORT --pyargv "-c $HOME/.config/cic/cache $@"
uwsgi --wsgi-file $f --http $SERVER_HOST:$SERVER_PORT --pyargv "-c $HOME/.config/cic/cache $@"

View File

@ -2,8 +2,7 @@
want_cic_cache_version=0.2.1a10
want_cicada_version=0.0.1a7
#want_evm=bloxberg
want_evm=
want_evm=bloxberg
. aux/bdbg/bdbg.sh
@ -33,7 +32,6 @@ done
t=`mktemp`
dbg $dbg_debug "identify root values"
set -e
# check if we have existing setup
if [ ! -f "$HOME/.config/cic/staff-client/key_fingerprint" ]; then
dbg $dbg_debug "load default environment"
@ -83,12 +81,7 @@ if [ ! -f "$HOME/.config/cic/staff-client/key_fingerprint" ]; then
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/staff-client/.gnupg
export
fi
set +e
dbg $dbg_debug "checking installed versions"
@ -156,16 +149,14 @@ 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"
@ -176,11 +167,3 @@ python ../cic-internal-integration/apps/cic-cache/scripts/migrate.py -c $HOME/.c
if [ ! -z $want_evm ]; then
. setup_${want_evm}.sh
fi
t=`mktemp`
clicada --dumpconfig env $clicada_config_flag -vv > $t
set -a
. $t
set +a
. setup_systemd.sh

View File

@ -7,7 +7,7 @@ function checkk {
fi
}
exec=(systemctl clang git rustup gcc cmake pip python3 psql postgres)
exec=(clang git rustup gcc cmake pip python3 psql postgres)
for e in ${exec[@]}; do
dbg $dbg_trace "Checking for dependency $e"

View File

@ -33,45 +33,17 @@ echo "If you lose this passphrase you WILL lose access to your key PERMANENTLY."
echo "Keep it secret."
echo -e "Keep it safe.\e[0m"
stty -echo
password_match=
while [ -z $password_match ]; do
echo
echo -n "password: "
read password
echo
echo -n "password again: "
read password_again
echo
if [ "$password" == "$password_again" ]; then
password_match=1
else
echo "passwords do not match, try again"
fi
done
stty echo
password_file=`mktemp`
touch $password_file
chmod -v 600 $password_file
echo -n $password > $password_file
t=`mktemp -d`
gpg --homedir $t --pinentry-mode loopback --passphrase-file $password_file --quick-gen-key "$pgp_name (CIC staff client signing key) <$pgp_email>" secp256k1 sign 0
gpg --homedir $t --quick-gen-key "$pgp_name (CIC staff client signing key) <$pgp_email>" secp256k1 sign 0
#echo -e "\e[0;93mNow let's see if you've forgotten your passphrase already"
#echo -e "Please enter it again at the given prompts to import the newly created key into your environment\e[0m"
echo -e "\e[0;93mNow let's see if you've forgotten your passphrase already"
echo -e "Please enter it again at the given prompts to import the newly created key into your environment\e[0m"
mkdir -vp $HOME/.config/cic/staff-client/.gnupg
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 $t --export-secret-keys | gpg --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 --homedir $t --pinentry-mode loopback --passphrase-file $password_file --quick-add-key `cat $HOME/.config/cic/staff-client/key_fingerprint` default encrypt 0
shred -v $password_file

View File

@ -10,7 +10,7 @@ function update_path {
fi
done
if [ -z "$matchpath" ]; then
dbg $dbg_info "Adding executable path $pathdir to \$PATH"
dbg dbg_info "Adding executable path $pathdir to \$PATH"
export PATH=$PATH:$pathdir
echo "export PATH=\$PATH:$pathdir" >> $HOME/.bashrc
fi

View File

@ -1,20 +0,0 @@
mkdir -vp $HOME/.config/systemd/user
mkdir -vp $HOME/.config/environment.d
. aux/bdbg/bdbg.sh
_level=2
_debug=1
cp -v systemd/*.service $HOME/.config/systemd/user/
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
done
#cp -v systemd/env/*.conf $HOME/.config/environment.d/
cp -v systemd/bin/cic_cache_server_start.sh $HOME/.local/bin/
chmod -v 750 $HOME/.local/bin/cic_cache_server_start.sh

View File

@ -1,10 +0,0 @@
[Unit]
Description=CIC transaction cache syncer
After=network.target
[Service]
ExecStart=%h/.local/bin/cic_cache_server_start.sh -vv
Restart=always
[Install]
WantedBy=network.target

View File

@ -3,8 +3,8 @@ Description=CIC transaction cache syncer
After=network.target
[Service]
ExecStart=%h/.local/bin/cic-cache-trackerd -c %h/.config/cic/cache
ExecStart="cic-cache-trackerd -c %h/.config/cic/cache"
Restart=always
[Install]
WantedBy=network.target
After=network.target

View File

@ -1,6 +0,0 @@
RPC_PROVIDER={{RPC_PROVIDER}}
CHAIN_SPEC={{CHAIN_SPEC}}
SERVER_HOST=localhost
SERVER_PORT=8636
TX_CACHE_URL=http://localhost:8636
#META_URL=

View File

@ -1,2 +1,2 @@
RPC_PROVIDER={{RPC_PROVIDER}}
CHAIN_SPEC={{CHAIN_SPEC}}
RPC_PROVIDER={{RPC_PROVIDER=http://localhost:8545}}
CHAIN_SPEC={{CHAIN_SPEC=evm:byzantium:8995:bloxberg}}