Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.DS_Store
*.tar.lz4
**/validators/**/data
**/validators/**/wasm
25 changes: 22 additions & 3 deletions multival-novote/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,26 @@ Allows to take a network state snapshot, devnetify to run it locally with multi
NOTE:

Docker images always have a version tag, you can build image locally and make a special version tag.
Meanwhile, locally avaialable binaries (injectived), are not tagged, it uses whatever binary is available.
Meanwhile, locally available binaries (injectived), are not tagged, it uses whatever binary is available.

Requirements: Make sure you have git-lfs installed and pulled the repo with `git lfs pull` to have all local files.

If you already cloned:

```bash
git lfs install
git lfs fetch --all
git lfs checkout # or: git lfs pull
```

If you haven’t cloned yet:

```bash
git lfs install
git clone https://github.com/InjectiveLabs/injective-devnetify-testbed
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix repository URL in clone command.

Line 28 uses InjectiveLabs/injective-devnetify-testbed, while this PR targets InjectiveLabs/devnetify-testbed. This can send users to the wrong repo.

Suggested fix
-git clone https://github.com/InjectiveLabs/injective-devnetify-testbed
+git clone https://github.com/InjectiveLabs/devnetify-testbed
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
git clone https://github.com/InjectiveLabs/injective-devnetify-testbed
git clone https://github.com/InjectiveLabs/devnetify-testbed
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@multival-novote/README.md` at line 28, The git clone URL currently references
"InjectiveLabs/injective-devnetify-testbed" in the README clone command; update
that clone command string to "git clone
https://github.com/InjectiveLabs/devnetify-testbed" so users are pointed to the
correct repository (look for the clone command line in README.md and replace the
repository path in the URL).

cd injective-devnetify-testbed
git lfs pull
```

```bash
# after cloning repo don't forget to initialize LFS
Expand All @@ -20,14 +39,14 @@ git lfs pull

STEPS:

