-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #676 from lavanet/CNS-remove-ignite-dep
CNSremove ignite dep
- Loading branch information
Showing
7 changed files
with
139 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,17 +12,6 @@ jobs: | |
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.20.5 | ||
|
||
# Install Ignite | ||
- name: ignite install | ||
run: git clone --depth 1 --branch v0.26.1 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/[email protected]! | bash | ||
# - name: starport version | ||
# run: starport version | ||
|
||
# Setup Paths | ||
- name: home | ||
|
@@ -48,21 +37,20 @@ jobs: | |
- 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 | ||
# Pre-build | ||
- name: lavad build | ||
run: make install | ||
|
||
###################################################### | ||
### Run Lava E2E Tests IGNITE VERSION:0.22.1 | ||
### Run Lava E2E Tests | ||
###################################################### | ||
- name: Run Lava E2E Tests IGNITE VERSION:0.22.1 -timeout 1200s | ||
- name: Run Lava E2E Tests -timeout 1200s | ||
run: go test ./testutil/e2e/ -run ^TestLavaProtocol$ -v -timeout 1200s # 20mins | ||
|
||
- name: tail -n 300 Lavad Logs | ||
if: always() | ||
run: tail -n 300 testutil/e2e/protocolLogs/00_StartLava.log | ||
|
||
- name: Stake Lava All Logs | ||
if: always() | ||
run: cat testutil/e2e/protocolLogs/01_stakeLava.log | ||
|
@@ -139,17 +127,6 @@ jobs: | |
with: | ||
go-version: 1.20.5 | ||
|
||
# Install Ignite | ||
- name: ignite install | ||
run: git clone --depth 1 --branch v0.26.1 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/[email protected]! | bash | ||
# - name: starport version | ||
# run: starport version | ||
|
||
# Setup Paths | ||
- name: home | ||
run: pwd && ls -l | ||
|
@@ -174,14 +151,9 @@ jobs: | |
- 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 | ||
# Pre-build | ||
- name: lavad build | ||
run: make install | ||
|
||
# Install Node.js | ||
- name: Setup Node.js environment | ||
|
@@ -197,11 +169,15 @@ jobs: | |
npm run build | ||
###################################################### | ||
### Run Lava E2E Tests IGNITE VERSION:0.22.1 | ||
### Run Lava E2E Tests | ||
###################################################### | ||
- name: Run Lava E2E Tests IGNITE VERSION:0.22.1 -timeout 1200s | ||
- name: Run Lava E2E Tests -timeout 1200s | ||
run: go test ./testutil/e2e/ -run ^TestLavaSDK -v -timeout 1200s # 20mins | ||
|
||
- name: tail -n 300 Lavad Logs | ||
if: always() | ||
run: tail -n 300 testutil/e2e/sdkLogs/00_StartLava.log | ||
|
||
- name: Stake Lava All Logs | ||
if: always() | ||
run: cat testutil/e2e/sdkLogs/01_stakeLava.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import json | ||
import toml | ||
|
||
# Specify the file path, field to edit, and new value | ||
path = '/home/user/.lava/config/' | ||
genesis = 'genesis.json' | ||
config = 'config.toml' | ||
|
||
# Load the JSON file | ||
with open(path + genesis, 'r') as file: | ||
data = json.load(file) | ||
|
||
data["app_state"]["gov"]["deposit_params"]["min_deposit"][0]["denom"] = "ulava" | ||
data["app_state"]["gov"]["deposit_params"]["min_deposit"][0]["amount"] = "10000000" | ||
data["app_state"]["gov"]["voting_params"]["voting_period"] = "3s" | ||
data["app_state"]["mint"]["params"]["mint_denom"] = "ulava" | ||
data["app_state"]["staking"]["params"]["bond_denom"] = "ulava" | ||
data["app_state"]["crisis"]["constant_fee"]["denom"] = "ulava" | ||
|
||
# Save the changes back to the JSON file | ||
with open(path + genesis, 'w') as file: | ||
json.dump(data, file, indent=4) | ||
|
||
|
||
|
||
# Step 1: Read the contents of the .toml file | ||
with open(path + config, 'r') as file: | ||
data = toml.load(file) | ||
|
||
# Step 2: Modify the content as required | ||
data["consensus"]["timeout_propose"] = "1s" | ||
data["consensus"]["timeout_propose_delta"] = "500ms" | ||
data["consensus"]["timeout_prevote"] = "1s" | ||
data["consensus"]["timeout_prevote_delta"] = "500ms" | ||
data["consensus"]["timeout_propose"] = "1s" | ||
data["consensus"]["timeout_precommit"] = "500ms" | ||
data["consensus"]["timeout_precommit_delta"] = "1s" | ||
data["consensus"]["timeout_commit"] = "1s" | ||
|
||
# Step 3: Write the updated content back to the .toml file | ||
with open(path + config, 'w') as file: | ||
toml.dump(data, file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
# make install | ||
|
||
rm -rf ~/.lava | ||
lavad init validator | ||
|
||
lavad config broadcast-mode block | ||
lavad config keyring-backend test | ||
|
||
# Specify the file path, field to edit, and new value | ||
path="$HOME/.lava/config/" | ||
genesis='genesis.json' | ||
config='config.toml' | ||
app='app.toml' | ||
|
||
# Edit genesis file | ||
data=$(cat "$path$genesis" \ | ||
| jq '.app_state.gov.deposit_params.min_deposit[0].denom = "ulava"' \ | ||
| jq '.app_state.gov.deposit_params.min_deposit[0].amount = "10000000"' \ | ||
| jq '.app_state.gov.voting_params.voting_period = "3s"' \ | ||
| jq '.app_state.mint.params.mint_denom = "ulava"' \ | ||
| jq '.app_state.staking.params.bond_denom = "ulava"' \ | ||
| jq '.app_state.crisis.constant_fee.denom = "ulava"' \ | ||
) | ||
|
||
echo -n "$data" > "$path$genesis" | ||
|
||
# Edit conflict.toml file | ||
sed -i "$path$config" \ | ||
-e 's/timeout_propose = .*/timeout_propose = "1s"/' \ | ||
-e 's/timeout_propose_delta = .*/timeout_propose_delta = "500ms"/' \ | ||
-e 's/timeout_prevote = .*/timeout_prevote = "1s"/' \ | ||
-e 's/timeout_prevote_delta = .*/timeout_prevote_delta = "500ms"/' \ | ||
-e 's/timeout_precommit = .*/timeout_precommit = "500ms"/' \ | ||
-e 's/timeout_precommit_delta = .*/timeout_precommit_delta = "1s"/' \ | ||
-e 's/timeout_commit = .*/timeout_commit = "1s"/' \ | ||
-e 's/skip_timeout_commit = .*/skip_timeout_commit = false/' | ||
|
||
# Edit app.toml file | ||
sed -i "$path$app" \ | ||
-e 's/enable = .*/enable = true/' | ||
|
||
|
||
# Add users | ||
users=("alice" "bob" "user1" "user2" "user3" "user4" "servicer1" "servicer2" "servicer3" "servicer4" "servicer5" "servicer6" "servicer7" "servicer8" "servicer9" "servicer10") | ||
|
||
for user in "${users[@]}"; do | ||
lavad keys add "$user" | ||
lavad add-genesis-account "$user" 50000000000000ulava | ||
done | ||
|
||
lavad gentx alice 100000000000ulava --chain-id lava | ||
lavad collect-gentxs | ||
lavad start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters