changed binary names and source repos in docker files and readmes

This commit is contained in:
SpideyPool192
2022-09-07 12:56:51 +05:30
parent a57e5f4fd9
commit 09d81e4d66
60 changed files with 1930 additions and 1919 deletions
+15 -15
View File
@@ -1,41 +1,41 @@
#!/bin/bash
KEY="mykey"
CHAINID="chibaclonk_9000-1"
CHAINID="laconic_9000-1"
MONIKER="localtestnet"
# stop and remove existing daemon and client data and process(es)
rm -rf ~/.chibaclonk*
pkill -f "chibaclonk*"
rm -rf ~/.laconic*
pkill -f "laconic*"
make build
# if $KEY exists it should be override
"$PWD"/build/chibaclonkd keys add $KEY --keyring-backend test --algo "eth_secp256k1"
"$PWD"/build/laconicd keys add $KEY --keyring-backend test --algo "eth_secp256k1"
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
"$PWD"/build/chibaclonkd init $MONIKER --chain-id $CHAINID
"$PWD"/build/laconicd init $MONIKER --chain-id $CHAINID
# Change parameter token denominations to aphoton
cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="stake"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="stake"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
# Allocate genesis accounts (cosmos formatted addresses)
"$PWD"/build/chibaclonkd add-genesis-account "$("$PWD"/build/chibaclonkd keys show "$KEY" -a --keyring-backend test)" 100000000000000000000aphoton,10000000000000000000stake --keyring-backend test
"$PWD"/build/laconicd add-genesis-account "$("$PWD"/build/laconicd keys show "$KEY" -a --keyring-backend test)" 100000000000000000000aphoton,10000000000000000000stake --keyring-backend test
# Sign genesis transaction
"$PWD"/build/chibaclonkd gentx $KEY 10000000000000000000stake --amount=100000000000000000000aphoton --keyring-backend test --chain-id $CHAINID
"$PWD"/build/laconicd gentx $KEY 10000000000000000000stake --amount=100000000000000000000aphoton --keyring-backend test --chain-id $CHAINID
# Collect genesis tx
"$PWD"/build/chibaclonkd collect-gentxs
"$PWD"/build/laconicd collect-gentxs
# Run this to ensure everything worked and that the genesis file is setup correctly
"$PWD"/build/chibaclonkd validate-genesis
"$PWD"/build/laconicd validate-genesis
# Start the node (remove the --pruning=nothing flag if historical queries are not needed) in background and log to file
"$PWD"/build/chibaclonkd start --pruning=nothing --mode validator --rpc.unsafe --json-rpc.address="0.0.0.0:8545" --keyring-backend test > ethermintd.log 2>&1 &
"$PWD"/build/laconicd start --pruning=nothing --mode validator --rpc.unsafe --json-rpc.address="0.0.0.0:8545" --keyring-backend test > ethermintd.log 2>&1 &
# Give ethermintd node enough time to launch
sleep 5
@@ -51,7 +51,7 @@ echo "$ACCT"
# Start testcases (not supported)
# curl -X POST --data '{"jsonrpc":"2.0","method":"personal_unlockAccount","params":["'$ACCT'", ""],"id":1}' -H "Content-Type: application/json" http://localhost:8545
#PRIVKEY="$("$PWD"/build/chibaclonkd keys export $KEY)"
#PRIVKEY="$("$PWD"/build/laconicd keys export $KEY)"
## need to get the private key from the account in order to check this functionality.
cd tests/solidity/suites/basic/ && go get && go run main.go $ACCT
+24 -24
View File
@@ -17,10 +17,10 @@ RPC_PORT="854"
IP_ADDR="0.0.0.0"
KEY="mykey"
CHAINID="chibaclonk_9000-1"
CHAINID="laconic_9000-1"
MONIKER="mymoniker"
## default port prefixes for chibaclonkd
## default port prefixes for laconicd
NODE_P2P_PORT="2660"
NODE_PORT="2663"
NODE_RPC_PORT="2666"
@@ -54,28 +54,28 @@ done
set -euxo pipefail
DATA_DIR=$(mktemp -d -t chibaclonk-datadir.XXXXX)
DATA_DIR=$(mktemp -d -t laconic-datadir.XXXXX)
if [[ ! "$DATA_DIR" ]]; then
echo "Could not create $DATA_DIR"
exit 1
fi
# Compile chibaclonk
echo "compiling chibaclonk"
# Compile laconic
echo "compiling laconic"
make build
# PID array declaration
arr=()
init_func() {
"$PWD"/build/chibaclonkd keys add $KEY"$i" --keyring-backend test --home "$DATA_DIR$i" --no-backup --algo "eth_secp256k1"
"$PWD"/build/chibaclonkd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
"$PWD"/build/chibaclonkd add-genesis-account \
"$("$PWD"/build/chibaclonkd keys show "$KEY$i" --keyring-backend test -a --home "$DATA_DIR$i")" 1000000000000000000aphoton,1000000000000000000stake \
"$PWD"/build/laconicd keys add $KEY"$i" --keyring-backend test --home "$DATA_DIR$i" --no-backup --algo "eth_secp256k1"
"$PWD"/build/laconicd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
"$PWD"/build/laconicd add-genesis-account \
"$("$PWD"/build/laconicd keys show "$KEY$i" --keyring-backend test -a --home "$DATA_DIR$i")" 1000000000000000000aphoton,1000000000000000000stake \
--keyring-backend test --home "$DATA_DIR$i"
"$PWD"/build/chibaclonkd gentx "$KEY$i" 1000000000000000000stake --chain-id $CHAINID --keyring-backend test --home "$DATA_DIR$i"
"$PWD"/build/chibaclonkd collect-gentxs --home "$DATA_DIR$i"
"$PWD"/build/chibaclonkd validate-genesis --home "$DATA_DIR$i"
"$PWD"/build/laconicd gentx "$KEY$i" 1000000000000000000stake --chain-id $CHAINID --keyring-backend test --home "$DATA_DIR$i"
"$PWD"/build/laconicd collect-gentxs --home "$DATA_DIR$i"
"$PWD"/build/laconicd validate-genesis --home "$DATA_DIR$i"
if [[ $MODE == "pending" ]]; then
ls $DATA_DIR$i
@@ -104,8 +104,8 @@ init_func() {
}
start_func() {
echo "starting chibaclonk node $i in background ..."
"$PWD"/build/chibaclonkd start \
echo "starting laconic node $i in background ..."
"$PWD"/build/laconicd start \
--pruning=nothing --rpc.unsafe \
--p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" \
--address tcp://$IP_ADDR:$NODE_PORT"$i" \
@@ -116,10 +116,10 @@ start_func() {
--log_level debug \
>"$DATA_DIR"/node"$i".log 2>&1 & disown
CHIBACLONK_PID=$!
echo "started chibaclonk node, pid=$CHIBACLONK_PID"
LACONIC_PID=$!
echo "started laconic node, pid=$LACONIC_PID"
# add PID to array
arr+=("$CHIBACLONK_PID")
arr+=("$LACONIC_PID")
if [[ $MODE == "pending" ]]; then
echo "waiting for the first block..."
@@ -149,7 +149,7 @@ if [[ -z $TEST || $TEST == "integration" ]] ; then
for i in $(seq 1 "$TEST_QTD"); do
HOST_RPC=http://$IP_ADDR:$RPC_PORT"$i"
echo "going to test chibaclonk node $HOST_RPC ..."
echo "going to test laconic node $HOST_RPC ..."
MODE=$MODE HOST=$HOST_RPC go test ./tests/e2e/... -timeout=$time_out -v -short
TEST_FAIL=$?
done
@@ -163,7 +163,7 @@ if [[ -z $TEST || $TEST == "rpc" || $TEST == "pending" ]]; then
for i in $(seq 1 "$TEST_QTD"); do
HOST_RPC=http://$IP_ADDR:$RPC_PORT"$i"
echo "going to test chibaclonk node $HOST_RPC ..."
echo "going to test laconic node $HOST_RPC ..."
MODE=$MODE HOST=$HOST_RPC go test ./tests/rpc/... -timeout=$time_out -v -short
TEST_FAIL=$?
@@ -171,12 +171,12 @@ if [[ -z $TEST || $TEST == "rpc" || $TEST == "pending" ]]; then
fi
stop_func() {
CHIBACLONK_PID=$i
echo "shutting down node, pid=$CHIBACLONK_PID ..."
LACONIC_PID=$i
echo "shutting down node, pid=$LACONIC_PID ..."
# Shutdown chibaclonk node
kill -9 "$CHIBACLONK_PID"
wait "$CHIBACLONK_PID"
# Shutdown laconic node
kill -9 "$LACONIC_PID"
wait "$LACONIC_PID"
if [ $REMOVE_DATA_DIR == "true" ]
then
+1 -1
View File
@@ -3,7 +3,7 @@ export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
# remove existing daemon
rm -rf ~/.chibaclonk*
rm -rf ~/.laconic*
# build ethermint binary
make install
+4 -4
View File
@@ -1,11 +1,11 @@
#!/bin/sh
echo "prepare genesis: Run validate-genesis to ensure everything worked and that the genesis file is setup correctly"
chibaclonkd validate-genesis --home /chibaclonk
laconicd validate-genesis --home /laconic
echo "starting chibaclonk node $ID in background ..."
chibaclonkd start \
--home /chibaclonk \
echo "starting laconic node $ID in background ..."
laconicd start \
--home /laconic \
--keyring-backend test \
--mode validator
+14 -14
View File
@@ -61,8 +61,8 @@ if [[ ! "$DATA_CLI_DIR" ]]; then
exit 1
fi
# Compile chibaclonk
echo "compiling chibaclonk"
# Compile laconic
echo "compiling laconic"
make build
# PID array declaration
@@ -73,31 +73,31 @@ arrcli=()
init_func() {
echo "create and add new keys"
"$PWD"/build/chibaclonkd keys add $KEY"$i" --home "$DATA_DIR$i" --no-backup --chain-id $CHAINID --algo "eth_secp256k1" --keyring-backend test
"$PWD"/build/laconicd keys add $KEY"$i" --home "$DATA_DIR$i" --no-backup --chain-id $CHAINID --algo "eth_secp256k1" --keyring-backend test
echo "init Ethermint with moniker=$MONIKER and chain-id=$CHAINID"
"$PWD"/build/chibaclonkd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
"$PWD"/build/laconicd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
echo "prepare genesis: Allocate genesis accounts"
"$PWD"/build/chibaclonkd add-genesis-account \
"$("$PWD"/build/chibaclonkd keys show "$KEY$i" -a --home "$DATA_DIR$i" --keyring-backend test)" 1000000000000000000aphoton,1000000000000000000stake \
"$PWD"/build/laconicd add-genesis-account \
"$("$PWD"/build/laconicd keys show "$KEY$i" -a --home "$DATA_DIR$i" --keyring-backend test)" 1000000000000000000aphoton,1000000000000000000stake \
--home "$DATA_DIR$i" --keyring-backend test
echo "prepare genesis: Sign genesis transaction"
"$PWD"/build/chibaclonkd gentx $KEY"$i" 1000000000000000000stake --keyring-backend test --home "$DATA_DIR$i" --keyring-backend test --chain-id $CHAINID
"$PWD"/build/laconicd gentx $KEY"$i" 1000000000000000000stake --keyring-backend test --home "$DATA_DIR$i" --keyring-backend test --chain-id $CHAINID
echo "prepare genesis: Collect genesis tx"
"$PWD"/build/chibaclonkd collect-gentxs --home "$DATA_DIR$i"
"$PWD"/build/laconicd collect-gentxs --home "$DATA_DIR$i"
echo "prepare genesis: Run validate-genesis to ensure everything worked and that the genesis file is setup correctly"
"$PWD"/build/chibaclonkd validate-genesis --home "$DATA_DIR$i"
"$PWD"/build/laconicd validate-genesis --home "$DATA_DIR$i"
}
start_func() {
echo "starting chibaclonk node $i in background ..."
"$PWD"/build/chibaclonkd start --pruning=nothing --rpc.unsafe \
echo "starting laconic node $i in background ..."
"$PWD"/build/laconicd start --pruning=nothing --rpc.unsafe \
--p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \
--json-rpc.address=$IP_ADDR:$RPC_PORT"$i" \
--keyring-backend test --mode validator --home "$DATA_DIR$i" \
>"$DATA_DIR"/node"$i".log 2>&1 & disown
ETHERMINT_PID=$!
echo "started chibaclonk node, pid=$ETHERMINT_PID"
echo "started laconic node, pid=$ETHERMINT_PID"
# add PID to array
arr+=("$ETHERMINT_PID")
}
@@ -123,7 +123,7 @@ if [[ -z $TEST || $TEST == "rpc" ]]; then
for i in $(seq 1 "$TEST_QTD"); do
HOST_RPC=http://$IP_ADDR:$RPC_PORT"$i"
echo "going to test chibaclonk node $HOST_RPC ..."
echo "going to test laconic node $HOST_RPC ..."
MODE=$MODE HOST=$HOST_RPC go test ./tests/e2e/... -timeout=300s -v -short
MODE=$MODE HOST=$HOST_RPC go test ./tests/rpc/... -timeout=300s -v -short
@@ -136,7 +136,7 @@ stop_func() {
ETHERMINT_PID=$i
echo "shutting down node, pid=$ETHERMINT_PID ..."
# Shutdown chibaclonk node
# Shutdown laconic node
kill -9 "$ETHERMINT_PID"
wait "$ETHERMINT_PID"
}