0. *(optionally)* Re-generate target validators dirs and keys using `make gen-4` if target version changes. Uses [chain-stresser](https://github.com/InjectiveLabs/chain-stresser) binary.
0. _(optionally)_ Re-generate target validators dirs and keys using `make gen-4` if target version changes. Uses [chain-stresser](https://github.com/InjectiveLabs/chain-stresser) binary.
1. Download the latest [mainnet state snapshot](https://polkachu.com/tendermint_snapshots/injective) from Polkachu, put archive into `injective-1/` dir.
2. Run `make unpack`, it will decompress and copy data into all 4 validators.
3. Run `make devnetify`, wait for it to finish. Tip: set `UPGRADE_HANDLER_VERSION` and `DOCKER_IMAGE` in [./injective-1/.env](./injective-1/.env) file.
4. Tada! If it exited with 0, you have a multi-validator state with 4 validators, ready to be used for testing.
5. Run `make injectived-start` to start docker compose network of 4 validators, running continuously.
6. Run `make injectived-stop` to stop the docker compose network and clean up.
7. *(optionally)* Run `make clean` to remove all data and rollback to Step 1. (archive not removed, can do `make unpack` next).
7. _(optionally)_ Run `make clean` to remove all data and rollback to Step 1. (archive not removed, can do `make unpack` next).

Access the first node using CLI (via Docker container) `./injective-1/cli/injectived-cli-v1.16.4.sh` or via local binary `./injective-1/cli/injectived-cli-local.sh`

Expand Down
4 changes: 2 additions & 2 deletions multival-novote/injective-1/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DOCKER_IMAGE=injectivelabs/injective-core:v1.17.2
UPGRADE_HANDLER_VERSION="v1.17.2"
DOCKER_IMAGE=injectivelabs/injective-core:local
UPGRADE_HANDLER_VERSION="v1.19.0"
18 changes: 15 additions & 3 deletions multival-novote/injective-1/cli/devnetify.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/bin/bash

docker compose -f ./injective-1/docker-compose.devnetify.yml up
sleep 1 # 5s + 1s total max time
docker compose -f ./injective-1/docker-compose.devnetify.yml down
set -uo pipefail

COMPOSE_FILE=./injective-1/docker-compose.devnetify.yml

exit_code=0
docker compose -f "${COMPOSE_FILE}" up --abort-on-container-failure || exit_code=$?

down_code=0
docker compose -f "${COMPOSE_FILE}" down || down_code=$?

if [ "${exit_code}" -ne 0 ]; then
exit "${exit_code}"
fi

exit "${down_code}"
8 changes: 4 additions & 4 deletions multival-novote/injective-1/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
injectived0:
container_name: devnet-validator-0
container_name: injstress-validator-0
image: "${DOCKER_IMAGE}"
environment:
- DEBUG=0
Expand All @@ -26,7 +26,7 @@ services:
ipv4_address: 172.127.0.2
command: injectived --home=/root/.injectived start
injectived1:
container_name: devnet-validator-1
container_name: injstress-validator-1
image: "${DOCKER_IMAGE}"
environment:
- DEBUG=0
Expand All @@ -44,7 +44,7 @@ services:
ipv4_address: 172.127.0.3
command: injectived --home=/root/.injectived start
injectived2:
container_name: devnet-validator-2
container_name: injstress-validator-2
image: "${DOCKER_IMAGE}"
environment:
- DEBUG=0
Expand All @@ -62,7 +62,7 @@ services:
ipv4_address: 172.127.0.4
command: injectived --home=/root/.injectived start
injectived3:
container_name: devnet-validator-3
container_name: injstress-validator-3
image: "${DOCKER_IMAGE}"
environment:
- DEBUG=0
Expand Down
2 changes: 1 addition & 1 deletion multival-novote/injective-1/instances/0/accounts.json
Git LFS file not shown
7 changes: 4 additions & 3 deletions multival-novote/injective-1/validators/0/config/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ prometheus-retention-time = 0
#
# Example:
# [["chain_id", "cosmoshub-1"]]
global-labels = []
global-labels = [
]

# MetricsSink defines the type of metrics sink to use.
metrics-sink = ""
Expand Down Expand Up @@ -211,7 +212,7 @@ ws-address = "0.0.0.0:8546"

# API defines a list of JSON-RPC namespaces that should be enabled
# Example: "eth,txpool,personal,net,debug,web3"
api = "eth,web3,net,debug,txpool,inj"
api = "eth,net,web3"

# GasCap sets a cap on gas that can be used in eth_call/estimateGas (0=infinite).
gas-cap = 25000000
Expand Down Expand Up @@ -316,4 +317,4 @@ stop-node-on-err = true
#
# Note, this configuration only applies to SDK built-in app-side mempool
# implementations.
max-txs = 500000
max-txs = 500000
8 changes: 4 additions & 4 deletions multival-novote/injective-1/validators/0/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ external_address = ""
seeds = ""

# Comma separated list of nodes to keep persistent connections to
persistent_peers = "864b0a27babd8e63ae5109625b17a36e24692f88@172.127.0.3:26656,2f999a46fb2cda3e6fe32d9f7d33dd84ee8c2578@172.127.0.4:26656,bc8e37a3a4eac058114a2f984059a331708e96ba@172.127.0.5:26656"
persistent_peers = "212bd71aa2f6f2e1d6c6404433a56fc246ba140e@172.127.0.3:26656,a71bd13567b64c337369ea599aab1ef0115187f4@172.127.0.4:26656,f9b58f709a0ce84802af590dd5df02ea8fda4614@172.127.0.5:26656"

# Path to address book
addr_book_file = "config/addrbook.json"
Expand Down Expand Up @@ -307,7 +307,7 @@ pex = true
seed_mode = false

# Comma separated list of peer IDs to keep private (will not be gossiped to other peers)
private_peer_ids = "010df55920457ef3bed7a7efe9571f4ee78785a0,864b0a27babd8e63ae5109625b17a36e24692f88,2f999a46fb2cda3e6fe32d9f7d33dd84ee8c2578,bc8e37a3a4eac058114a2f984059a331708e96ba"
private_peer_ids = "50b3316ee14d4f8129d2074e163888fc793a4616,212bd71aa2f6f2e1d6c6404433a56fc246ba140e,a71bd13567b64c337369ea599aab1ef0115187f4,f9b58f709a0ce84802af590dd5df02ea8fda4614"

# Toggle to disable guard against peers connecting from the same ip.
allow_duplicate_ip = false
Expand Down Expand Up @@ -508,7 +508,7 @@ peer_query_maj23_sleep_duration = "2s"
# considerable amount of disk space. Set to false to ensure ABCI responses are
# persisted. ABCI responses are required for /block_results RPC queries, and to
# reindex events in the command-line tool.
discard_abci_responses = false
discard_abci_responses = true

# The representation of keys in the database.
# The current representation of keys in Comet's stores is considered to be v1
Expand Down Expand Up @@ -580,7 +580,7 @@ initial_block_results_retain_height = 0
# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed.
# 3) "psql" - the indexer services backed by PostgreSQL.
# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed.
indexer = "kv"
indexer = "null"

# The PostgreSQL connection configuration, the connection format:
# postgresql://<user>:<password>@<host>:<port>/<db>?<opts>
Expand Down
4 changes: 2 additions & 2 deletions multival-novote/injective-1/validators/0/config/genesis.json
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
9 changes: 5 additions & 4 deletions multival-novote/injective-1/validators/1/config/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ prometheus-retention-time = 0
#
# Example:
# [["chain_id", "cosmoshub-1"]]
global-labels = []
global-labels = [
]

# MetricsSink defines the type of metrics sink to use.
metrics-sink = ""
Expand Down Expand Up @@ -209,10 +210,10 @@ address = "0.0.0.0:8545"
# Address defines the EVM WebSocket server address to bind to.
ws-address = "0.0.0.0:8546"

api = "eth,web3,net,debug,txpool,inj"

# API defines a list of JSON-RPC namespaces that should be enabled
# Example: "eth,txpool,personal,net,debug,web3"
api = "eth,net,web3"

# GasCap sets a cap on gas that can be used in eth_call/estimateGas (0=infinite).
gas-cap = 25000000

Expand Down Expand Up @@ -316,4 +317,4 @@ stop-node-on-err = true
#
# Note, this configuration only applies to SDK built-in app-side mempool
# implementations.
max-txs = 500000
max-txs = 500000
8 changes: 4 additions & 4 deletions multival-novote/injective-1/validators/1/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ external_address = ""
seeds = ""

# Comma separated list of nodes to keep persistent connections to
persistent_peers = "010df55920457ef3bed7a7efe9571f4ee78785a0@172.127.0.2:26656,2f999a46fb2cda3e6fe32d9f7d33dd84ee8c2578@172.127.0.4:26656,bc8e37a3a4eac058114a2f984059a331708e96ba@172.127.0.5:26656"
persistent_peers = "50b3316ee14d4f8129d2074e163888fc793a4616@172.127.0.2:26656,a71bd13567b64c337369ea599aab1ef0115187f4@172.127.0.4:26656,f9b58f709a0ce84802af590dd5df02ea8fda4614@172.127.0.5:26656"

# Path to address book
addr_book_file = "config/addrbook.json"
Expand Down Expand Up @@ -307,7 +307,7 @@ pex = true
seed_mode = false

# Comma separated list of peer IDs to keep private (will not be gossiped to other peers)
private_peer_ids = "010df55920457ef3bed7a7efe9571f4ee78785a0,864b0a27babd8e63ae5109625b17a36e24692f88,2f999a46fb2cda3e6fe32d9f7d33dd84ee8c2578,bc8e37a3a4eac058114a2f984059a331708e96ba"
private_peer_ids = "50b3316ee14d4f8129d2074e163888fc793a4616,212bd71aa2f6f2e1d6c6404433a56fc246ba140e,a71bd13567b64c337369ea599aab1ef0115187f4,f9b58f709a0ce84802af590dd5df02ea8fda4614"

# Toggle to disable guard against peers connecting from the same ip.
allow_duplicate_ip = false
Expand Down Expand Up @@ -508,7 +508,7 @@ peer_query_maj23_sleep_duration = "2s"
# considerable amount of disk space. Set to false to ensure ABCI responses are
# persisted. ABCI responses are required for /block_results RPC queries, and to
# reindex events in the command-line tool.
discard_abci_responses = false
discard_abci_responses = true

# The representation of keys in the database.
# The current representation of keys in Comet's stores is considered to be v1
Expand Down Expand Up @@ -580,7 +580,7 @@ initial_block_results_retain_height = 0
# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed.
# 3) "psql" - the indexer services backed by PostgreSQL.
# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed.
indexer = "kv"
indexer = "null"

# The PostgreSQL connection configuration, the connection format:
# postgresql://<user>:<password>@<host>:<port>/<db>?<opts>
Expand Down
4 changes: 2 additions & 2 deletions multival-novote/injective-1/validators/1/config/genesis.json
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
9 changes: 5 additions & 4 deletions multival-novote/injective-1/validators/2/config/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ prometheus-retention-time = 0
#
# Example:
# [["chain_id", "cosmoshub-1"]]
global-labels = []
global-labels = [
]

# MetricsSink defines the type of metrics sink to use.
metrics-sink = ""
Expand Down Expand Up @@ -209,10 +210,10 @@ address = "0.0.0.0:8545"
# Address defines the EVM WebSocket server address to bind to.
ws-address = "0.0.0.0:8546"

api = "eth,web3,net,debug,txpool,inj"

# API defines a list of JSON-RPC namespaces that should be enabled
# Example: "eth,txpool,personal,net,debug,web3"
api = "eth,net,web3"

# GasCap sets a cap on gas that can be used in eth_call/estimateGas (0=infinite).
gas-cap = 25000000

Expand Down Expand Up @@ -316,4 +317,4 @@ stop-node-on-err = true
#
# Note, this configuration only applies to SDK built-in app-side mempool
# implementations.
max-txs = 500000
max-txs = 500000
8 changes: 4 additions & 4 deletions multival-novote/injective-1/validators/2/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ external_address = ""
seeds = ""

# Comma separated list of nodes to keep persistent connections to
persistent_peers = "010df55920457ef3bed7a7efe9571f4ee78785a0@172.127.0.2:26656,864b0a27babd8e63ae5109625b17a36e24692f88@172.127.0.3:26656,bc8e37a3a4eac058114a2f984059a331708e96ba@172.127.0.5:26656"
persistent_peers = "50b3316ee14d4f8129d2074e163888fc793a4616@172.127.0.2:26656,212bd71aa2f6f2e1d6c6404433a56fc246ba140e@172.127.0.3:26656,f9b58f709a0ce84802af590dd5df02ea8fda4614@172.127.0.5:26656"

# Path to address book
addr_book_file = "config/addrbook.json"
Expand Down Expand Up @@ -307,7 +307,7 @@ pex = true
seed_mode = false

# Comma separated list of peer IDs to keep private (will not be gossiped to other peers)
private_peer_ids = "010df55920457ef3bed7a7efe9571f4ee78785a0,864b0a27babd8e63ae5109625b17a36e24692f88,2f999a46fb2cda3e6fe32d9f7d33dd84ee8c2578,bc8e37a3a4eac058114a2f984059a331708e96ba"
private_peer_ids = "50b3316ee14d4f8129d2074e163888fc793a4616,212bd71aa2f6f2e1d6c6404433a56fc246ba140e,a71bd13567b64c337369ea599aab1ef0115187f4,f9b58f709a0ce84802af590dd5df02ea8fda4614"

# Toggle to disable guard against peers connecting from the same ip.
allow_duplicate_ip = false
Expand Down Expand Up @@ -508,7 +508,7 @@ peer_query_maj23_sleep_duration = "2s"
# considerable amount of disk space. Set to false to ensure ABCI responses are
# persisted. ABCI responses are required for /block_results RPC queries, and to
# reindex events in the command-line tool.
discard_abci_responses = false
discard_abci_responses = true

# The representation of keys in the database.
# The current representation of keys in Comet's stores is considered to be v1
Expand Down Expand Up @@ -580,7 +580,7 @@ initial_block_results_retain_height = 0
# - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed.
# 3) "psql" - the indexer services backed by PostgreSQL.
# When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed.
indexer = "kv"
indexer = "null"

# The PostgreSQL connection configuration, the connection format:
# postgresql://<user>:<password>@<host>:<port>/<db>?<opts>
Expand Down
4 changes: 2 additions & 2 deletions multival-novote/injective-1/validators/2/config/genesis.json
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
9 changes: 5 additions & 4 deletions multival-novote/injective-1/validators/3/config/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ prometheus-retention-time = 0
#
# Example:
# [["chain_id", "cosmoshub-1"]]
global-labels = []
global-labels = [
]

# MetricsSink defines the type of metrics sink to use.
metrics-sink = ""
Expand Down Expand Up @@ -209,10 +210,10 @@ address = "0.0.0.0:8545"
# Address defines the EVM WebSocket server address to bind to.
ws-address = "0.0.0.0:8546"

api = "eth,web3,net,debug,txpool,inj"

# API defines a list of JSON-RPC namespaces that should be enabled
# Example: "eth,txpool,personal,net,debug,web3"
api = "eth,net,web3"

# GasCap sets a cap on gas that can be used in eth_call/estimateGas (0=infinite).
gas-cap = 25000000

Expand Down Expand Up @@ -316,4 +317,4 @@ stop-node-on-err = true
#
# Note, this configuration only applies to SDK built-in app-side mempool
# implementations.
max-txs = 500000
max-txs = 500000
Loading