Skip to content

Commit

Permalink
only variables - no ips in mock proxy, and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lava17 committed Jul 12, 2022
1 parent f043c7c commit 5073856
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 53 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ vue/src/store/generated/lavanet/lava/lavanet.lava.user/module/index.ts
relayer/cmd/relayer/__debug_bin
testutil/e2e/logs/
ptnet/
scripts/variables.sh
scripts/vars/

13 changes: 6 additions & 7 deletions scripts/eth.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
#!/bin/bash -x

# OSMO_RPC=https://mainnet.infura.io
ETH_RPC_HTTP=GET_ETH_VARIBLE_FROM_ENV
ETH_HOST=GET_ETH_VARIBLE_FROM_ENV
ETH_URL_PATH=GET_URL_VARIBLE_FROM_ENV
# __dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# . ${__dir}/variables.sh
__dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. ${__dir}/vars/variables.sh

echo ""
echo " ::: STARTING ETH PROVIDERS :::" $Endpoint $URL_PATH
echo " ::: STARTING ETH PROVIDERS :::" $ETH_RPC_HTTP $URL_PATH

# SINGLE PROXY
MOCK_PORT=2001
go run ./testutil/e2e/proxy/. $ETH_RPC_HTTP -p $MOCK_PORT -cache -id eth &
go run ./testutil/e2e/proxy/. $ETH_HOST -p $MOCK_PORT -cache -id eth &

# Multi Port Proxy
# sh ./mock_proxy_eth.sh &

echo " ::: DONE ETHMOCK PROXY ::: "
# echo " ::: DONE ETHMOCK PROXY ::: "

echo " ::: RUNNING ETH PROVIDERS :::"
# SINGLE MOCK PROXY
Expand Down
2 changes: 1 addition & 1 deletion scripts/init_chain_commands.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

__dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. ${__dir}/variables.sh
. ${__dir}/vars/variables.sh

lavad tx gov submit-proposal spec-add ./cookbook/spec_add_ethereum.json --from alice --gas-adjustment "1.5" --gas "auto" -y
# lavad tx gov submit-proposal spec-add ./cookbook/spec_add_terra.json --from alice --gas-adjustment "1.5" --gas "auto" -y
Expand Down
10 changes: 5 additions & 5 deletions scripts/osmosis.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash -x

OSMO_HOST=GET_OSMO_VARIBLE_FROM_ENV
# __dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# . ${__dir}/variables.sh
__dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. ${__dir}/vars/variables.sh

echo ""
echo " ::: STARTING OSMOSIS PROVIDERS :::" $OSMO_HOST
Expand Down Expand Up @@ -35,9 +35,9 @@ go run relayer/cmd/relayer/main.go server 127.0.0.1 2243 http://0.0.0.0:$MOCK_PO
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2243 http://0.0.0.0:2043/rpc/ COS3 tendermintrpc --from servicer3

# NO MOCK PROXY
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2231 OSMO_REST COS3 rest --from servicer1 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2232 OSMO_REST COS3 rest --from servicer2 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2233 OSMO_REST COS3 rest --from servicer3 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2231 $OSMO_REST COS3 rest --from servicer1 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2232 $OSMO_REST COS3 rest --from servicer2 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2233 $OSMO_REST COS3 rest --from servicer3 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2241 $OSMO_RPC COS3 tendermintrpc --from servicer1 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2242 $OSMO_RPC COS3 tendermintrpc --from servicer2 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2243 $OSMO_RPC COS3 tendermintrpc --from servicer3
Expand Down
15 changes: 9 additions & 6 deletions scripts/providers_eth.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@

#!/bin/bash


