[C-323] added some general improvements in context of testing memstore#5
[C-323] added some general improvements in context of testing memstore#5
Conversation
📝 WalkthroughWalkthroughThis pull request updates validator configurations and infrastructure for an Injective blockchain network setup. Changes include Git LFS prerequisites in documentation, Docker environment updates, improved error handling in deployment scripts, container naming adjustments, API namespace reductions across validators, peer connectivity configurations, and metadata updates to Git LFS pointers for validator keys and genesis files. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (3)
multival-novote/injective-1/cli/devnetify.sh (1)
5-5: Make compose file path independent of caller working directory.Line 5 is CWD-dependent. Resolving from script location makes this reliable in CI and local runs.
Suggested fix
-COMPOSE_FILE=./injective-1/docker-compose.devnetify.yml +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +COMPOSE_FILE="${SCRIPT_DIR}/../docker-compose.devnetify.yml"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@multival-novote/injective-1/cli/devnetify.sh` at line 5, The COMPOSE_FILE assignment in devnetify.sh is cwd-dependent; change it to compute the path relative to the script location instead of the caller's working directory by resolving the script directory (e.g., using the script's directory via dirname on $0 or BASH_SOURCE) and joining that directory with ./injective-1/docker-compose.devnetify.yml so that the COMPOSE_FILE variable is always set to the compose file next to the script regardless of the current working directory.multival-novote/injective-1/validators/3/config/priv_validator_key.json (1)
2-2: Add explicit test-only key handling guidance for private validator key assets.This pointer change is fine, but keeping a short note in docs about “test-only keys, never production keys” would reduce accidental misuse.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@multival-novote/injective-1/validators/3/config/priv_validator_key.json` at line 2, Add a short, explicit guidance note stating this priv_validator_key.json is a test-only key and must never be used in production; update the documentation and/or the asset's top-level comment or README reference for priv_validator_key.json to include: a clear "test-only keys" warning, recommended replacement procedures for production keys, and a link to key management best practices so consumers cannot accidentally reuse this pointer for production.multival-novote/injective-1/validators/3/config/app.toml (1)
320-320: Consider documenting whymax-txs = 500000is required for this testbed.A short note helps prevent this stress-test tuning from being mistaken as a safe default for other environments.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@multival-novote/injective-1/validators/3/config/app.toml` at line 320, Add a brief explanatory comment or adjacent README entry clarifying that the config key max-txs = 500000 in this testbed is a stress-test tuning (not a production default), why the large value is needed (e.g., to avoid tx throttling during load tests), any observed trade-offs (mem/CPU), and guidance for safe defaults to use in production; update the config around the max-txs setting (and/or add a short note in the repo's testing/config documentation) so future readers see the rationale and recommended alternatives.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@multival-novote/injective-1/validators/2/config/genesis.json`:
- Around line 1-3: Add an ignore for Git LFS pointer JSONs so Biome's JSON
linter skips those invalid-JSON pointers: update biome.json to set vcs.ignore
(or create a .biomeignore) with a glob matching the LFS pointer files (e.g., a
pattern that targets genesis.json files in validator config dirs such as
"**/*/validators/*/config/genesis.json" or a broader "**/*/config/*.json" if
safe), or add a specific "genesis.json" ignore entry; ensure the change
references the Biome config key (vcs.ignore) or the .biomeignore file so Biome
no longer lints those Git LFS pointer files.
In `@multival-novote/injective-888/cli/devnetify.sh`:
- Line 5: COMPOSE_FILE is currently set relative to the caller's CWD which
breaks when the script is invoked from another directory; update devnetify.sh to
compute the script's directory (e.g., using dirname "${BASH_SOURCE[0]}" or $0
via cd/dirname/pwd) and set COMPOSE_FILE to the absolute path under that
directory (pointing to injective-888/docker-compose.devnetify.yml) so the file
is resolved reliably regardless of the caller working directory.
In `@multival-novote/README.md`:
- 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).
---
Nitpick comments:
In `@multival-novote/injective-1/cli/devnetify.sh`:
- Line 5: The COMPOSE_FILE assignment in devnetify.sh is cwd-dependent; change
it to compute the path relative to the script location instead of the caller's
working directory by resolving the script directory (e.g., using the script's
directory via dirname on $0 or BASH_SOURCE) and joining that directory with
./injective-1/docker-compose.devnetify.yml so that the COMPOSE_FILE variable is
always set to the compose file next to the script regardless of the current
working directory.
In `@multival-novote/injective-1/validators/3/config/app.toml`:
- Line 320: Add a brief explanatory comment or adjacent README entry clarifying
that the config key max-txs = 500000 in this testbed is a stress-test tuning
(not a production default), why the large value is needed (e.g., to avoid tx
throttling during load tests), any observed trade-offs (mem/CPU), and guidance
for safe defaults to use in production; update the config around the max-txs
setting (and/or add a short note in the repo's testing/config documentation) so
future readers see the rationale and recommended alternatives.
In `@multival-novote/injective-1/validators/3/config/priv_validator_key.json`:
- Line 2: Add a short, explicit guidance note stating this
priv_validator_key.json is a test-only key and must never be used in production;
update the documentation and/or the asset's top-level comment or README
reference for priv_validator_key.json to include: a clear "test-only keys"
warning, recommended replacement procedures for production keys, and a link to
key management best practices so consumers cannot accidentally reuse this
pointer for production.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (28)
.gitignoremultival-novote/README.mdmultival-novote/injective-1/.envmultival-novote/injective-1/cli/devnetify.shmultival-novote/injective-1/docker-compose.ymlmultival-novote/injective-1/instances/0/accounts.jsonmultival-novote/injective-1/validators/0/config/app.tomlmultival-novote/injective-1/validators/0/config/config.tomlmultival-novote/injective-1/validators/0/config/genesis.jsonmultival-novote/injective-1/validators/0/config/node_key.jsonmultival-novote/injective-1/validators/0/config/priv_validator_key.jsonmultival-novote/injective-1/validators/1/config/app.tomlmultival-novote/injective-1/validators/1/config/config.tomlmultival-novote/injective-1/validators/1/config/genesis.jsonmultival-novote/injective-1/validators/1/config/node_key.jsonmultival-novote/injective-1/validators/1/config/priv_validator_key.jsonmultival-novote/injective-1/validators/2/config/app.tomlmultival-novote/injective-1/validators/2/config/config.tomlmultival-novote/injective-1/validators/2/config/genesis.jsonmultival-novote/injective-1/validators/2/config/node_key.jsonmultival-novote/injective-1/validators/2/config/priv_validator_key.jsonmultival-novote/injective-1/validators/3/config/app.tomlmultival-novote/injective-1/validators/3/config/config.tomlmultival-novote/injective-1/validators/3/config/genesis.jsonmultival-novote/injective-1/validators/3/config/node_key.jsonmultival-novote/injective-1/validators/3/config/priv_validator_key.jsonmultival-novote/injective-1/validators/ids.jsonmultival-novote/injective-888/cli/devnetify.sh
| version https://git-lfs.github.com/spec/v1 | ||
| oid sha256:fcf3f1f4c1a127d136948ec01bfaa5a891429352f0b98577572a1bf4f4e2fa7c | ||
| size 29442 | ||
| oid sha256:8c8bda492d7cafbda5f26bf6535a844e19b3a9067f77fcaacafca70bc1e97d98 | ||
| size 29801 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# 1) Locate Biome config files.
echo "=== Searching for Biome config files ==="
fd -HI 'biome.json' .
fd -HI 'biome.jsonc' .
# 2) List JSON files that are actually Git LFS pointers.
echo "=== Searching for Git LFS pointer JSON files ==="
rg -n '^version https://git-lfs.github.com/spec/v1$' -g '**/*.json'
# 3) Inspect package scripts invoking biome.
echo "=== Searching for Biome scripts in package.json ==="
fd -HI 'package.json' . -x rg -n '"(lint|check|biome)[^"]*"' {}Repository: InjectiveLabs/devnetify-testbed
Length of output: 6285
🏁 Script executed:
cat -n ./biome.jsonRepository: InjectiveLabs/devnetify-testbed
Length of output: 2360
Configure Biome to exclude Git LFS pointer JSON files from linting.
The file multival-novote/injective-1/validators/2/config/genesis.json is a Git LFS pointer (55+ such files exist in the repository). These contain valid Git LFS format but invalid JSON syntax. Add an ignore pattern to biome.json to prevent Biome's JSON linter from processing them, such as using .biomeignore or configuring vcs.ignore in the Biome config.
🧰 Tools
🪛 Biome (2.4.4)
[error] 1-1: String values must be double quoted.
(parse)
[error] 1-1: String values must be double quoted.
(parse)
[error] 1-2: End of file expected
(parse)
[error] 2-2: End of file expected
(parse)
[error] 2-2: String values must be double quoted.
(parse)
[error] 3-3: String values must be double quoted.
(parse)
[error] 3-3: End of file expected
(parse)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@multival-novote/injective-1/validators/2/config/genesis.json` around lines 1
- 3, Add an ignore for Git LFS pointer JSONs so Biome's JSON linter skips those
invalid-JSON pointers: update biome.json to set vcs.ignore (or create a
.biomeignore) with a glob matching the LFS pointer files (e.g., a pattern that
targets genesis.json files in validator config dirs such as
"**/*/validators/*/config/genesis.json" or a broader "**/*/config/*.json" if
safe), or add a specific "genesis.json" ignore entry; ensure the change
references the Biome config key (vcs.ignore) or the .biomeignore file so Biome
no longer lints those Git LFS pointer files.
| docker compose -f ./injective-888/docker-compose.devnetify.yml down | ||
| set -uo pipefail | ||
|
|
||
| COMPOSE_FILE=./injective-888/docker-compose.devnetify.yml |
There was a problem hiding this comment.
Make COMPOSE_FILE independent of caller working directory.
COMPOSE_FILE=./injective-888/... is resolved from the current shell directory, so invoking this script from another location can break file resolution.
Suggested fix
+SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
-COMPOSE_FILE=./injective-888/docker-compose.devnetify.yml
+COMPOSE_FILE="${SCRIPT_DIR}/../docker-compose.devnetify.yml"📝 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.
| COMPOSE_FILE=./injective-888/docker-compose.devnetify.yml | |
| SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" | |
| COMPOSE_FILE="${SCRIPT_DIR}/../docker-compose.devnetify.yml" |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@multival-novote/injective-888/cli/devnetify.sh` at line 5, COMPOSE_FILE is
currently set relative to the caller's CWD which breaks when the script is
invoked from another directory; update devnetify.sh to compute the script's
directory (e.g., using dirname "${BASH_SOURCE[0]}" or $0 via cd/dirname/pwd) and
set COMPOSE_FILE to the absolute path under that directory (pointing to
injective-888/docker-compose.devnetify.yml) so the file is resolved reliably
regardless of the caller working directory.
|
|
||
| ```bash | ||
| git lfs install | ||
| git clone https://github.com/InjectiveLabs/injective-devnetify-testbed |
There was a problem hiding this comment.
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.
| 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).
Summary by CodeRabbit
Documentation
Chores