Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update deployment scripts to support mainnet & different architectures #174

Merged
merged 7 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Set Env Vars ##
###############################################################################
export CGO_ENABLED=1
export VERSION := $(shell echo $(shell git describe --tags --always --match "v*") | sed 's/^v//')
export VERSION := $(shell echo $(shell git describe --tags --always --match "v*"))
export COMMIT := $(shell git log -1 --format='%H')

###############################################################################
Expand Down
2 changes: 2 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,8 @@ func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig

// Register grpc-gateway routes for all modules.
app.bmm.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)

// register app's OpenAPI routes.
docs.RegisterOpenAPIService(Name, apiSvr.Router)
}
Expand Down
349 changes: 0 additions & 349 deletions go.work.sum

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions scripts/testnet/add_wasm_state_to_genesis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ function download_contract_release() {
# $1: Contract file name
# $2: Initial state
function store_and_instantiate() {
local TX_OUTPUT=$($BIN tx wasm store $WASM_DIR/$1 --from $ADDR --keyring-backend test --gas auto --gas-adjustment 1.2 --home $TMP_HOME --chain-id $TEMP_CHAIN_ID -y --output json)
local TX_OUTPUT=$($LOCAL_BIN tx wasm store $WASM_DIR/$1 --from $ADDR --keyring-backend test --gas auto --gas-adjustment 1.2 --home $TMP_HOME --chain-id $TEMP_CHAIN_ID -y --output json)
[[ -z "$TX_OUTPUT" ]] && { echo "failed to get tx output" ; exit 1; }
local TX_HASH=$(echo $TX_OUTPUT | jq -r .txhash)
sleep 10;

local STORE_TX_OUTPUT=$($BIN query tx $TX_HASH --home $TMP_HOME --output json)
local STORE_TX_OUTPUT=$($LOCAL_BIN query tx $TX_HASH --home $TMP_HOME --output json)
local CODE_ID=$(echo $STORE_TX_OUTPUT | jq -r '.events[] | select(.type | contains("store_code")).attributes[] | select(.key | contains("code_id")).value')
[[ -z "$CODE_ID" ]] && { echo "failed to get code ID" ; exit 1; }

local INSTANTIATE_OUTPUT=$($BIN tx wasm instantiate $CODE_ID "$2" --no-admin --from $ADDR --keyring-backend test --label $CODE_ID --gas auto --gas-adjustment 1.2 --home $TMP_HOME --chain-id $TEMP_CHAIN_ID -y --output json)
local INSTANTIATE_OUTPUT=$($LOCAL_BIN tx wasm instantiate $CODE_ID "$2" --no-admin --from $ADDR --keyring-backend test --label $CODE_ID --gas auto --gas-adjustment 1.2 --home $TMP_HOME --chain-id $TEMP_CHAIN_ID -y --output json)
TX_HASH=$(echo "$INSTANTIATE_OUTPUT" | jq -r '.txhash')
sleep 10;

local INSTANTIATE_TX_OUTPUT=$($BIN query tx $TX_HASH --home $TMP_HOME --output json)
local INSTANTIATE_TX_OUTPUT=$($LOCAL_BIN query tx $TX_HASH --home $TMP_HOME --output json)
local CONTRACT_ADDRESS=$(echo $INSTANTIATE_TX_OUTPUT | jq -r '.events[] | select(.type == "instantiate") | .attributes[] | select(.key == "_contract_address") | .value')
[[ -z "$CONTRACT_ADDRESS" ]] && { echo "failed to get contract address for ${1}" ; exit 1; }

Expand Down Expand Up @@ -95,16 +95,16 @@ TEMP_CHAIN_ID=temp-seda-chain
#
# SCRIPT BEGINS - START CHAIN
#
$BIN init node0 --home $TMP_HOME --chain-id $TEMP_CHAIN_ID --default-denom aseda
$LOCAL_BIN init node0 --home $TMP_HOME --chain-id $TEMP_CHAIN_ID --default-denom aseda

$BIN keys add deployer --home $TMP_HOME --keyring-backend test
ADDR=$($BIN keys show deployer --home $TMP_HOME --keyring-backend test -a)
$BIN add-genesis-account $ADDR 100000000000000000seda --home $TMP_HOME --keyring-backend test
$BIN gentx deployer 10000000000000000seda --home $TMP_HOME --keyring-backend test --chain-id $TEMP_CHAIN_ID
$BIN collect-gentxs --home $TMP_HOME
$LOCAL_BIN keys add deployer --home $TMP_HOME --keyring-backend test
ADDR=$($LOCAL_BIN keys show deployer --home $TMP_HOME --keyring-backend test -a)
$LOCAL_BIN add-genesis-account $ADDR 100000000000000000seda --home $TMP_HOME --keyring-backend test
$LOCAL_BIN gentx deployer 10000000000000000seda --home $TMP_HOME --keyring-backend test --chain-id $TEMP_CHAIN_ID
$LOCAL_BIN collect-gentxs --home $TMP_HOME


$BIN start --home $TMP_HOME > chain_output.log 2>&1 & disown
$LOCAL_BIN start --home $TMP_HOME > chain_output.log 2>&1 & disown

sleep 20

Expand All @@ -122,9 +122,9 @@ DR_ADDR=$(store_and_instantiate data_requests.wasm "$ARG")


# Call SetStaking and SetDataRequests on Proxy contract to set circular dependency
$BIN tx wasm execute $PROXY_ADDR '{"set_staking":{"contract":"'$STAKING_ADDR'"}}' --from $ADDR --gas auto --gas-adjustment 1.2 --keyring-backend test --home $TMP_HOME --chain-id $TEMP_CHAIN_ID -y
$LOCAL_BIN tx wasm execute $PROXY_ADDR '{"set_staking":{"contract":"'$STAKING_ADDR'"}}' --from $ADDR --gas auto --gas-adjustment 1.2 --keyring-backend test --home $TMP_HOME --chain-id $TEMP_CHAIN_ID -y
sleep 10
$BIN tx wasm execute $PROXY_ADDR '{"set_data_requests":{"contract":"'$DR_ADDR'"}}' --from $ADDR --gas auto --gas-adjustment 1.2 --keyring-backend test --home $TMP_HOME --chain-id $TEMP_CHAIN_ID -y
$LOCAL_BIN tx wasm execute $PROXY_ADDR '{"set_data_requests":{"contract":"'$DR_ADDR'"}}' --from $ADDR --gas auto --gas-adjustment 1.2 --keyring-backend test --home $TMP_HOME --chain-id $TEMP_CHAIN_ID -y
sleep 10


Expand All @@ -134,7 +134,7 @@ sleep 10
pkill seda-chaind
sleep 5

$BIN export --home $TMP_HOME > $TMP_HOME/exported
$LOCAL_BIN export --home $TMP_HOME > $TMP_HOME/exported
python3 -m json.tool $TMP_HOME/exported > $TMP_HOME/genesis.json
rm $TMP_HOME/exported

Expand Down
48 changes: 40 additions & 8 deletions scripts/testnet/config_example.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,46 @@

NODE_DIR=./nodes # where node directories will be created
WASM_DIR=./artifacts # where Wasm files are located
CHAIN_ID=seda-1-testnet
GENESIS_TIME="2024-01-18T22:00:00.000000Z"

CHAIN_VERSION=v0.0.4
WASMVM_VERSION=v1.5.2

LOCAL_BIN=$(git rev-parse --show-toplevel)/build/seda-chaind # chain binary executable on your machine

HOME_DIR=$HOME/.seda-chain # chain directory
HOME_CONFIG_DIR=$HOME_DIR/config # chain config directory

BIN=$(git rev-parse --show-toplevel)/build/seda-chaind # chain binary executable on your machine
LINUX_BIN=$(git rev-parse --show-toplevel)/build/seda-chaind-linux # linux version of chain binary
NODE_DIR=./$CHAIN_ID-nodes # where node directories will be created
WASM_DIR=./artifacts # where Wasm files will be downloaded

CHAIN_ID=seda-testnet
# GENESIS_TIME=
DENOM_METADATA='[
{
"description": "The token asset for SEDA Chain",
"denom_units": [
{
"denom": "aseda",
"exponent": 0,
"aliases": [
"attoseda"
]
},
{
"denom": "seda",
"exponent": 18,
"aliases": []
}
],
"base": "aseda",
"display": "seda",
"name": "seda",
"symbol": "SEDA"
}
]'

IBC_ALLOWED_CLIENTS='[
"06-solomachine",
"07-tendermint"
]'