ETH_HOST=GET_ETH_VARIBLE_FROM_ENV
ETH_URL_PATH=GET_URL_VARIBLE_FROM_ENV
__dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. ${__dir}/variables.sh
. ${__dir}/vars/variables.sh
echo "---------------Setup Providers------------------"
# killall screen
#Eth providers
echo " ::: STARTING ETH PROVIDERS :::"
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2221 http://0.0.0.0:2200 ETH1 jsonrpc --from servicer1 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2221 http://0.0.0.0:2000/v3/3755a1321ab24f938589412403c46455 ETH1 jsonrpc --from servicer1 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2222 http://0.0.0.0:2000/v3/3755a1321ab24f938589412403c46455 ETH1 jsonrpc --from servicer2 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2223 http://0.0.0.0:2000/v3/3755a1321ab24f938589412403c46455 ETH1 jsonrpc --from servicer3 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2224 http://0.0.0.0:2000/v3/3755a1321ab24f938589412403c46455 ETH1 jsonrpc --from servicer4 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2225 http://0.0.0.0:2000/v3/3755a1321ab24f938589412403c46455 ETH1 jsonrpc --from servicer5
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2221 http://0.0.0.0:2000/$ETH_URL_PATH ETH1 jsonrpc --from servicer1 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2222 http://0.0.0.0:2000/$ETH_URL_PATH ETH1 jsonrpc --from servicer2 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2223 http://0.0.0.0:2000/$ETH_URL_PATH ETH1 jsonrpc --from servicer3 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2224 http://0.0.0.0:2000/$ETH_URL_PATH ETH1 jsonrpc --from servicer4 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2225 http://0.0.0.0:2000/$ETH_URL_PATH ETH1 jsonrpc --from servicer5
go run relayer/cmd/relayer/main.go server 127.0.0.1 2221 $ETH_RPC_WS ETH1 jsonrpc --from servicer1 &
go run relayer/cmd/relayer/main.go server 127.0.0.1 2222 $ETH_RPC_WS ETH1 jsonrpc --from servicer2 &
go run relayer/cmd/relayer/main.go server 127.0.0.1 2223 $ETH_RPC_WS ETH1 jsonrpc --from servicer3 &
Expand Down
12 changes: 7 additions & 5 deletions scripts/providers_eth_mock.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. ${__dir}/vars/variables.sh

echo "---------------Setup Providers------------------"
# killall screen
Expand All @@ -12,11 +14,11 @@ echo "---------------Setup Providers------------------"

echo " ::: STARTING ETH PROVIDERS :::"
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2221 http://0.0.0.0:2200 ETH1 jsonrpc --from servicer1 &
go run relayer/cmd/relayer/main.go server 127.0.0.1 2221 http://0.0.0.0:2001/v3/3755a1321ab24f938589412403c46455 ETH1 jsonrpc --from servicer1 &
go run relayer/cmd/relayer/main.go server 127.0.0.1 2222 http://0.0.0.0:2002/v3/3755a1321ab24f938589412403c46455 ETH1 jsonrpc --from servicer2 &
go run relayer/cmd/relayer/main.go server 127.0.0.1 2223 http://0.0.0.0:2003/v3/3755a1321ab24f938589412403c46455 ETH1 jsonrpc --from servicer3 &
go run relayer/cmd/relayer/main.go server 127.0.0.1 2224 http://0.0.0.0:2004/v3/3755a1321ab24f938589412403c46455 ETH1 jsonrpc --from servicer4 &
go run relayer/cmd/relayer/main.go server 127.0.0.1 2225 http://0.0.0.0:2005/v3/3755a1321ab24f938589412403c46455 ETH1 jsonrpc --from servicer5
go run relayer/cmd/relayer/main.go server 127.0.0.1 2221 http://0.0.0.0:2001/$ETH_URL_PATH ETH1 jsonrpc --from servicer1 &
go run relayer/cmd/relayer/main.go server 127.0.0.1 2222 http://0.0.0.0:2002/$ETH_URL_PATH ETH1 jsonrpc --from servicer2 &
go run relayer/cmd/relayer/main.go server 127.0.0.1 2223 http://0.0.0.0:2003/$ETH_URL_PATH ETH1 jsonrpc --from servicer3 &
go run relayer/cmd/relayer/main.go server 127.0.0.1 2224 http://0.0.0.0:2004/$ETH_URL_PATH ETH1 jsonrpc --from servicer4 &
go run relayer/cmd/relayer/main.go server 127.0.0.1 2225 http://0.0.0.0:2005/$ETH_URL_PATH ETH1 jsonrpc --from servicer5
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2221 $ETH_RPC_WS ETH1 jsonrpc --from servicer1 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2222 $ETH_RPC_WS ETH1 jsonrpc --from servicer2 &
# go run relayer/cmd/relayer/main.go server 127.0.0.1 2223 $ETH_RPC_WS ETH1 jsonrpc --from servicer3 &
Expand Down
2 changes: 1 addition & 1 deletion scripts/providers_osmosis.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
__dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${__dir}/variables.sh
source ${__dir}/vars/variables.sh

