Skip to content

Commit

Permalink
chore: CNS-933-migrate-cos-3-4-5-to-meaningful-names (#1322)
Browse files Browse the repository at this point in the history
* change chain name

* fix

* another fix

---------

Co-authored-by: Yarom Swisa <[email protected] git config --global user.name Yarom>
  • Loading branch information
Yaroms and Yarom Swisa authored Mar 26, 2024
1 parent 0443e48 commit 6225529
Show file tree
Hide file tree
Showing 28 changed files with 65 additions and 1,007,667 deletions.
18 changes: 9 additions & 9 deletions config/consumer_examples/full_consumer_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ endpoints:
- chain-id: BASET
api-interface: jsonrpc
network-address: 127.0.0.1:3353
- chain-id: COS3
- chain-id: OSMOSIS
api-interface: rest
network-address: 127.0.0.1:3354
- chain-id: COS3
- chain-id: OSMOSIS
api-interface: tendermintrpc
network-address: 127.0.0.1:3355
- chain-id: COS3
- chain-id: OSMOSIS
api-interface: grpc
network-address: 127.0.0.1:3356
- chain-id: COS4
- chain-id: OSMOSIST
api-interface: rest
network-address: 127.0.0.1:3357
- chain-id: COS4
- chain-id: OSMOSIST
api-interface: tendermintrpc
network-address: 127.0.0.1:3358
- chain-id: COS4
- chain-id: OSMOSIST
api-interface: grpc
network-address: 127.0.0.1:3359
- chain-id: LAV1
Expand All @@ -59,13 +59,13 @@ endpoints:
- chain-id: LAV1
api-interface: grpc
network-address: 127.0.0.1:3362
- chain-id: COS5
- chain-id: COSMOSHUB
api-interface: rest
network-address: 127.0.0.1:3363
- chain-id: COS5
- chain-id: COSMOSHUB
api-interface: tendermintrpc
network-address: 127.0.0.1:3364
- chain-id: COS5
- chain-id: COSMOSHUB
api-interface: grpc
network-address: 127.0.0.1:3365
- chain-id: JUN1
Expand Down
4 changes: 2 additions & 2 deletions config/consumer_examples/osmosis_example.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
endpoints:
- chain-id: COS3
- chain-id: OSMOSIS
api-interface: tendermintrpc
network-address: 127.0.0.1:3335
- chain-id: COS3
- chain-id: OSMOSIS
api-interface: rest
network-address: 127.0.0.1:3334
18 changes: 9 additions & 9 deletions config/provider_examples/all_endpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,37 +66,37 @@ endpoints:
node-urls:
- url: <enter-here>
- api-interface: rest
chain-id: COS3
chain-id: OSMOSIS
network-address:
address: "127.0.0.1:2221"
node-urls:
- url: <enter-here>
- api-interface: tendermintrpc
chain-id: COS3
chain-id: OSMOSIS
network-address:
address: "127.0.0.1:2221"
node-urls:
- url: <enter-here>
- api-interface: grpc
chain-id: COS3
chain-id: OSMOSIS
network-address:
address: "127.0.0.1:2221"
node-urls:
- url: <enter-here>
- api-interface: rest
chain-id: COS4
chain-id: OSMOSIST
network-address:
address: "127.0.0.1:2221"
node-urls:
- url: <enter-here>
- api-interface: tendermintrpc
chain-id: COS4
chain-id: OSMOSIST
network-address:
address: "127.0.0.1:2221"
node-urls:
- url: <enter-here>
- api-interface: grpc
chain-id: COS4
chain-id: OSMOSIST
network-address:
address: "127.0.0.1:2221"
node-urls:
Expand All @@ -120,19 +120,19 @@ endpoints:
node-urls:
- url: <enter-here>
- api-interface: rest
chain-id: COS5
chain-id: COSMOSHUB
network-address:
address: "127.0.0.1:2221"
node-urls:
- url: <enter-here>
- api-interface: tendermintrpc
chain-id: COS5
chain-id: COSMOSHUB
network-address:
address: "127.0.0.1:2221"
node-urls:
- url: <enter-here>
- api-interface: grpc
chain-id: COS5
chain-id: COSMOSHUB
network-address:
address: "127.0.0.1:2221"
node-urls:
Expand Down
4 changes: 2 additions & 2 deletions config/provider_examples/multichain_example_with_auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ endpoints:
key-pem: /home/user/key.pem
cert-pem: /home/user/cert.pem
- api-interface: grpc
chain-id: COS3
chain-id: OSMOSIS
network-address:
address: "127.0.0.1:2221"
node-urls:
Expand All @@ -44,7 +44,7 @@ endpoints:
# default tls cert
use-tls: true
- api-interface: grpc
chain-id: COS5
chain-id: COSMOSHUB
network-address:
address: "127.0.0.1:2221"
node-urls:
Expand Down
4 changes: 2 additions & 2 deletions config/rpcconsumer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ endpoints:
- chain-id: LAV1
api-interface: grpc
network-address: 127.0.0.1:3352
- chain-id: COS3
- chain-id: OSMOSIS
api-interface: tendermintrpc
network-address: 127.0.0.1:3335
- chain-id: COS3
- chain-id: OSMOSIS
api-interface: rest
network-address: 127.0.0.1:3334
- chain-id: ETH1
Expand Down
6 changes: 3 additions & 3 deletions cookbook/specs/spec_add_cosmoshub.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Adding new specification support for relaying cosmoshub data on Lava",
"specs": [
{
"index": "COS5",
"index": "COSMOSHUB",
"name": "cosmos hub mainnet",
"enabled": true,
"imports": [
Expand Down Expand Up @@ -150,11 +150,11 @@
]
},
{
"index": "COS5T",
"index": "COSMOSHUBT",
"name": "cosmos hub testnet",
"enabled": true,
"imports": [
"COS5"
"COSMOSHUB"
],
"reliability_threshold": 268435455,
"data_reliability_enabled": true,
Expand Down
6 changes: 3 additions & 3 deletions cookbook/specs/spec_add_osmosis.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Adding new specification support for relaying Osmosis data on Lava",
"specs": [
{
"index": "COS3",
"index": "OSMOSIS",
"name": "osmosis mainnet",
"enabled": true,
"imports": [
Expand Down Expand Up @@ -2689,11 +2689,11 @@
]
},
{
"index": "COS4",
"index": "OSMOSIST",
"name": "osmosis testnet",
"enabled": true,
"imports": [
"COS3"
"OSMOSIS"
],
"reliability_threshold": 268435455,
"data_reliability_enabled": true,
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/lava-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const cosmosHub = await LavaSDK.create({
privateKey: "<lava consumer private key>",

// chainID for Cosmos Hub
chainIds: "COS5",
chainIds: "COSMOSHUB",

// geolocation 1 for North america - geolocation 2 for Europe providers
// default value is 1
Expand Down
2 changes: 1 addition & 1 deletion protocol/metrics/consumer_referrer_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestReferrerClientFlows(t *testing.T) {
endpoint := mockServer.URL
serverClient := NewConsumerReferrerClient(endpoint, 100*time.Millisecond)
serverClient.AppendReferrer(NewReferrerRequest("banana", "ETH1", "Message-1", "https://referer.com", "https://origin.com", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"))
serverClient.AppendReferrer(NewReferrerRequest("banana", "COS5", "Message-2", "https://referer.com", "https://origin.com", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"))
serverClient.AppendReferrer(NewReferrerRequest("banana", "COSMOSHUB", "Message-2", "https://referer.com", "https://origin.com", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"))
serverClient.AppendReferrer(NewReferrerRequest("papaya", "ETH1", "Message-3", "https://referer.com", "https://origin.com", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"))
time.Sleep(110 * time.Millisecond)
require.Len(t, messages, 2)
Expand Down
2 changes: 1 addition & 1 deletion protocol/rpcconsumer/rpcconsumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func CreateRPCConsumerCobraCommand() *cobra.Command {
Example: `required flags: --geolocation 1 --from alice
rpcconsumer <flags>
rpcconsumer rpcconsumer_conf <flags>
rpcconsumer 127.0.0.1:3333 COS3 tendermintrpc 127.0.0.1:3334 COS3 rest <flags>
rpcconsumer 127.0.0.1:3333 OSMOSIS tendermintrpc 127.0.0.1:3334 OSMOSIS rest <flags>
rpcconsumer consumer_examples/full_consumer_example.yml --cache-be "127.0.0.1:7778" --geolocation 1 [--debug-relays] --log_level <debug|warn|...> --from <wallet> --chain-id <lava-chain> --strategy latency`,
Args: func(cmd *cobra.Command, args []string) error {
// Optionally run one of the validators provided by cobra
Expand Down
2 changes: 1 addition & 1 deletion protocol/rpcprovider/rpcprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ optional: --save-conf
rpcprovider <flags>
rpcprovider rpcprovider_conf.yml <flags>
rpcprovider 127.0.0.1:3333 ETH1 jsonrpc wss://www.eth-node.com:80 <flags>
rpcprovider 127.0.0.1:3333 COS3 tendermintrpc "wss://www.node-path.com:80,https://www.node-path.com:80" 127.0.0.1:3333 COS3 rest https://www.node-path.com:1317 <flags>`,
rpcprovider 127.0.0.1:3333 OSMOSIS tendermintrpc "wss://www.node-path.com:80,https://www.node-path.com:80" 127.0.0.1:3333 OSMOSIS rest https://www.node-path.com:1317 <flags>`,
Args: func(cmd *cobra.Command, args []string) error {
// Optionally run one of the validators provided by cobra
if err := cobra.RangeArgs(0, 1)(cmd, args); err == nil {
Expand Down
6 changes: 3 additions & 3 deletions scripts/automation_scripts/grpc_spec_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
# chainId = "CANTO"

#
# grpcurl -plaintext prod-pnet-osmosisnode-1.lavapro.xyz:9090 list # COS3
# grpcurl -plaintext prod-pnet-osmosisnode-1.lavapro.xyz:9090 list # OSMOSIS
# grpcurl -plaintext public-rpc.lavanet.xyz:9090 list # LAV1
# grpcurl -plaintext gaia-node-1.lavapro.xyz:9090 list # COS5
# grpcurl -plaintext gaia-node-1.lavapro.xyz:9090 list # COSMOSHUB
# grpcurl -plaintext juno-node-1.lavapro.xyz:9090 list # JUNO
# # --- #
# grpcurl -plaintext gaia-node-1.lavapro.xyz:9092 list # COS5T
# grpcurl -plaintext gaia-node-1.lavapro.xyz:9092 list # COSMOSHUBT
# grpcurl -plaintext juno-node-1.lavapro.xyz:9092 list # JUNO-TEST
# grpcurl -plaintext grpc-axelar.stakerun.com:9090 list # AXELAR
# grpcurl -plaintext canto-grpc.polkachu.com:15590 list # CANTO
Expand Down
4 changes: 2 additions & 2 deletions scripts/cli_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ wait_count_blocks 1 >/dev/null
(trace lavad tx pairing stake-provider ETH1 $PROVIDERSTAKE "$PROVIDER1_LISTENER,1" 1 $(operator_address) --provider-moniker "provider" $txoptions)>/dev/null
wait_count_blocks 1 >/dev/null

CHAINS="GTH1,COS3,FTM250,CELO,LAV1,COS4,ALFAJORES,ARB1,ARBN,APT1,STRK,JUN1,COS5,POLYGON1,EVMOS,OPTM,BASET,CANTO,SUIT,SOLANA,BSC,AXELAR,AVAX,FVM,NEAR"
CHAINS="GTH1,OSMOSIS,FTM250,CELO,LAV1,OSMOSIST,ALFAJORES,ARB1,ARBN,APT1,STRK,JUN1,COSMOSHUB,POLYGON1,EVMOS,OPTM,BASET,CANTO,SUIT,SOLANA,BSC,AXELAR,AVAX,FVM,NEAR"
(trace lavad tx pairing bulk-stake-provider $CHAINS $PROVIDERSTAKE "$PROVIDER1_LISTENER,1" 1 $(operator_address) --provider-moniker "provider" $txoptions)>/dev/null

sleep_until_next_epoch >/dev/null
(trace lavad tx pairing modify-provider ETH1 --provider-moniker "provider" --delegate-commission 20 --delegate-limit 1000ulava --amount $PROVIDERSTAKE --endpoints "127.0.0.2:2222,1" $txoptions)>/dev/null
wait_count_blocks 1 >/dev/null
(trace lavad tx pairing freeze ETH1,CELO $txoptions)>/dev/null
wait_count_blocks 1 >/dev/null
(trace lavad tx pairing unstake-provider LAV1,COS4 $txoptions)>/dev/null
(trace lavad tx pairing unstake-provider LAV1,OSMOSIST $txoptions)>/dev/null
sleep_until_next_epoch >/dev/null
(trace lavad tx pairing unfreeze ETH1,CELO $txoptions)>/dev/null

Expand Down
2 changes: 1 addition & 1 deletion scripts/delegation_commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ source $__dir/useful_commands.sh
. ${__dir}/vars/variables.sh

# Provider delegations (dualstaking module)
lavad tx dualstaking delegate $(lavad keys show servicer1 -a) COS3 $(operator_address) 1000ulava -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices 0.000000001ulava
lavad tx dualstaking delegate $(lavad keys show servicer1 -a) OSMOSIS $(operator_address) 1000ulava -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices 0.000000001ulava
wait_count_blocks 1
lavad tx dualstaking delegate $(lavad keys show servicer3 -a) LAV1 $(operator_address) 1000ulava -y --from user2 --gas-adjustment "1.5" --gas "auto" --gas-prices 0.000000001ulava
wait_count_blocks 1
Expand Down
Loading

0 comments on commit 6225529

Please sign in to comment.