#######################################
########### VALIDATOR NODES ###########
Expand All @@ -33,7 +63,6 @@ SELF_DELEGATION_AMOUNTS=(

SSH_KEY=~/.ssh/id_rsa # key used for ssh


#######################################
########## GENESIS ACCOUNTS ###########
#######################################
Expand All @@ -48,9 +77,12 @@ GENESIS_ADDRESSES=(
SATOSHI=seda... # if set, creates a genesis account with 100x seda tokens compared to standard genesis account
FAUCET=seda... # if set, creates a genesis account with 10x seda tokens compared to standard genesis account

#######################################
######### COSMWASM CONTRACTS ##########
#######################################
CONTRACTS_VERSION=v0.0.1-rc # latest or seda-chain-contracts release version

#######################################
############### GITHUB ################
#######################################
GITHUB_TOKEN=ghp_... # github token for accessing seda-chain-contracts repo
CONTRACTS_VERSION=v0.0.1-rc # latest or seda-chain-contracts release version
67 changes: 51 additions & 16 deletions scripts/testnet/create_genesis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,71 @@ source config.sh
#
# PRELIMINARY PROCESS
#
if [ $($LOCAL_BIN version) != $CHAIN_VERSION ]; then
echo "Local chain version is" $($LOCAL_BIN version) "instead of" $CHAIN_VERSION
exit 1
fi

rm -rf $HOME_DIR
rm -rf $NODE_DIR

#
# CREATE GENESIS AND ADJUST GOV PARAMETERS
# CREATE GENESIS AND ADJUST GENESIS PARAMETERS
#
$BIN init node0 --chain-id $CHAIN_ID --default-denom aseda
$LOCAL_BIN init node0 --chain-id $CHAIN_ID --default-denom aseda

cat $HOME/.seda-chain/config/genesis.json | jq --arg GENESIS_TIME $GENESIS_TIME '.genesis_time=$GENESIS_TIME' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json

# bank params
cat $HOME/.seda-chain/config/genesis.json | jq --argjson denom_metadata "$DENOM_METADATA" '.app_state["bank"]["denom_metadata"]=$denom_metadata' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json

# crisis params
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["amount"]="1000000000000"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json

# distribution params
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["distribution"]["params"]["community_tax"]="0.000000000000000000"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["distribution"]["params"]["base_proposer_reward"]="0.010000000000000000"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["distribution"]["params"]["bonus_proposer_reward"]="0.040000000000000000"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json

# gov params
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["gov"]["voting_params"]["voting_period"]="180s"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["gov"]["params"]["voting_period"]="180s"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["gov"]["params"]["expedited_voting_period"]="150s"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["gov"]["params"]["max_deposit_period"]="180s"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json
cat $HOME/.seda-chain/config/genesis.json | jq '.consensus_params["block"]["max_gas"]="100000000"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["gov"]["params"]["min_initial_deposit_ratio"]="0.010000000000000000"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json

# ibc params
cat $HOME/.seda-chain/config/genesis.json | jq --argjson ibc_allowed_clients "$IBC_ALLOWED_CLIENTS" '.app_state["ibc"]["client_genesis"]["params"]["allowed_clients"]=$ibc_allowed_clients' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json

# mint params
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["mint"]["params"]["blocks_per_year"]="4204800"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json

# slashing params
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["slashing"]["params"]["signed_blocks_window"]="10000"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["slashing"]["params"]["min_signed_per_window"]="0.050000000000000000"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["slashing"]["params"]["downtime_jail_duration"]="600s"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["slashing"]["params"]["slash_fraction_double_sign"]="0.050000000000000000"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json
cat $HOME/.seda-chain/config/genesis.json | jq '.app_state["slashing"]["params"]["slash_fraction_downtime"]="0.0001"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json

# consensus params
cat $HOME/.seda-chain/config/genesis.json | jq '.consensus["params"]["block"]["max_gas"]="100000000"' > $HOME/.seda-chain/config/tmp_genesis.json && mv $HOME/.seda-chain/config/tmp_genesis.json $HOME/.seda-chain/config/genesis.json

# TO-DO?
# - chain id
# - launch time
# TO-DO gov (intentionally adjusted for testing): voting_params.voting_period, params.voting_period, params.expedited_voting_period, min_deposit[0].amount, max_deposit_period
# TO-DO wasm params

#
# ADD GENESIS ACCOUNTS
#
for i in ${!GENESIS_ADDRESSES[@]}; do
$BIN add-genesis-account ${GENESIS_ADDRESSES[$i]} 100000000000000000seda
$LOCAL_BIN add-genesis-account ${GENESIS_ADDRESSES[$i]} 100000000000000000seda
done

set +u
if [ ! -z "$SATOSHI" ]; then
$BIN add-genesis-account $SATOSHI 10000000000000000000seda
$LOCAL_BIN add-genesis-account $SATOSHI 10000000000000000000seda
fi
if [ ! -z "$FAUCET" ]; then
$BIN add-genesis-account $FAUCET 1000000000000000000seda
$LOCAL_BIN add-genesis-account $FAUCET 1000000000000000000seda
fi
set -u

Expand All @@ -57,21 +92,21 @@ for i in ${!MONIKERS[@]}; do
INDIVIDUAL_VAL_HOME_DIR=$NODE_DIR/${MONIKERS[$i]}
INDIVIDUAL_VAL_CONFIG_DIR="$INDIVIDUAL_VAL_HOME_DIR/config"

$BIN init ${MONIKERS[$i]} --home $INDIVIDUAL_VAL_HOME_DIR --chain-id $CHAIN_ID --default-denom aseda
$BIN keys add ${MONIKERS[$i]} --keyring-backend=test --home $INDIVIDUAL_VAL_HOME_DIR
$LOCAL_BIN init ${MONIKERS[$i]} --home $INDIVIDUAL_VAL_HOME_DIR --chain-id $CHAIN_ID --default-denom aseda
$LOCAL_BIN keys add ${MONIKERS[$i]} --keyring-backend=test --home $INDIVIDUAL_VAL_HOME_DIR

VALIDATOR_ADDRESS=$($BIN keys show ${MONIKERS[$i]} --keyring-backend test --home $INDIVIDUAL_VAL_HOME_DIR -a)
VALIDATOR_ADDRESS=$($LOCAL_BIN keys show ${MONIKERS[$i]} --keyring-backend test --home $INDIVIDUAL_VAL_HOME_DIR -a)

# to create their gentx
$BIN add-genesis-account $VALIDATOR_ADDRESS 500000000000000000seda --home $INDIVIDUAL_VAL_HOME_DIR
$LOCAL_BIN add-genesis-account $VALIDATOR_ADDRESS 500000000000000000seda --home $INDIVIDUAL_VAL_HOME_DIR
# to output geneis file
$BIN add-genesis-account $VALIDATOR_ADDRESS 500000000000000000seda
$LOCAL_BIN add-genesis-account $VALIDATOR_ADDRESS 500000000000000000seda

$BIN gentx ${MONIKERS[$i]} ${SELF_DELEGATION_AMOUNTS[$i]} --moniker=${MONIKERS[$i]} --keyring-backend=test --home $INDIVIDUAL_VAL_HOME_DIR --ip=${IPS[$i]} --chain-id $CHAIN_ID
$LOCAL_BIN gentx ${MONIKERS[$i]} ${SELF_DELEGATION_AMOUNTS[$i]} --moniker=${MONIKERS[$i]} --keyring-backend=test --home $INDIVIDUAL_VAL_HOME_DIR --ip=${IPS[$i]} --chain-id $CHAIN_ID

cp -a $INDIVIDUAL_VAL_CONFIG_DIR/gentx/. $GENTX_DIR
done

cp -r $GENTX_DIR $HOME_CONFIG_DIR
$BIN collect-gentxs --home $HOME_DIR
$LOCAL_BIN collect-gentxs --home $HOME_DIR
cp $HOME_CONFIG_DIR/genesis.json $NODE_DIR
40 changes: 21 additions & 19 deletions scripts/testnet/setup_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ set -e
# and systemctl service.
#
# NOTE: Assumes ami-0a1ab4a3fcf997a9d
WASMVM_VERSION=$1

COSMOVISOR_URL=https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.3.0/cosmovisor-v1.3.0-linux-arm64.tar.gz
COSMOVISOR_TAR_GZ=cosmovisor-v1.3.0-linux-arm64.tar.gz
LIBWASMVM_URL=https://github.com/CosmWasm/wasmvm/releases/download/v1.3.0/libwasmvm.aarch64.so
LIBWASMVM=libwasmvm.aarch64.so
ARCH=$(uname -m)
if [ $ARCH != "aarch64" ]; then
ARCH="x86_64"
fi

COSMOVISOR_URL=https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.3.0/cosmovisor-v1.3.0-linux-amd64.tar.gz
if [ $ARCH = "aarch64" ]; then
COSMOVISOR_URL=https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.3.0/cosmovisor-v1.3.0-linux-arm64.tar.gz
fi
LIBWASMVM_URL=https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm.$ARCH.so

COSMOS_LDS=$HOME/COSMOS_LDS
SYSFILE=/etc/systemd/system/seda-node.service
Expand All @@ -21,11 +28,9 @@ if ! which cosmovisor >/dev/null; then

curl -LO $COSMOVISOR_URL
mkdir -p tmp
tar -xzvf $COSMOVISOR_TAR_GZ -C ./tmp
mv ./tmp/cosmovisor .
rm -rf ./tmp ./$COSMOVISOR_TAR_GZ

sudo mv $HOME/cosmovisor /usr/local/bin
tar -xzvf $(basename $COSMOVISOR_URL) -C ./tmp
sudo mv ./tmp/cosmovisor /usr/local/bin
rm -rf ./tmp

echo 'export DAEMON_NAME=seda-chaind' >> $HOME/.bashrc
echo 'export DAEMON_HOME=$HOME/.seda-chain' >> $HOME/.bashrc
Expand All @@ -39,19 +44,16 @@ if ! which cosmovisor >/dev/null; then
echo 'export DAEMON_PREUPGRADE_MAX_RETRIES=0' >> $HOME/.bashrc
echo 'export PATH=$PATH:$HOME/.seda-chain/cosmovisor/current/bin' >> $HOME/.bashrc

# set up shared libraries if necessary
if [ ! -d $COSMOS_LDS ]; then
printf "\n\n\nSETTING UP SHARED LIBRARY\n\n\n\n"

mkdir -p $COSMOS_LDS
curl -LO $LIBWASMVM_URL
mv $LIBWASMVM $COSMOS_LDS
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/COSMOS_LDS' >> $HOME/.bashrc
fi

source $HOME/.bashrc
fi

# set up shared libraries (overwrite if already exists to ensure desired version)
printf "\n\n\nSETTING UP SHARED LIBRARY\n\n\n\n"
mkdir -p $COSMOS_LDS
curl -LO $LIBWASMVM_URL
mv $(basename $LIBWASMVM_URL) $COSMOS_LDS
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/COSMOS_LDS' >> $HOME/.bashrc

# create systemctl service file if necessary
if [ ! -f $SYSFILE ]; then
printf "\n\n\nSETTING UP SYSTEMCTL\n\n\n\n"
Expand Down
Loading
Loading