echo "---------------Setup Providers------------------"

Expand Down
2 changes: 1 addition & 1 deletion scripts/variables.example.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash

OSMO_HOST=
OSMO_REST=
Expand All @@ -7,4 +6,5 @@ ETH_RPC_WS=
ETH_RPC_HTTP=
TERRA_RPC_LCD=
TERRA_RPC_TENDERMINT=
ETH_HOST=
ETH_URL_PATH=
9 changes: 0 additions & 9 deletions scripts/variables.sh

This file was deleted.

31 changes: 17 additions & 14 deletions testutil/e2e/lava_fullflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,21 +308,24 @@ func FullFlowTest(t *testing.T) ([]TestResult, error) {
debug: true}, t, &states)
// sleep(15, failed)
// await(clientOsmosis, "osmosis client1 finished", osmosis_finished, "awaiting for osmosis1 to finish to proceed...")
clientOsmosis2 := LogProcess(CMD{
stateID: "clientOsmo2",
homepath: homepath,
cmd: "go run " + homepath + "relayer/cmd/relayer/main.go test_client COS3 tendermintrpc --from user2 ",
filter: []string{":::", "reply", "no pairings available", "update", "connect", "rpc", "pubkey", "signal", "Error", "error", "panic"},
testing: true,
test: clientTest,
results: &results,
dep: &node,
failed: failed,
requireAlive: false,
debug: true}, t, &states)

// clientOsmosis2 := LogProcess(CMD{
// stateID: "clientOsmo2",
// homepath: homepath,
// cmd: "go run " + homepath + "relayer/cmd/relayer/main.go test_client COS3 tendermintrpc --from user2 ",
// filter: []string{":::", "reply", "no pairings available", "update", "connect", "rpc", "pubkey", "signal", "Error", "error", "panic"},
// testing: true,
// test: clientTest,
// results: &results,
// dep: &node,
// failed: failed,
// requireAlive: false,
// debug: true}, t, &states)

// await(clientOsmosis, "reply rpc", found_rpc_reply, "awaiting for rpc reply to proceed...")
// TODO: check relay payment is COS3
await(node, "relay payment 2 osmosis", found_relay_payment, "awaiting for SECOND payment to proceed... "+clientOsmosis2.id)
// await(node, "relay payment 2 osmosis", found_relay_payment, "awaiting for SECOND payment to proceed... "+clientOsmosis2.id)
await(node, "relay payment 0/2 osmosis", found_relay_payment, "awaiting for OSMOSIS payment to proceed... ")
// await(clientOsmosis2, "client_COS 2 finished", client_finished, "awaiting for client COS 2 to finish") //Client test complete
println(" ::: GOT OSMOSIS PAYMENT !!!")
}
Expand Down Expand Up @@ -365,7 +368,7 @@ func FullFlowTest(t *testing.T) ([]TestResult, error) {
requireAlive: false,
debug: false}, t, &states)
await(clientEth, "reply rpc", found_rpc_reply, "awaiting for rpc reply to proceed...")
await(node, "relay payment 1 eth", found_relay_payment, "awaiting for FIRST payment to proceed...")
await(node, "relay payment 1/2 eth", found_relay_payment, "awaiting for ETH payment to proceed...")
// await(clientEth, "client_eth finished", client_finished, "awaiting ETH1 client to finish") //Client test complete
println(" ::: GOT FIRST PAYMENT !!!")
}
Expand Down
2 changes: 1 addition & 1 deletion testutil/e2e/proxy/mockMaps/eth.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion testutil/e2e/proxy/mockMaps/osmosis_rest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion testutil/e2e/proxy/mockMaps/osmosis_rpc.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions testutil/e2e/proxy/mockMaps/xeth.json

Large diffs are not rendered by default.

0 comments on commit 5073856

Please sign in to comment.