Skip to content

Commit

Permalink
revert chain id
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaroms committed Jan 23, 2024
1 parent 51efb52 commit 569358a
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function setupConsumerSessionManager(
function setupRelayer(): Relayer {
return new Relayer({
allowInsecureTransport: true,
lavaChainId: "lava-local-1",
lavaChainId: "lava",
privKey: "",
secure: true,
});
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/lava-sdk/src/relayer/relayer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe("Test relay request", () => {
];
const relayer = new Relayer({
allowInsecureTransport: true,
lavaChainId: "lava-local-1",
lavaChainId: "lava",
privKey: "",
secure: true,
});
Expand Down
2 changes: 1 addition & 1 deletion protocol/badgegenerator/badgeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var (

func CreateBadgeGeneratorCobraCommand() *cobra.Command {
cmd := &cobra.Command{
Use: `badgegenerator --port=8080 --log-level=debug --lava-rpc=http://127.0.0.1:26657 --lava-grpc=127.0.0.1:9090 --chain-id=lava-local-1`,
Use: `badgegenerator --port=8080 --log-level=debug --lava-rpc=http://127.0.0.1:26657 --lava-grpc=127.0.0.1:9090 --chain-id=lava`,
Short: `badgegenerator sets up a server to listen for badges requests from the lava sdk and respond with a signed badge`,
Long: `badgegenerator sets up a server to listen for badges requests from the lava sdk and respond with a signed badge`,
Example: `badgegenerator <flags>`,
Expand Down
2 changes: 1 addition & 1 deletion scripts/init_chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if ! command_exists jq; then
fi

rm -rf ~/.lava
chainID="lava-local-1"
chainID="lava"
lavad init validator --chain-id $chainID
lavad config broadcast-mode sync
lavad config keyring-backend test
Expand Down
10 changes: 5 additions & 5 deletions scripts/relayer/init_relay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ home2=~/.lava2

rly config init

rly chains add -f $__dir/lav1.json lava-local-1
rly chains add -f $__dir/lav1.json lava
rly chains add -f $__dir/lav2.json lava-local-2

rly keys add lava-local-1 rly1
rly keys add lava rly1
rly keys add lava-local-2 rly2

lavad tx bank send alice $(rly keys show lava-local-1 rly1) 10000000ulava -y --from alice
lavad tx bank send alice $(rly keys show lava rly1) 10000000ulava -y --from alice
lavad tx bank send alice $(rly keys show lava-local-2 rly2) 10000000ulava -y --from alice --home $home2

rly keys use lava-local-1 rly1
rly keys use lava rly1
rly keys use lava-local-2 rly2

rly paths new lava-local-1 lava-local-2 demo-path
rly paths new lava lava-local-2 demo-path
rly tx link demo-path -d -t 3s

2 changes: 1 addition & 1 deletion scripts/relayer/lav1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"type": "cosmos",
"value": {
"key": "default",
"chain-id": "lava-local-1",
"chain-id": "lava",
"rpc-addr": "http://127.0.0.1:26657",
"account-prefix": "lava@",
"keyring-backend": "test",
Expand Down
4 changes: 2 additions & 2 deletions testutil/e2e/paymentE2E.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (lt *lavaTest) stakeLavaForPayment(ctx context.Context) {
func (lt *lavaTest) startLavaProvidersForPayment(ctx context.Context) {
for idx := 1; idx <= 2; idx++ {
command := fmt.Sprintf(
"%s rpcprovider %s/lavaProvider%d --chain-id=lava-local-1 --from servicer%d %s",
"%s rpcprovider %s/lavaProvider%d --chain-id=lava --from servicer%d %s",
lt.protocolPath, configFolder, idx+5, idx, lt.lavadArgs,
)
logName := "05_LavaProvider_" + fmt.Sprintf("%02d", idx)
Expand All @@ -64,7 +64,7 @@ func (lt *lavaTest) startLavaProvidersForPayment(ctx context.Context) {
func (lt *lavaTest) startLavaConsumerForPayment(ctx context.Context) {
for idx, u := range []string{"user1"} {
command := fmt.Sprintf(
"%s rpcconsumer %s/lavaConsumer%d.yml --chain-id=lava-local-1 --from %s %s --concurrent-providers 1",
"%s rpcconsumer %s/lavaConsumer%d.yml --chain-id=lava --from %s %s --concurrent-providers 1",
lt.protocolPath, configFolder, idx+1, u, lt.lavadArgs+lt.consumerArgs,
)
logName := "06_RPCConsumer_" + fmt.Sprintf("%02d", idx+1)
Expand Down
10 changes: 5 additions & 5 deletions testutil/e2e/protocolE2E.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func (lt *lavaTest) startJSONRPCProxy(ctx context.Context) {
func (lt *lavaTest) startJSONRPCProvider(ctx context.Context) {
for idx := 1; idx <= 5; idx++ {
command := fmt.Sprintf(
"%s rpcprovider %s/jsonrpcProvider%d.yml --chain-id=lava-local-1 --from servicer%d %s",
"%s rpcprovider %s/jsonrpcProvider%d.yml --chain-id=lava --from servicer%d %s",
lt.protocolPath, configFolder, idx, idx, lt.lavadArgs,
)
logName := "03_EthProvider_" + fmt.Sprintf("%02d", idx)
Expand All @@ -352,7 +352,7 @@ func (lt *lavaTest) startJSONRPCProvider(ctx context.Context) {
func (lt *lavaTest) startJSONRPCConsumer(ctx context.Context) {
for idx, u := range []string{"user1"} {
command := fmt.Sprintf(
"%s rpcconsumer %s/ethConsumer%d.yml --chain-id=lava-local-1 --from %s %s",
"%s rpcconsumer %s/ethConsumer%d.yml --chain-id=lava --from %s %s",
lt.protocolPath, configFolder, idx+1, u, lt.lavadArgs+lt.consumerArgs,
)
logName := "04_jsonConsumer_" + fmt.Sprintf("%02d", idx+1)
Expand Down Expand Up @@ -527,7 +527,7 @@ func jsonrpcTests(rpcURL string, testDuration time.Duration) error {
func (lt *lavaTest) startLavaProviders(ctx context.Context) {
for idx := 6; idx <= 10; idx++ {
command := fmt.Sprintf(
"%s rpcprovider %s/lavaProvider%d --chain-id=lava-local-1 --from servicer%d %s",
"%s rpcprovider %s/lavaProvider%d --chain-id=lava --from servicer%d %s",
lt.protocolPath, configFolder, idx, idx, lt.lavadArgs,
)
logName := "05_LavaProvider_" + fmt.Sprintf("%02d", idx-5)
Expand All @@ -546,7 +546,7 @@ func (lt *lavaTest) startLavaProviders(ctx context.Context) {
func (lt *lavaTest) startLavaConsumer(ctx context.Context) {
for idx, u := range []string{"user3"} {
command := fmt.Sprintf(
"%s rpcconsumer %s/lavaConsumer%d.yml --chain-id=lava-local-1 --from %s %s",
"%s rpcconsumer %s/lavaConsumer%d.yml --chain-id=lava --from %s %s",
lt.protocolPath, configFolder, idx+1, u, lt.lavadArgs+lt.consumerArgs,
)
logName := "06_RPCConsumer_" + fmt.Sprintf("%02d", idx+1)
Expand All @@ -559,7 +559,7 @@ func (lt *lavaTest) startLavaConsumer(ctx context.Context) {
func (lt *lavaTest) startLavaEmergencyConsumer(ctx context.Context) {
for idx, u := range []string{"user5"} {
command := fmt.Sprintf(
"%s rpcconsumer %s/lavaConsumerEmergency%d.yml --chain-id=lava-local-1 --from %s %s",
"%s rpcconsumer %s/lavaConsumerEmergency%d.yml --chain-id=lava --from %s %s",
lt.protocolPath, configFolder, idx+1, u, lt.lavadArgs+lt.consumerArgs,
)
logName := "11_RPCEmergencyConsumer_" + fmt.Sprintf("%02d", idx+1)
Expand Down
4 changes: 2 additions & 2 deletions testutil/e2e/sdk/tests/emergency_mode_badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function main() {
projectId: process.env.BADGE_PROJECT_ID,
},
chainIds: ["LAV1"],
lavaChainId:"lava-local-1",
lavaChainId:"lava",
pairingListConfig:process.env.PAIRING_LIST,
allowInsecureTransport: true,
logLevel: "debug",
Expand All @@ -33,7 +33,7 @@ async function main() {
const chainID = parsedResponse.result["node_info"].network;

// Validate chainID
if (chainID !== "lava-local-1") {
if (chainID !== "lava") {
throw new Error(" ERR [emergency_mode_badge] Chain ID is not equal to lava");
} else {
console.log(i, "[emergency_mode_badge] Success: Fetching Lava chain ID using tendermintrpc passed. Chain ID correctly matches 'lava'");
Expand Down
4 changes: 2 additions & 2 deletions testutil/e2e/sdk/tests/emergency_mode_badge_err.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function main() {
projectId: process.env.BADGE_PROJECT_ID,
},
chainIds: ["LAV1"],
lavaChainId:"lava-local-1",
lavaChainId:"lava",
pairingListConfig:process.env.PAIRING_LIST,
allowInsecureTransport: true,
logLevel: "debug",
Expand All @@ -30,7 +30,7 @@ async function main() {
const chainID = parsedResponse.result["node_info"].network;

// Validate chainID
if (chainID !== "lava-local-1") {
if (chainID !== "lava") {
throw new Error(" ERR [emergency_mode_badge_err] Chain ID is not equal to lava");
} else {
console.log(i, "[emergency_mode_badge_err] Success: Fetching Lava chain ID using tendermintrpc passed. Chain ID correctly matches 'lava'");
Expand Down
4 changes: 2 additions & 2 deletions testutil/e2e/sdk/tests/emergency_mode_fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ async function main() {
const lavaSDKTendermint = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY,
chainIds: "LAV1",
lavaChainId: "lava-local-1",
lavaChainId: "lava",
pairingListConfig: process.env.PAIRING_LIST,
allowInsecureTransport: true,
logLevel: "debug",
Expand All @@ -30,7 +30,7 @@ async function main() {
const chainID = parsedResponse.result["node_info"].network;

// Validate chainID
if (chainID !== "lava-local-1") {
if (chainID !== "lava") {
throw new Error(" ERR [emergency_mode_fetch] Chain ID is not equal to lava");
} else {
console.log(i, "[emergency_mode_fetch] Success: Fetching Lava chain ID using tendermintrpc passed. Chain ID correctly matches 'lava'");
Expand Down
4 changes: 2 additions & 2 deletions testutil/e2e/sdk/tests/emergency_mode_fetch_err.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ async function main() {
const lavaSDKTendermint = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY,
chainIds: "LAV1",
lavaChainId: "lava-local-1",
lavaChainId: "lava",
pairingListConfig: process.env.PAIRING_LIST,
allowInsecureTransport: true,
logLevel: "debug",
Expand All @@ -27,7 +27,7 @@ async function main() {
const chainID = parsedResponse.result["node_info"].network;

// Validate chainID
if (chainID !== "lava-local-1") {
if (chainID !== "lava") {
throw new Error(" ERR [emergency_mode_fetch_err] Chain ID is not equal to lava");
} else {
console.log(i, "[emergency_mode_fetch_err] Success: Fetching Lava chain ID using tendermintrpc passed. Chain ID correctly matches 'lava'");
Expand Down
2 changes: 1 addition & 1 deletion testutil/e2e/sdk/tests/jsonrpc_badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function main() {
projectId: process.env.BADGE_PROJECT_ID,
},
chainIds: ["ETH1"],
lavaChainId:"lava-local-1",
lavaChainId:"lava",
pairingListConfig:process.env.PAIRING_LIST,
allowInsecureTransport: true,
logLevel: "debug",
Expand Down
2 changes: 1 addition & 1 deletion testutil/e2e/sdk/tests/jsonrpc_chainId_fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ async function main() {
const eth = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY,
chainIds: "ETH1",
lavaChainId:"lava-local-1",
lavaChainId:"lava",
pairingListConfig:process.env.PAIRING_LIST,
allowInsecureTransport: true,
logLevel: "debug",
Expand Down
4 changes: 2 additions & 2 deletions testutil/e2e/sdk/tests/rest_chainId_fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ async function main() {
const lavaSdkRest = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY,
chainIds: ["LAV1"],
lavaChainId:"lava-local-1",
lavaChainId:"lava",
pairingListConfig: process.env.PAIRING_LIST,
allowInsecureTransport: true,
logLevel: "debug",
Expand All @@ -31,7 +31,7 @@ async function main() {
const chainID = parsedResponse["default_node_info"].network;

// Validate chainID
if (chainID != "lava-local-1") {
if (chainID != "lava") {
throw new Error(" ERR [rest_chainId_fetch] Chain ID is not equal to lava");
}else{
console.log(i, "[rest_chainId_fetch] Success: Fetching Lava chain ID using REST passed. Chain ID correctly matches 'lava'");
Expand Down
4 changes: 2 additions & 2 deletions testutil/e2e/sdk/tests/rest_optional_params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ async function main() {
const lavaSdkRest = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY,
chainIds: ["LAV1"],
lavaChainId: "lava-local-1",
lavaChainId: "lava",
pairingListConfig: process.env.PAIRING_LIST,
allowInsecureTransport: true,
logLevel: "debug",
Expand All @@ -29,7 +29,7 @@ async function main() {
const chainID = result["block"]["header"]["chain_id"];

// Validate chainID
if (chainID != "lava-local-1") {
if (chainID != "lava") {
throw new Error(" ERR [rest_optional_params] Chain ID is not equal to lava");
} else {
console.log(i, "[rest_optional_params] Success: Fetching Lava chain ID using REST passed. Chain ID correctly matches 'lava'");
Expand Down
4 changes: 2 additions & 2 deletions testutil/e2e/sdk/tests/tendermintrpc_chainid_fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ async function main() {
const lavaSDKTendermint = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY,
chainIds: "LAV1",
lavaChainId:"lava-local-1",
lavaChainId:"lava",
pairingListConfig:process.env.PAIRING_LIST,
allowInsecureTransport: true,
logLevel: "debug",
Expand All @@ -30,7 +30,7 @@ async function main() {
const chainID = parsedResponse.result["node_info"].network;

// Validate chainID
if (chainID != "lava-local-1") {
if (chainID != "lava") {
throw new Error(" ERR [tendermintrpc_chainid_fetch] Chain ID is not equal to lava");
}else{
console.log(i, "[tendermintrpc_chainid_fetch] Success: Fetching Lava chain ID using tendermintrpc passed. Chain ID correctly matches 'lava'");
Expand Down
2 changes: 1 addition & 1 deletion testutil/e2e/sdk/tests/tendermintrpc_named_params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ async function main() {
const lavaSDKTendermint = await LavaSDK.create({
privateKey: process.env.PRIVATE_KEY,
chainIds: "LAV1",
lavaChainId:"lava-local-1",
lavaChainId:"lava",
pairingListConfig:process.env.PAIRING_LIST,
allowInsecureTransport: true,
logLevel: "debug",
Expand Down
2 changes: 1 addition & 1 deletion testutil/e2e/sdkE2E.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (lt *lavaTest) startBadgeServer(ctx context.Context, privateKey, publicKey,
panic(err)
}

command := fmt.Sprintf("%s badgegenerator --port=%s --grpc-url=127.0.0.1:9090 --log_level=debug --chain-id lava-local-1", lt.protocolPath, port)
command := fmt.Sprintf("%s badgegenerator --port=%s --grpc-url=127.0.0.1:9090 --log_level=debug --chain-id lava", lt.protocolPath, port)
err = os.Setenv("BADGE_DEFAULT_GEOLOCATION", "1")
if err != nil {
panic(err)
Expand Down

0 comments on commit 569358a

Please sign in to comment.