From 764fd7121246b679c598a5cb5c8e8fcc33c66c4e Mon Sep 17 00:00:00 2001 From: Ran Mishael Date: Tue, 7 Feb 2023 18:12:42 +0100 Subject: [PATCH 1/7] PRT-432 adding rpc consumer to main.go, fixing pairing updater issue updating pairing twice. --- .github/workflows/consensus_tests.yml | 68 +++++++++++++++++++++++ .github/workflows/e2e.yml | 23 -------- .github/workflows/protocol_tests.yml | 70 ++++++++++++++++++++++++ cmd/lavad/main.go | 2 +- docs/static/openapi.yml | 63 ++++++++++++++------- protocol/statetracker/pairing_updater.go | 3 +- rpcconsumer.yml | 35 ++++++++++++ scripts/pre_setups/init_lava_grpc.sh | 8 +-- 8 files changed, 222 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/consensus_tests.yml create mode 100644 .github/workflows/protocol_tests.yml create mode 100644 rpcconsumer.yml diff --git a/.github/workflows/consensus_tests.yml b/.github/workflows/consensus_tests.yml new file mode 100644 index 0000000000..88aed2f381 --- /dev/null +++ b/.github/workflows/consensus_tests.yml @@ -0,0 +1,68 @@ +name: Lava e2e Tests + +on: [push, pull_request] + +jobs: + go: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: '0' + - uses: actions/setup-go@v3 + with: + go-version: 1.18.2 + + # Install Ignite + - name: ignite install + run: git clone --depth 1 --branch v0.22.2 https://github.com/ignite/cli && cd cli && make install + # run: curl https://get.ignite.com/cli! | bash + - name: ignite version + run: ignite version + + # Setup Paths + - name: home + run: pwd && ls -l + - name: ls usr + run: ls -l /home/runner/work/lava/lava + - name: cp lava + run: cp -r ~/work/lava/lava ~/go/lava + - name: export PATH + run: export PATH=$PATH:/go:/go/bin:$(go env GOPATH)/bin:/usr/local:`pwd`:/home/runner/work/lava/lava/ + - name: export GOPATH + run: export GOPATH=$GOPATH:$(go env GOPATH):/go:/go/lava:/usr/local:`pwd` + - name: export LAVA + run: export LAVA=/home/runner/work/lava/lava + - name: go env + run: go env + - name: pwd + run: pwd + - name: tree + run: tree + - name: ls -l + run: ls -l + + # Pre-build with ignite + - name: ignite build + uses: nick-fields/retry@v2 + with: + max_attempts: 3 + retry_on: error + timeout_minutes: 20 + command: ignite chain build -v + + ###################################################### + ### Run Consensus unitests + ###################################################### + - name: lava pairing unit Tests + run: go test ./x/pairing/ ./x/pairing/keeper ./x/pairing/types -v + + - name: lava epochstorage unit Tests + run: go test ./x/epochstorage/ ./x/epochstorage/keeper ./x/epochstorage/types -v + + - name: lava spec unit Tests + run: go test ./x/spec/ ./x/spec/keeper ./x/spec/types -v + + - name: lava conflict unit Tests + run: go test ./x/conflict/ ./x/conflict/keeper ./x/conflict/types -v + diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 10d81a95d6..c3d32e92e0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -57,29 +57,6 @@ jobs: timeout_minutes: 20 command: ignite chain build -v - ###################################################### - ### Run lava unitests - ###################################################### - - name: lava pairing unit Tests - run: go test ./x/pairing/ ./x/pairing/keeper ./x/pairing/types -v - - - name: lava epochstorage unit Tests - run: go test ./x/epochstorage/ ./x/epochstorage/keeper ./x/epochstorage/types -v - - - name: lava spec unit Tests - run: go test ./x/spec/ ./x/spec/keeper ./x/spec/types -v - - - name: lava conflict unit Tests - run: go test ./x/conflict/ ./x/conflict/keeper ./x/conflict/types -v - - ###################################################### - ### Run relayer unitests - ###################################################### - - name: Run Relayer unit Tests - run: go test ./protocol/lavasession/ ./protocol/chaintracker/ ./relayer/chainproxy/ -v - - name: Run Relayer Metrics Unit Tests - run: go test ./relayer/metrics/ -v - ###################################################### ### Run Lava E2E Tests IGNITE VERSION:0.22.1 ###################################################### diff --git a/.github/workflows/protocol_tests.yml b/.github/workflows/protocol_tests.yml new file mode 100644 index 0000000000..627b496a4a --- /dev/null +++ b/.github/workflows/protocol_tests.yml @@ -0,0 +1,70 @@ +name: Lava e2e Tests + +on: [push, pull_request] + +jobs: + go: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: '0' + - uses: actions/setup-go@v3 + with: + go-version: 1.18.2 + + # Install Ignite + - name: ignite install + run: git clone --depth 1 --branch v0.22.2 https://github.com/ignite/cli && cd cli && make install + # run: curl https://get.ignite.com/cli! | bash + - name: ignite version + run: ignite version + # - name: starport install + # run: curl https://get.starport.network/starport@v0.19.2! | bash + # - name: starport version + # run: starport version + + # Setup Paths + - name: home + run: pwd && ls -l + - name: ls usr + run: ls -l /home/runner/work/lava/lava + - name: cp lava + run: cp -r ~/work/lava/lava ~/go/lava + - name: export PATH + run: export PATH=$PATH:/go:/go/bin:$(go env GOPATH)/bin:/usr/local:`pwd`:/home/runner/work/lava/lava/ + # - name: export + # run: export PATH=$PATH:/go/lava + - name: export GOPATH + run: export GOPATH=$GOPATH:$(go env GOPATH):/go:/go/lava:/usr/local:`pwd` + - name: export LAVA + run: export LAVA=/home/runner/work/lava/lava + - name: go env + run: go env + - name: pwd + run: pwd + - name: tree + run: tree + - name: ls -l + run: ls -l + + # Pre-build with ignite + - name: ignite build + uses: nick-fields/retry@v2 + with: + max_attempts: 3 + retry_on: error + timeout_minutes: 20 + command: ignite chain build -v + + ###################################################### + ### Run protocol unitests + ###################################################### + - name: Run Lava Session Tests + run: go test ./protocol/lavasession/ -v + - name: Run Lava Chain Tracker Tests + run: go test ./protocol/chaintracker/ -v + - name: Run Lava Chain Proxy Tests + run: go test ./relayer/chainproxy/ -v + - name: Run Relayer Metrics Unit Tests + run: go test ./relayer/metrics/ -v diff --git a/cmd/lavad/main.go b/cmd/lavad/main.go index a93aef2826..3d5eb486a8 100644 --- a/cmd/lavad/main.go +++ b/cmd/lavad/main.go @@ -466,7 +466,7 @@ func main() { cmdRPCConsumer.Flags().Bool("secure", false, "secure sends reliability on every message") cmdRPCConsumer.Flags().String(performance.PprofAddressFlagName, "", "pprof server address, used for code profiling") cmdRPCConsumer.Flags().String(performance.CacheFlagName, "", "address for a cache server to improve performance") - // rootCmd.AddCommand(cmdRPCConsumer) // TODO: DISABLE COMMAND SO IT'S NOT EXPOSED ON MAIN YET + rootCmd.AddCommand(cmdRPCConsumer) // RPCProvider command flags flags.AddTxFlagsToCmd(cmdRPCProvider) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index b9b342ebd2..a7e4efe54b 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -30433,6 +30433,9 @@ paths: type: string QoSWeight: type: string + recommendedEpochNumToCollectPayment: + type: string + format: uint64 description: >- QueryParamsResponse is response type for the Query/Params RPC method. @@ -30476,14 +30479,17 @@ paths: epoch: type: string format: uint64 - unresponsiveness_complaints: - type: array - items: - type: string uniquePaymentStorageClientProviderKeys: type: array items: type: string + complainersTotalCu: + type: string + format: uint64 + title: >- + total CU that were supposed to be served by the provider + but didn't because he was unavailable (so consumers + complained about him) pagination: type: object properties: @@ -30606,14 +30612,17 @@ paths: epoch: type: string format: uint64 - unresponsiveness_complaints: - type: array - items: - type: string uniquePaymentStorageClientProviderKeys: type: array items: type: string + complainersTotalCu: + type: string + format: uint64 + title: >- + total CU that were supposed to be served by the provider + but didn't because he was unavailable (so consumers + complained about him) default: description: An unexpected error response. schema: @@ -53600,6 +53609,9 @@ definitions: type: string QoSWeight: type: string + recommendedEpochNumToCollectPayment: + type: string + format: uint64 description: Params defines the parameters for the module. lavanet.lava.pairing.ProviderPaymentStorage: type: object @@ -53609,14 +53621,16 @@ definitions: epoch: type: string format: uint64 - unresponsiveness_complaints: - type: array - items: - type: string uniquePaymentStorageClientProviderKeys: type: array items: type: string + complainersTotalCu: + type: string + format: uint64 + title: >- + total CU that were supposed to be served by the provider but didn't + because he was unavailable (so consumers complained about him) lavanet.lava.pairing.QueryAllEpochPaymentsResponse: type: object properties: @@ -53669,14 +53683,17 @@ definitions: epoch: type: string format: uint64 - unresponsiveness_complaints: - type: array - items: - type: string uniquePaymentStorageClientProviderKeys: type: array items: type: string + complainersTotalCu: + type: string + format: uint64 + title: >- + total CU that were supposed to be served by the provider but + didn't because he was unavailable (so consumers complained about + him) pagination: type: object properties: @@ -53878,14 +53895,17 @@ definitions: epoch: type: string format: uint64 - unresponsiveness_complaints: - type: array - items: - type: string uniquePaymentStorageClientProviderKeys: type: array items: type: string + complainersTotalCu: + type: string + format: uint64 + title: >- + total CU that were supposed to be served by the provider but + didn't because he was unavailable (so consumers complained about + him) lavanet.lava.pairing.QueryGetUniquePaymentStorageClientProviderResponse: type: object properties: @@ -53932,6 +53952,9 @@ definitions: type: string QoSWeight: type: string + recommendedEpochNumToCollectPayment: + type: string + format: uint64 description: QueryParamsResponse is response type for the Query/Params RPC method. lavanet.lava.pairing.QueryProvidersResponse: type: object diff --git a/protocol/statetracker/pairing_updater.go b/protocol/statetracker/pairing_updater.go index 5c46fc9de7..2ffd8c6221 100644 --- a/protocol/statetracker/pairing_updater.go +++ b/protocol/statetracker/pairing_updater.go @@ -27,11 +27,12 @@ func NewPairingUpdater(consumerAddress sdk.AccAddress, stateQuery *ConsumerState func (pu *PairingUpdater) RegisterPairing(ctx context.Context, consumerSessionManager *lavasession.ConsumerSessionManager) error { chainID := consumerSessionManager.RPCEndpoint().ChainID - pairingList, epoch, _, err := pu.stateQuery.GetPairing(context.Background(), chainID, -1) + pairingList, epoch, nextBlockForUpdate, err := pu.stateQuery.GetPairing(context.Background(), chainID, -1) if err != nil { return err } pu.updateConsummerSessionManager(ctx, pairingList, consumerSessionManager, epoch) + pu.nextBlockForUpdate = nextBlockForUpdate // make sure we don't update twice when launching. consumerSessionsManagersList, ok := pu.consumerSessionManagersMap[chainID] if !ok { pu.consumerSessionManagersMap[chainID] = []*lavasession.ConsumerSessionManager{consumerSessionManager} diff --git a/rpcconsumer.yml b/rpcconsumer.yml new file mode 100644 index 0000000000..90c58ff84b --- /dev/null +++ b/rpcconsumer.yml @@ -0,0 +1,35 @@ +account-number: "0" +broadcast-mode: sync +cache-be: "" +chain-id: lava +dry-run: false +endpoints: + - api-interface: tendermintrpc + chain-id: COS3 + network-address: 127.0.0.1:3333 +fee-account: "" +fees: "" +from: user1 +gas: "" +gas-adjustment: "1" +gas-prices: "" +generate-only: false +geolocation: "1" +help: false +home: /home/user +keyring-backend: os +keyring-dir: "" +ledger: false +log_format: plain +log_level: info +node: tcp://localhost:26657 +note: "" +offline: false +output: json +pprof-address: "" +secure: false +sequence: "0" +sign-mode: "" +timeout-height: "0" +trace: false +"yes": false diff --git a/scripts/pre_setups/init_lava_grpc.sh b/scripts/pre_setups/init_lava_grpc.sh index f2eed83e9d..3c8b72c3c4 100755 --- a/scripts/pre_setups/init_lava_grpc.sh +++ b/scripts/pre_setups/init_lava_grpc.sh @@ -11,7 +11,7 @@ lavad tx gov submit-proposal spec-add ./cookbook/spec_add_lava.json,./cookbook/s lavad tx gov vote 1 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE sleep 4 -lavad tx pairing stake-client "LAV1" 200000ulava 1 -y --from user4 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +lavad tx pairing stake-client "LAV1" 200000ulava 1 -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE # Lava Providers lavad tx pairing stake-provider "LAV1" 2010ulava "127.0.0.1:2261,tendermintrpc,1 127.0.0.1:2271,rest,1 127.0.0.1:2281,grpc,1" 1 -y --from servicer1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE @@ -31,10 +31,8 @@ screen -S lav1_providers -X screen -t win6 -X bash -c "source ~/.bashrc; lavad s screen -S lav1_providers -X screen -t win7 -X bash -c "source ~/.bashrc; lavad server 127.0.0.1 2282 $LAVA_GRPC LAV1 grpc --from servicer2 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug 2>&1 | tee $LOGS_DIR/LAV1_2282.log" screen -S lav1_providers -X screen -t win8 -X bash -c "source ~/.bashrc; lavad server 127.0.0.1 2283 $LAVA_GRPC LAV1 grpc --from servicer3 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug 2>&1 | tee $LOGS_DIR/LAV1_2283.log" -screen -d -m -S portals bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3340 LAV1 rest --from user4 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug | tee $LOGS_DIR/LAV1_tendermint_portal.log"; sleep 0.3 -screen -S portals -X screen -t win17 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3341 LAV1 tendermintrpc --from user4 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug | tee $LOGS_DIR/LAV1_tendermint_portal.log" -screen -S portals -X screen -t win17 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3342 LAV1 grpc --from user4 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug 2>&1 | tee $LOGS_DIR/LAV1_grpc_portal.log" - +screen -d -m -S portals bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3340 LAV1 rest 127.0.0.1:3341 LAV1 tendermintrpc 127.0.0.1:3342 LAV1 grpc --from user1 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug | tee $LOGS_DIR/LAV1_tendermint_portal.log"; sleep 0.3 +screen -r portals # Lava Over Lava ETH sleep 3 # wait for the portal to start. From 651861c492976452e4c67f0fc17dbf2304b9c4fb Mon Sep 17 00:00:00 2001 From: Ran Mishael Date: Tue, 7 Feb 2023 18:16:32 +0100 Subject: [PATCH 2/7] PRT-432 disabling double tests (pull, and pr) need only pr --- .github/workflows/consensus_tests.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/protocol_tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/consensus_tests.yml b/.github/workflows/consensus_tests.yml index 88aed2f381..85d27b2c88 100644 --- a/.github/workflows/consensus_tests.yml +++ b/.github/workflows/consensus_tests.yml @@ -1,6 +1,6 @@ name: Lava e2e Tests -on: [push, pull_request] +on: [pull_request] jobs: go: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c3d32e92e0..cb5c76c692 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,6 +1,6 @@ name: Lava e2e Tests -on: [push, pull_request] +on: [pull_request] jobs: go: diff --git a/.github/workflows/protocol_tests.yml b/.github/workflows/protocol_tests.yml index 627b496a4a..e718f4a2fc 100644 --- a/.github/workflows/protocol_tests.yml +++ b/.github/workflows/protocol_tests.yml @@ -1,6 +1,6 @@ name: Lava e2e Tests -on: [push, pull_request] +on: [pull_request] jobs: go: From 3590bbb7c9ce8be839fa20f6dce350bedb2492ea Mon Sep 17 00:00:00 2001 From: Ran Mishael Date: Tue, 7 Feb 2023 18:17:32 +0100 Subject: [PATCH 3/7] PRT-432 tests names --- .github/workflows/consensus_tests.yml | 2 +- .github/workflows/protocol_tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/consensus_tests.yml b/.github/workflows/consensus_tests.yml index 85d27b2c88..5fb10bdc03 100644 --- a/.github/workflows/consensus_tests.yml +++ b/.github/workflows/consensus_tests.yml @@ -1,4 +1,4 @@ -name: Lava e2e Tests +name: Lava Consensus Tests on: [pull_request] diff --git a/.github/workflows/protocol_tests.yml b/.github/workflows/protocol_tests.yml index e718f4a2fc..6801358612 100644 --- a/.github/workflows/protocol_tests.yml +++ b/.github/workflows/protocol_tests.yml @@ -1,4 +1,4 @@ -name: Lava e2e Tests +name: Lava Protocol Tests on: [pull_request] From 39144844e05eb45938e2d9bc6784b54c92259aa5 Mon Sep 17 00:00:00 2001 From: Ran Mishael Date: Tue, 7 Feb 2023 20:51:23 +0100 Subject: [PATCH 4/7] PRT-432 rpcconsumer fully integrated --- .github/workflows/e2e.yml | 2 +- relayer/chainproxy/tendermintRPC.go | 14 ++++++ relayer/portal_server.go | 1 + scripts/pre_setups/init_gth_only.sh | 2 +- scripts/pre_setups/init_lava_grpc.sh | 1 + scripts/pre_setups/init_osmosis_test.sh | 4 +- scripts/pre_setups/setup_provider.sh | 42 +++++++----------- scripts/{ => scripts_archive}/aptos.sh | 0 scripts/{ => scripts_archive}/coshub.sh | 0 .../{ => scripts_archive}/docker/Dockerfile | 0 .../docker/lava_docker_starport.sh | 0 scripts/{ => scripts_archive}/ftm.sh | 0 scripts/{ => scripts_archive}/gth.sh | 0 scripts/{ => scripts_archive}/init_full.sh | 0 scripts/{ => scripts_archive}/juno.sh | 0 scripts/{ => scripts_archive}/lava.sh | 0 scripts/{ => scripts_archive}/lava_docker.sh | 0 scripts/{ => scripts_archive}/lava_full.sh | 0 scripts/{ => scripts_archive}/lava_node.sh | 0 .../{ => scripts_archive}/mock_proxy_eth.sh | 0 .../mock_proxy_osmosis.sh | 0 scripts/{ => scripts_archive}/osmosis.sh | 0 .../{ => scripts_archive}/providers_eth.sh | 0 .../providers_eth_mock.sh | 0 .../providers_osmosis.sh | 0 .../providers_osmosis_mock.sh | 0 scripts/{ => scripts_archive}/run_clients.sh | 0 scripts/{ => scripts_archive}/serve_chain.sh | 0 .../test_unstake_provider.sh | 0 scripts/setup_providers.sh | 43 +++++++------------ testutil/e2e/e2e.go | 17 ++++---- 31 files changed, 58 insertions(+), 68 deletions(-) rename scripts/{ => scripts_archive}/aptos.sh (100%) rename scripts/{ => scripts_archive}/coshub.sh (100%) rename scripts/{ => scripts_archive}/docker/Dockerfile (100%) rename scripts/{ => scripts_archive}/docker/lava_docker_starport.sh (100%) rename scripts/{ => scripts_archive}/ftm.sh (100%) rename scripts/{ => scripts_archive}/gth.sh (100%) rename scripts/{ => scripts_archive}/init_full.sh (100%) rename scripts/{ => scripts_archive}/juno.sh (100%) rename scripts/{ => scripts_archive}/lava.sh (100%) rename scripts/{ => scripts_archive}/lava_docker.sh (100%) rename scripts/{ => scripts_archive}/lava_full.sh (100%) rename scripts/{ => scripts_archive}/lava_node.sh (100%) rename scripts/{ => scripts_archive}/mock_proxy_eth.sh (100%) rename scripts/{ => scripts_archive}/mock_proxy_osmosis.sh (100%) rename scripts/{ => scripts_archive}/osmosis.sh (100%) rename scripts/{ => scripts_archive}/providers_eth.sh (100%) rename scripts/{ => scripts_archive}/providers_eth_mock.sh (100%) rename scripts/{ => scripts_archive}/providers_osmosis.sh (100%) rename scripts/{ => scripts_archive}/providers_osmosis_mock.sh (100%) rename scripts/{ => scripts_archive}/run_clients.sh (100%) rename scripts/{ => scripts_archive}/serve_chain.sh (100%) rename scripts/{ => scripts_archive}/test_unstake_provider.sh (100%) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index cb5c76c692..b3d27deab5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,4 +1,4 @@ -name: Lava e2e Tests +name: Lava E2E Tests on: [pull_request] diff --git a/relayer/chainproxy/tendermintRPC.go b/relayer/chainproxy/tendermintRPC.go index 3b4a3b9bde..826e089631 100644 --- a/relayer/chainproxy/tendermintRPC.go +++ b/relayer/chainproxy/tendermintRPC.go @@ -35,6 +35,7 @@ type TendemintRpcMessage struct { type tendermintRpcChainProxy struct { // embedding the jrpc chain proxy because the only diff is on parse message JrpcChainProxy + // httpUrl string } func (m TendemintRpcMessage) GetParams() interface{} { @@ -130,7 +131,19 @@ func (cp *tendermintRpcChainProxy) FetchBlockHashByNum(ctx context.Context, bloc return hash, nil } +// func parseNodeUrl(nodeUrl string) (string, error) { +// u, err := url.Parse(nodeUrl) +// if err != nil { +// utils.LavaFormatFatal("Failed to parse node url", err, &map[string]string{"url": nodeUrl}) +// } +// if u.Scheme == "" { +// } +// return nodeUrl, nil +// } + func NewtendermintRpcChainProxy(nodeUrl string, nConns uint, sentry *sentry.Sentry, csm *lavasession.ConsumerSessionManager, pLogs *PortalLogs) ChainProxy { + // httpUrl := nodeUrl + return &tendermintRpcChainProxy{ JrpcChainProxy: JrpcChainProxy{ nodeUrl: nodeUrl, @@ -139,6 +152,7 @@ func NewtendermintRpcChainProxy(nodeUrl string, nConns uint, sentry *sentry.Sent portalLogs: pLogs, csm: csm, }, + // httpUrl: httpUrl, } } diff --git a/relayer/portal_server.go b/relayer/portal_server.go index c3f3154287..e8653029b2 100644 --- a/relayer/portal_server.go +++ b/relayer/portal_server.go @@ -27,6 +27,7 @@ func PortalServer( apiInterface string, flagSet *pflag.FlagSet, ) { + utils.LavaFormatError("lavad portal_server is deprecated, please ", nil, nil) // utils.LavaFormatInfo("lavad Binary Version: "+version.Version, nil) rand.Seed(time.Now().UnixNano()) diff --git a/scripts/pre_setups/init_gth_only.sh b/scripts/pre_setups/init_gth_only.sh index ddb51288bd..0e3b202177 100755 --- a/scripts/pre_setups/init_gth_only.sh +++ b/scripts/pre_setups/init_gth_only.sh @@ -21,4 +21,4 @@ sleep_until_next_epoch screen -d -m -S gth_providers bash -c "source ~/.bashrc; lavad server 127.0.0.1 2121 $GTH_RPC_WS GTH1 jsonrpc $EXTRA_PROVIDER_FLAGS --geolocation 1 --log_level debug --from servicer1 2>&1 | tee $LOGS_DIR/GTH1_2121.log" && sleep 0.25 screen -S gth_providers -X screen -t win1 -X bash -c "source ~/.bashrc; lavad server 127.0.0.1 2122 $GTH_RPC_WS GTH1 jsonrpc $EXTRA_PROVIDER_FLAGS --geolocation 1 --log_level debug --from servicer2 2>&1 | tee $LOGS_DIR/GTH1_2122.log" -screen -d -m -S portals bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3339 GTH1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3339.log" +screen -d -m -S portals bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3339 GTH1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3339.log" diff --git a/scripts/pre_setups/init_lava_grpc.sh b/scripts/pre_setups/init_lava_grpc.sh index 3c8b72c3c4..969789cc06 100755 --- a/scripts/pre_setups/init_lava_grpc.sh +++ b/scripts/pre_setups/init_lava_grpc.sh @@ -12,6 +12,7 @@ lavad tx gov vote 1 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --ga sleep 4 lavad tx pairing stake-client "LAV1" 200000ulava 1 -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +lavad tx pairing stake-client "LAV1" 200000ulava 1 -y --from user2 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE # Lava Providers lavad tx pairing stake-provider "LAV1" 2010ulava "127.0.0.1:2261,tendermintrpc,1 127.0.0.1:2271,rest,1 127.0.0.1:2281,grpc,1" 1 -y --from servicer1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE diff --git a/scripts/pre_setups/init_osmosis_test.sh b/scripts/pre_setups/init_osmosis_test.sh index 70338010e2..ce04902115 100755 --- a/scripts/pre_setups/init_osmosis_test.sh +++ b/scripts/pre_setups/init_osmosis_test.sh @@ -21,9 +21,7 @@ sleep_until_next_epoch # Lava providers screen -d -m -S cos4_providers bash -c "source ~/.bashrc; lavad server 127.0.0.1 2271 $OSMO_TEST_REST COS4 rest --from servicer1 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug 2>&1 | tee $LOGS_DIR/COS4_2271.log"; sleep 0.3 # screen -S cos4_providers -X screen -t win3 -X bash -c "source ~/.bashrc; lavad server 127.0.0.1 2261 $OSMO_TEST_RPC COS4 tendermintrpc --from servicer1 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug 2>&1 | tee $LOGS_DIR/COS4_2261.log" - -screen -d -m -S portals bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3340 COS4 rest --from user4 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug | tee $LOGS_DIR/COS4_tendermint_portal.log"; sleep 0.3 -screen -S portals -X screen -t win17 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3341 COS4 tendermintrpc --from user4 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug | tee $LOGS_DIR/COS4_tendermint_portal.log" +screen -d -m -S portals bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3340 COS4 rest 127.0.0.1 3341 COS4 tendermintrpc --from user4 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug | tee $LOGS_DIR/COS4_tendermint_portal.log"; sleep 0.3 lavad server 127.0.0.1 2261 $OSMO_TEST_RPC COS4 tendermintrpc --from servicer1 $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug # Lava Over Lava ETH diff --git a/scripts/pre_setups/setup_provider.sh b/scripts/pre_setups/setup_provider.sh index 03c14c93d8..4f60759e2d 100755 --- a/scripts/pre_setups/setup_provider.sh +++ b/scripts/pre_setups/setup_provider.sh @@ -54,32 +54,22 @@ screen -d -m -S cos5_providers bash -c "source ~/.bashrc; lavad server 127.0.0.1 screen -d -m -S jun1_providers bash -c "source ~/.bashrc; lavad server 127.0.0.1 2371 $JUNO_REST JUN1 rest $EXTRA_PROVIDER_FLAGS --geolocation 1 --log_level debug --from servicer1 2>&1 | tee $LOGS_DIR/JUN1_2371.log" # Setup Portals -screen -d -m -S portals bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3333 ETH1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_ETH_3333.log" && sleep 0.25 -screen -S portals -X screen -t win1 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3334 COS3 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS3_3334.log" -screen -S portals -X screen -t win2 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3335 COS3 tendermintrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS3_3335.log" -screen -S portals -X screen -t win3 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3336 FTM250 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_FTM250_3336.log" -screen -S portals -X screen -t win4 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3337 COS4 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS4_3337.log" -screen -S portals -X screen -t win5 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3338 COS4 tendermintrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS4_3338.log" -screen -S portals -X screen -t win6 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3339 GTH1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3339.log" -screen -S portals -X screen -t win7 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3340 LAV1 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_LAV1_3340.log" -screen -S portals -X screen -t win8 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3341 LAV1 tendermintrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_LAV1_3341.log" -screen -S portals -X screen -t win9 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3342 CELO jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3342.log" -screen -S portals -X screen -t win10 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3343 COS5 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3343.log" -screen -S portals -X screen -t win11 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3344 COS5 tendermintrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3344.log" -screen -S portals -X screen -t win12 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3345 ALFAJORES jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3345.log" -screen -S portals -X screen -t win13 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3346 ARB1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3346.log" -screen -S portals -X screen -t win14 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3347 STRK jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3347.log" -screen -S portals -X screen -t win15 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3348 APT1 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3348.log" -screen -S portals -X screen -t win16 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3349 JUN1 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3349.log" -screen -S portals -X screen -t win17 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3350 JUN1 tendermintrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3350.log" -screen -S portals -X screen -t win18 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3351 POLYGON1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3351.log" - -# grpc portals -screen -S portals -X screen -t win19 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3352 LAV1 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3352.log" -screen -S portals -X screen -t win20 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3353 COS3 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3353.log" -screen -S portals -X screen -t win21 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3354 COS4 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3354.log" -screen -S portals -X screen -t win22 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3355 JUN1 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3355.log" -screen -S portals -X screen -t win23 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3356 COS5 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3356.log" +screen -d -m -S portals bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3333 ETH1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_ETH_3333.log" && sleep 0.25 +screen -S portals -X screen -t win3 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3336 FTM250 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_FTM250_3336.log" +screen -S portals -X screen -t win6 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3339 GTH1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3339.log" +screen -S portals -X screen -t win9 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3342 CELO jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3342.log" +screen -S portals -X screen -t win12 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3345 ALFAJORES jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3345.log" +screen -S portals -X screen -t win13 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3346 ARB1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3346.log" +screen -S portals -X screen -t win14 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3347 STRK jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3347.log" +screen -S portals -X screen -t win15 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3348 APT1 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3348.log" +screen -S portals -X screen -t win18 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3351 POLYGON1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3351.log" +# Cosmos-SDK based chains +screen -S portals -X screen -t win1 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3334 COS3 rest 127.0.0.1:3335 COS3 tendermintrpc 127.0.0.1:3353 COS3 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS3_3334.log" +screen -S portals -X screen -t win4 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3337 COS4 rest 127.0.0.1:3338 COS4 tendermintrpc 127.0.0.1:3354 COS4 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS4_3337.log" +screen -S portals -X screen -t win7 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3340 LAV1 rest 127.0.0.1:3341 LAV1 tendermintrpc 127.0.0.1:3352 LAV1 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_LAV1_3340.log" +screen -S portals -X screen -t win10 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3343 COS5 rest 127.0.0.1:3344 COS5 tendermintrpc 127.0.0.1:3356 COS5 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3343.log" +screen -S portals -X screen -t win16 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3349 JUN1 rest 127.0.0.1:3350 JUN1 tendermintrpc 127.0.0.1:3355 JUN1 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3349.log" + diff --git a/scripts/aptos.sh b/scripts/scripts_archive/aptos.sh similarity index 100% rename from scripts/aptos.sh rename to scripts/scripts_archive/aptos.sh diff --git a/scripts/coshub.sh b/scripts/scripts_archive/coshub.sh similarity index 100% rename from scripts/coshub.sh rename to scripts/scripts_archive/coshub.sh diff --git a/scripts/docker/Dockerfile b/scripts/scripts_archive/docker/Dockerfile similarity index 100% rename from scripts/docker/Dockerfile rename to scripts/scripts_archive/docker/Dockerfile diff --git a/scripts/docker/lava_docker_starport.sh b/scripts/scripts_archive/docker/lava_docker_starport.sh similarity index 100% rename from scripts/docker/lava_docker_starport.sh rename to scripts/scripts_archive/docker/lava_docker_starport.sh diff --git a/scripts/ftm.sh b/scripts/scripts_archive/ftm.sh similarity index 100% rename from scripts/ftm.sh rename to scripts/scripts_archive/ftm.sh diff --git a/scripts/gth.sh b/scripts/scripts_archive/gth.sh similarity index 100% rename from scripts/gth.sh rename to scripts/scripts_archive/gth.sh diff --git a/scripts/init_full.sh b/scripts/scripts_archive/init_full.sh similarity index 100% rename from scripts/init_full.sh rename to scripts/scripts_archive/init_full.sh diff --git a/scripts/juno.sh b/scripts/scripts_archive/juno.sh similarity index 100% rename from scripts/juno.sh rename to scripts/scripts_archive/juno.sh diff --git a/scripts/lava.sh b/scripts/scripts_archive/lava.sh similarity index 100% rename from scripts/lava.sh rename to scripts/scripts_archive/lava.sh diff --git a/scripts/lava_docker.sh b/scripts/scripts_archive/lava_docker.sh similarity index 100% rename from scripts/lava_docker.sh rename to scripts/scripts_archive/lava_docker.sh diff --git a/scripts/lava_full.sh b/scripts/scripts_archive/lava_full.sh similarity index 100% rename from scripts/lava_full.sh rename to scripts/scripts_archive/lava_full.sh diff --git a/scripts/lava_node.sh b/scripts/scripts_archive/lava_node.sh similarity index 100% rename from scripts/lava_node.sh rename to scripts/scripts_archive/lava_node.sh diff --git a/scripts/mock_proxy_eth.sh b/scripts/scripts_archive/mock_proxy_eth.sh similarity index 100% rename from scripts/mock_proxy_eth.sh rename to scripts/scripts_archive/mock_proxy_eth.sh diff --git a/scripts/mock_proxy_osmosis.sh b/scripts/scripts_archive/mock_proxy_osmosis.sh similarity index 100% rename from scripts/mock_proxy_osmosis.sh rename to scripts/scripts_archive/mock_proxy_osmosis.sh diff --git a/scripts/osmosis.sh b/scripts/scripts_archive/osmosis.sh similarity index 100% rename from scripts/osmosis.sh rename to scripts/scripts_archive/osmosis.sh diff --git a/scripts/providers_eth.sh b/scripts/scripts_archive/providers_eth.sh similarity index 100% rename from scripts/providers_eth.sh rename to scripts/scripts_archive/providers_eth.sh diff --git a/scripts/providers_eth_mock.sh b/scripts/scripts_archive/providers_eth_mock.sh similarity index 100% rename from scripts/providers_eth_mock.sh rename to scripts/scripts_archive/providers_eth_mock.sh diff --git a/scripts/providers_osmosis.sh b/scripts/scripts_archive/providers_osmosis.sh similarity index 100% rename from scripts/providers_osmosis.sh rename to scripts/scripts_archive/providers_osmosis.sh diff --git a/scripts/providers_osmosis_mock.sh b/scripts/scripts_archive/providers_osmosis_mock.sh similarity index 100% rename from scripts/providers_osmosis_mock.sh rename to scripts/scripts_archive/providers_osmosis_mock.sh diff --git a/scripts/run_clients.sh b/scripts/scripts_archive/run_clients.sh similarity index 100% rename from scripts/run_clients.sh rename to scripts/scripts_archive/run_clients.sh diff --git a/scripts/serve_chain.sh b/scripts/scripts_archive/serve_chain.sh similarity index 100% rename from scripts/serve_chain.sh rename to scripts/scripts_archive/serve_chain.sh diff --git a/scripts/test_unstake_provider.sh b/scripts/scripts_archive/test_unstake_provider.sh similarity index 100% rename from scripts/test_unstake_provider.sh rename to scripts/scripts_archive/test_unstake_provider.sh diff --git a/scripts/setup_providers.sh b/scripts/setup_providers.sh index a0cd52e86f..d77c5ff809 100755 --- a/scripts/setup_providers.sh +++ b/scripts/setup_providers.sh @@ -120,34 +120,21 @@ screen -S jun1_providers -X screen -t win7 -X bash -c "source ~/.bashrc; lavad s screen -S jun1_providers -X screen -t win8 -X bash -c "source ~/.bashrc; lavad server 127.0.0.1 2376 $JUNO_GRPC JUN1 grpc $EXTRA_PROVIDER_FLAGS --geolocation 1 --log_level debug --from servicer3 2>&1 | tee $LOGS_DIR/JUN1_2376.log" # Setup Portals -screen -d -m -S portals bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3333 ETH1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_ETH_3333.log" && sleep 0.25 -screen -S portals -X screen -t win1 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3334 COS3 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS3_3334.log" -screen -S portals -X screen -t win2 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3335 COS3 tendermintrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS3_3335.log" -screen -S portals -X screen -t win3 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3336 FTM250 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_FTM250_3336.log" -screen -S portals -X screen -t win4 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3337 COS4 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS4_3337.log" -screen -S portals -X screen -t win5 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3338 COS4 tendermintrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS4_3338.log" -screen -S portals -X screen -t win6 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3339 GTH1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3339.log" -screen -S portals -X screen -t win7 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3340 LAV1 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_LAV1_3340.log" -screen -S portals -X screen -t win8 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3341 LAV1 tendermintrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_LAV1_3341.log" -screen -S portals -X screen -t win9 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3342 CELO jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3342.log" -screen -S portals -X screen -t win10 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3343 COS5 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3343.log" -screen -S portals -X screen -t win11 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3344 COS5 tendermintrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3344.log" -screen -S portals -X screen -t win12 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3345 ALFAJORES jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3345.log" -screen -S portals -X screen -t win13 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3346 ARB1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3346.log" -screen -S portals -X screen -t win14 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3347 STRK jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3347.log" -screen -S portals -X screen -t win15 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3348 APT1 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3348.log" -screen -S portals -X screen -t win16 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3349 JUN1 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3349.log" -screen -S portals -X screen -t win17 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3350 JUN1 tendermintrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3350.log" -screen -S portals -X screen -t win18 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3351 POLYGON1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3351.log" - -# grpc portals -screen -S portals -X screen -t win19 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3352 LAV1 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3352.log" -screen -S portals -X screen -t win20 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3353 COS3 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3353.log" -screen -S portals -X screen -t win21 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3354 COS4 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3354.log" -screen -S portals -X screen -t win22 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3355 JUN1 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3355.log" -screen -S portals -X screen -t win23 -X bash -c "source ~/.bashrc; lavad portal_server 127.0.0.1 3356 COS5 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3356.log" - - +screen -d -m -S portals bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3333 ETH1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_ETH_3333.log" && sleep 0.25 +screen -S portals -X screen -t win3 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3336 FTM250 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_FTM250_3336.log" +screen -S portals -X screen -t win6 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3339 GTH1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3339.log" +screen -S portals -X screen -t win9 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3342 CELO jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3342.log" +screen -S portals -X screen -t win12 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3345 ALFAJORES jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3345.log" +screen -S portals -X screen -t win13 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3346 ARB1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3346.log" +screen -S portals -X screen -t win14 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3347 STRK jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3347.log" +screen -S portals -X screen -t win15 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3348 APT1 rest $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3348.log" +screen -S portals -X screen -t win18 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3351 POLYGON1 jsonrpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3351.log" +# Cosmos-SDK based chains +screen -S portals -X screen -t win1 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3334 COS3 rest 127.0.0.1:3335 COS3 tendermintrpc 127.0.0.1:3353 COS3 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS3_3334.log" +screen -S portals -X screen -t win4 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3337 COS4 rest 127.0.0.1:3338 COS4 tendermintrpc 127.0.0.1:3354 COS4 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_COS4_3337.log" +screen -S portals -X screen -t win7 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3340 LAV1 rest 127.0.0.1:3341 LAV1 tendermintrpc 127.0.0.1:3352 LAV1 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_LAV1_3340.log" +screen -S portals -X screen -t win10 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3343 COS5 rest 127.0.0.1:3344 COS5 tendermintrpc 127.0.0.1:3356 COS5 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3343.log" +screen -S portals -X screen -t win16 -X bash -c "source ~/.bashrc; lavad rpcconsumer 127.0.0.1:3349 JUN1 rest 127.0.0.1:3350 JUN1 tendermintrpc 127.0.0.1:3355 JUN1 grpc $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 2>&1 | tee $LOGS_DIR/PORTAL_3349.log" echo "--- setting up screens done ---" screen -ls \ No newline at end of file diff --git a/testutil/e2e/e2e.go b/testutil/e2e/e2e.go index 58c5f9dab8..3f014463a4 100644 --- a/testutil/e2e/e2e.go +++ b/testutil/e2e/e2e.go @@ -226,7 +226,7 @@ func (lt *lavaTest) startJSONRPCProvider(rpcURL string, ctx context.Context) { } func (lt *lavaTest) startJSONRPCConsumer(ctx context.Context) { - providerCommand := lt.lavadPath + " portal_server 127.0.0.1 3333 ETH1 jsonrpc --from user1 --geolocation 1 --log_level debug" + providerCommand := lt.lavadPath + " rpcconsumer 127.0.0.1:3333 ETH1 jsonrpc --from user1 --geolocation 1 --log_level debug" logName := "04_jsonConsumer" lt.logs[logName] = new(bytes.Buffer) @@ -401,8 +401,8 @@ func (lt *lavaTest) startTendermintProvider(rpcURL string, ctx context.Context) utils.LavaFormatInfo("startTendermintProvider OK", nil) } -func (lt *lavaTest) startTendermintConsumer(ctx context.Context) { - providerCommand := lt.lavadPath + " portal_server 127.0.0.1 3340 LAV1 tendermintrpc --from user2 --geolocation 1 --log_level debug" +func (lt *lavaTest) startRPCConsumer(ctx context.Context) { + providerCommand := lt.lavadPath + " rpcconsumer 127.0.0.1:3340 LAV1 tendermintrpc 127.0.0.1:3341 LAV1 rest 127.0.0.1:3342 LAV1 grpc --from user2 --geolocation 1 --log_level debug" logName := "06_tendermintConsumer" lt.logs[logName] = new(bytes.Buffer) @@ -546,7 +546,7 @@ func (lt *lavaTest) startRESTProvider(rpcURL string, ctx context.Context) { } func (lt *lavaTest) startRESTConsumer(ctx context.Context) { - providerCommand := lt.lavadPath + " portal_server 127.0.0.1 3341 LAV1 rest --from user2 --geolocation 1 --log_level debug" + providerCommand := lt.lavadPath + " rpcconsumer 127.0.0.1:3341 LAV1 rest --from user2 --geolocation 1 --log_level debug" logName := "09_restConsumer" lt.logs[logName] = new(bytes.Buffer) @@ -904,17 +904,16 @@ func runE2E() { tendermintCTX := context.Background() lt.startTendermintProvider("http://0.0.0.0:26657", tendermintCTX) - lt.startTendermintConsumer(tendermintCTX) - lt.checkTendermintConsumer("http://127.0.0.1:3340/1", time.Second*30) restCTX := context.Background() lt.startRESTProvider("http://127.0.0.1:1317", restCTX) - lt.startRESTConsumer(restCTX) - lt.checkRESTConsumer("http://127.0.0.1:3341/1", time.Second*30) grpcCTX := context.Background() lt.startGRPCProvider("127.0.0.1:9090", grpcCTX) - lt.startGRPCConsumer(grpcCTX) + + lt.startRPCConsumer(tendermintCTX) + lt.checkTendermintConsumer("http://127.0.0.1:3340/1", time.Second*30) + lt.checkRESTConsumer("http://127.0.0.1:3341/1", time.Second*30) lt.checkGRPCConsumer("127.0.0.1:3342", time.Second*30) jsonErr := jsonrpcTests("http://127.0.0.1:3333/1", time.Second*30) From a5e64a4336d30410c3b7bd1f7c3fd9813fedf466 Mon Sep 17 00:00:00 2001 From: Ran Mishael Date: Tue, 7 Feb 2023 20:56:12 +0100 Subject: [PATCH 5/7] PRT-432 adding deprecated message to portal server --- relayer/portal_server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/relayer/portal_server.go b/relayer/portal_server.go index e8653029b2..1da732364b 100644 --- a/relayer/portal_server.go +++ b/relayer/portal_server.go @@ -27,7 +27,10 @@ func PortalServer( apiInterface string, flagSet *pflag.FlagSet, ) { - utils.LavaFormatError("lavad portal_server is deprecated, please ", nil, nil) + utils.LavaFormatError("+++++ Important Notice +++++", nil, nil) + utils.LavaFormatError("lavad portal_server is deprecated, please use rpcconsumer instead.", nil, nil) + utils.LavaFormatError("lavad portal_server will cease to be available in version v0.7.0", nil, nil) + utils.LavaFormatError("++++++++++++++++++++++++++++", nil, nil) // utils.LavaFormatInfo("lavad Binary Version: "+version.Version, nil) rand.Seed(time.Now().UnixNano()) From d5a8afea1d967a1a6b0f30da5199746e44498bc5 Mon Sep 17 00:00:00 2001 From: Ran Mishael Date: Tue, 7 Feb 2023 21:14:00 +0100 Subject: [PATCH 6/7] PRT-432 adding warning message to portal_server users --- relayer/portal_server.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/relayer/portal_server.go b/relayer/portal_server.go index 1da732364b..88810ffe6d 100644 --- a/relayer/portal_server.go +++ b/relayer/portal_server.go @@ -27,10 +27,14 @@ func PortalServer( apiInterface string, flagSet *pflag.FlagSet, ) { - utils.LavaFormatError("+++++ Important Notice +++++", nil, nil) - utils.LavaFormatError("lavad portal_server is deprecated, please use rpcconsumer instead.", nil, nil) - utils.LavaFormatError("lavad portal_server will cease to be available in version v0.7.0", nil, nil) - utils.LavaFormatError("++++++++++++++++++++++++++++", nil, nil) + fmt.Printf("\n\n") + utils.LavaFormatError("++++++++++++++++++++++++++++++++++++++++++++++++++++++++", nil, nil) + utils.LavaFormatError("+ + Important Notice + +", nil, nil) + utils.LavaFormatError("+ lavad portal_server is deprecated. +", nil, nil) + utils.LavaFormatError("+ And will cease to be available +", nil, nil) + utils.LavaFormatError("+ in version v0.7.0 +", nil, nil) + utils.LavaFormatError("+ Please use rpcconsumer instead. +", nil, nil) + utils.LavaFormatError("++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n", nil, nil) // utils.LavaFormatInfo("lavad Binary Version: "+version.Version, nil) rand.Seed(time.Now().UnixNano()) From 8951d62c1d88e914fb04f995380deed14275cc29 Mon Sep 17 00:00:00 2001 From: Ran Mishael Date: Wed, 8 Feb 2023 10:53:35 +0100 Subject: [PATCH 7/7] PRT-432 e2e changes so it will work --- .github/workflows/e2e.yml | 28 ++++++---------------------- testutil/e2e/e2e.go | 6 +++--- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index b3d27deab5..c6b3bd68be 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -112,15 +112,6 @@ jobs: continue-on-error: true run: grep "" testutil/e2e/logs/05_tendermintProvider* --include="*errors*" - - name: Tendermint Consumer All Logs - if: always() - run: cat testutil/e2e/logs/06_tendermintConsumer.log - - - name: Tendermint Consumer Error Only Logs - if: always() - continue-on-error: true - run: cat testutil/e2e/logs/06_tendermintConsumer_errors.log - - name: Lava over Lava All Logs if: always() run: cat testutil/e2e/logs/07_lavaOverLava.log @@ -139,15 +130,6 @@ jobs: continue-on-error: true run: grep "" testutil/e2e/logs/08_restProvider* --include="*errors*" - - name: Rest Consumer All Logs - if: always() - run: cat testutil/e2e/logs/09_restConsumer.log - - - name: Rest Consumer Error Only Logs - if: always() - continue-on-error: true - run: cat testutil/e2e/logs/09_restConsumer_errors.log - - name: GRPC Provider All Logs if: always() run: grep "" testutil/e2e/logs/10_grpcProvider* --exclude="*errors*" @@ -157,11 +139,13 @@ jobs: continue-on-error: true run: grep "" testutil/e2e/logs/10_grpcProvider* --include="*errors*" - - name: GRPC Consumer All Logs + - name: RPCConsumer Consumer All Logs if: always() - run: cat testutil/e2e/logs/11_grpcConsumer.log + run: cat testutil/e2e/logs/06_RPCConsumer.log - - name: GRPC Consumer Error Only Logs + - name: RPCConsumer Consumer Error Only Logs if: always() continue-on-error: true - run: cat testutil/e2e/logs/11_grpcConsumer_errors.log + run: cat testutil/e2e/logs/06_RPCConsumer_errors.log + + \ No newline at end of file diff --git a/testutil/e2e/e2e.go b/testutil/e2e/e2e.go index 3f014463a4..24a6d00494 100644 --- a/testutil/e2e/e2e.go +++ b/testutil/e2e/e2e.go @@ -403,7 +403,7 @@ func (lt *lavaTest) startTendermintProvider(rpcURL string, ctx context.Context) func (lt *lavaTest) startRPCConsumer(ctx context.Context) { providerCommand := lt.lavadPath + " rpcconsumer 127.0.0.1:3340 LAV1 tendermintrpc 127.0.0.1:3341 LAV1 rest 127.0.0.1:3342 LAV1 grpc --from user2 --geolocation 1 --log_level debug" - logName := "06_tendermintConsumer" + logName := "06_RPCConsumer" lt.logs[logName] = new(bytes.Buffer) cmd := exec.CommandContext(ctx, "", "") @@ -418,9 +418,9 @@ func (lt *lavaTest) startRPCConsumer(ctx context.Context) { } lt.commands[logName] = cmd go func() { - lt.listenCmdCommand(cmd, "startTendermintConsumer process returned unexpectedly", "startTendermintConsumer") + lt.listenCmdCommand(cmd, "startRPCConsumer process returned unexpectedly", "startRPCConsumer") }() - utils.LavaFormatInfo("startTendermintConsumer OK", nil) + utils.LavaFormatInfo("startRPCConsumer OK", nil) } func (lt *lavaTest) checkTendermintConsumer(rpcURL string, timeout time.Duration) {