-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: improve localnet scripts and containers #127
Conversation
WalkthroughThis update delivers significant enhancements to the testnet scripts, focusing on streamlined automation and seamless integration with smart contracts and essential applications. Updates span across key areas, including shell script adjustments, function additions, parameter modifications, and new documentation. These changes collectively optimize the setup and utilization of the testnet environment for effective testing and deployment of blockchain smart contracts. Changes
Sequence DiagramsSmart Contract Deployment FlowsequenceDiagram
participant Developer
participant Testnet
participant Osmosis
participant Celestia
Developer->>Testnet: Run init-stake-contract.sh
Testnet->>Osmosis: Store Contract
Osmosis->>Testnet: Contract Stored
Testnet->>Celestia: Store Contract
Celestia->>Testnet: Contract Stored
Developer->>Testnet: Initialize Contracts
Testnet->>Osmosis: Initialize Staking Contract
Osmosis->>Testnet: Contract Initialized
Testnet->>Celestia: Initialize Oracle Contract
Celestia->>Testnet: Contract Initialized
Developer->>Testnet: Contract Deployment Successful
Account Funding and Permissions SetupsequenceDiagram
participant Admin
participant Testnet
participant Osmosis
participant Celestia
Admin->>Testnet: Run fund-accounts.sh
Testnet->>Osmosis: Create and Fund Accounts
Osmosis->>Testnet: Accounts Created and Funded
Testnet->>Celestia: Create and Fund Accounts
Celestia->>Testnet: Accounts Created and Funded
Testnet->>Osmosis: Set Up Permissions and Fee Grants
Osmosis->>Testnet: Permissions Set
Testnet->>Celestia: Set Up Permissions and Fee Grants
Celestia->>Testnet: Permissions Set
Admin->>Testnet: Account Setup Complete
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 25
Outside diff range and nitpick comments (1)
scripts/testnet/Local-Testnet.md (1)
17-22
: Clarify documentation regarding account roles and permissions.Consider expanding on the roles and permissions associated with each account to provide better clarity and help users understand the setup more intuitively.
Tools
LanguageTool
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operate the stake...
[misspelling] ~21-~21: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...account that operate the staker account trough thex/authz
module (grantee). - `cele...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...Markdownlint
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (25)
- scripts/testnet/.dockerignore (1 hunks)
- scripts/testnet/Dockerfile (2 hunks)
- scripts/testnet/Dockerfile.fast (2 hunks)
- scripts/testnet/Local-Testnet.md (1 hunks)
- scripts/testnet/bins/.gitignore (1 hunks)
- scripts/testnet/bins/celestia-appd (1 hunks)
- scripts/testnet/bins/download.sh (1 hunks)
- scripts/testnet/bins/hermes (1 hunks)
- scripts/testnet/bins/osmosisd (1 hunks)
- scripts/testnet/bins/wrapper.sh (1 hunks)
- scripts/testnet/fund-accounts.sh (1 hunks)
- scripts/testnet/hermes-config.toml (2 hunks)
- scripts/testnet/init-stake-contract.sh (1 hunks)
- scripts/testnet/local-celestia-testnet-multi-continue.sh (2 hunks)
- scripts/testnet/local-celestia-testnet-multi-new.sh (4 hunks)
- scripts/testnet/local-hermes-clear-packets.sh (1 hunks)
- scripts/testnet/local-hermes-continue.sh (1 hunks)
- scripts/testnet/local-hermes-new.sh (3 hunks)
- scripts/testnet/local-osmosis-testnet-continue.sh (1 hunks)
- scripts/testnet/local-osmosis-testnet-new.sh (4 hunks)
- scripts/testnet/params.sh (1 hunks)
- scripts/testnet/tia-osmo-pool.sh (1 hunks)
- scripts/testnet/utils/configure-localnet.sh (1 hunks)
- scripts/testnet/utils/import-accounts-keys.sh (1 hunks)
- scripts/testnet/utils/tx.sh (1 hunks)
Files not summarized due to errors (5)
- scripts/testnet/bins/wrapper.sh: Error: Server error. Please try again later.
- scripts/testnet/tia-osmo-pool.sh: Error: Server error. Please try again later.
- scripts/testnet/local-celestia-testnet-multi-continue.sh: Error: Server error. Please try again later.
- scripts/testnet/params.sh: Error: Server error. Please try again later.
- scripts/testnet/utils/configure-localnet.sh: Error: Server error. Please try again later.
Files skipped from review due to trivial changes (8)
- scripts/testnet/.dockerignore
- scripts/testnet/bins/.gitignore
- scripts/testnet/bins/osmosisd
- scripts/testnet/fund-accounts.sh
- scripts/testnet/hermes-config.toml
- scripts/testnet/local-hermes-clear-packets.sh
- scripts/testnet/local-hermes-continue.sh
- scripts/testnet/local-osmosis-testnet-continue.sh
Additional context used
Shellcheck
scripts/testnet/bins/wrapper.sh
[error] 19-19: Double quote array expansions to avoid re-splitting elements. (SC2068)
scripts/testnet/params.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. (SC2148)
[warning] 6-6: OSMOSIS_TX_PARAMS appears unused. Verify use (or export if used externally). (SC2034)
[warning] 11-11: CELESTIA_TX_PARAMS appears unused. Verify use (or export if used externally). (SC2034)
[warning] 15-15: TESTNET_MNEMONIC appears unused. Verify use (or export if used externally). (SC2034)
[warning] 18-18: OSMOSIS_ACCOUNT appears unused. Verify use (or export if used externally). (SC2034)
[warning] 19-19: OSMOSIS_TRADER appears unused. Verify use (or export if used externally). (SC2034)
[warning] 20-20: OSMOSIS_TRADER_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 23-23: CELESTIA_STAKER appears unused. Verify use (or export if used externally). (SC2034)
[warning] 24-24: CELESTIA_STAKER_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 25-25: CELESTIA_GRANTEE appears unused. Verify use (or export if used externally). (SC2034)
[warning] 26-26: CELESTIA_GRANTEE_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 27-27: CELESTIA_REWARDS_COLLECTOR appears unused. Verify use (or export if used externally). (SC2034)
[warning] 28-28: CELESTIA_REWARDS_COLLECTOR_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
scripts/testnet/utils/tx.sh
[warning] 14-14: Declare and assign separately to avoid masking return values. (SC2155)
[warning] 19-19: Declare and assign separately to avoid masking return values. (SC2155)
[warning] 44-44: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. (SC2124)
[warning] 49-49: Declare and assign separately to avoid masking return values. (SC2155)
scripts/testnet/local-osmosis-testnet-new.sh
[warning] 30-30: Quote this to prevent word splitting. (SC2046)
scripts/testnet/bins/download.sh
[warning] 11-11: SCRIPT_NAME appears unused. Verify use (or export if used externally). (SC2034)
scripts/testnet/init-stake-contract.sh
[warning] 24-24: Quote this to prevent word splitting. (SC2046)
[warning] 37-37: Quote this to prevent word splitting. (SC2046)
[warning] 45-45: VALIDATORS appears unused. Verify use (or export if used externally). (SC2034)
[warning] 47-47: CELESTIA_VALIDATOR_2 appears unused. Verify use (or export if used externally). (SC2034)
[warning] 48-48: CELESTIA_VALIDATOR_3 appears unused. Verify use (or export if used externally). (SC2034)
[warning] 76-76: Brace expansions and globs are literal in assignments. Quote it or use an array. (SC2125)
[warning] 80-80: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 80-80: Brace expansions and globs are literal in assignments. Quote it or use an array. (SC2125)
[warning] 80-80: Quotes/backslashes will be treated literally. Use an array. (SC2089)
[warning] 80-80: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 80-80: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 80-80: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 81-81: Quotes/backslashes in this variable will not be respected. (SC2090)
[warning] 85-85: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 85-85: Quotes/backslashes will be treated literally. Use an array. (SC2089)
[warning] 85-85: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 86-86: Quotes/backslashes in this variable will not be respected. (SC2090)
[warning] 90-90: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 90-90: Quotes/backslashes will be treated literally. Use an array. (SC2089)
[warning] 90-90: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 90-90: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 90-90: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 91-91: Quotes/backslashes in this variable will not be respected. (SC2090)
scripts/testnet/local-celestia-testnet-multi-new.sh
[warning] 43-43: Quote this to prevent word splitting. (SC2046)
Hadolint
scripts/testnet/Dockerfile.fast
[warning] 1-1: Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag (DL3007)
[warning] 3-3: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 3-3: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[info] 3-3: Delete the apt-get lists after installing something (DL3009)
[info] 26-26: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 28-28: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 31-31: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[warning] 41-41: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025)
scripts/testnet/Dockerfile
[warning] 1-1: Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag (DL3007)
[warning] 4-4: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 4-4: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[info] 4-4: Delete the apt-get lists after installing something (DL3009)
[info] 27-27: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 28-28: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[warning] 44-44: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025)
LanguageTool
scripts/testnet/Local-Testnet.md
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operate the stake...
[misspelling] ~21-~21: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...account that operate the staker account trough thex/authz
module (grantee). - `cele...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...
[misspelling] ~26-~26: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...unt can be imported into a test keyring trough theutils/import-accounts-keys.sh
scr...
[uncategorized] ~56-~56: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...aries are available in thebins
folder and they will be lazy downloaded on first u...
[uncategorized] ~106-~106: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2)
Context: .... - This enables Tx indexing in Celestia so tooling can confirm transactions done o...
[duplication] ~110-~110: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ... the relayer on Celestia side and store in in a file celestia-relayer-key.json ``` c...
[duplication] ~116-~116: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...r the relayer on Osmosis side and store in in a file osmosis-relayer-key.json ``` os...
[uncategorized] ~153-~153: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...er --b-port transferStart Hermes (subsequently you only need to run this command)
...
[grammar] ~161-~161: It seems that a verb or a comma is missing. (MD_DT_JJ)
Context: ...rt ``` ### Check Validator output You can the output of the validators with Tmux ...
Markdownlint
scripts/testnet/Local-Testnet.md
39-39: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
41-41: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
45-45: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
51-51: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
55-55: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
7-7: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
13-13: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
62-62: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
72-72: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
98-98: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
112-112: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
118-118: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
124-124: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
131-131: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
139-139: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
146-146: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
155-155: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
163-163: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
175-175: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
Additional comments not posted (15)
scripts/testnet/utils/configure-localnet.sh (1)
10-14
: Ensure that the configuration settings for bothosmosisd
andcelestia-appd
are aligned with the new system requirements mentioned in the PR description.Also applies to: 17-19
Verification successful
The search results confirm that the configuration settings for both
osmosisd
andcelestia-appd
are present in thescripts/testnet/utils/configure-localnet.sh
file. The settings includechain-id
,gas
,gas-adjustment
,gas-prices
, andkeyring-backend
, which align with the system requirements.
scripts/testnet/utils/configure-localnet.sh
:
osmosisd config chain-id $OSMOSIS_CHAIN_ID
osmosisd config gas auto
osmosisd config gas-adjustment $OSMOSIS_GAS_ADJUSTMENT
osmosisd config gas-prices $OSMOSIS_GAS_PRICE
osmosisd config 'keyring-backend' test
celestia-appd config chain-id $CELESTIA_CHAIN_ID
celestia-appd config 'keyring-backend' test
This confirms that the configuration settings are correctly applied in the testnet environments.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that the new configuration settings are correctly applied in testnet environments. # Test: Check the configuration files for osmosisd and celestia-appd. fd --type f "config.toml" --exec grep -H "chain-id" {}Length of output: 54
Script:
#!/bin/bash # Find and verify configuration settings for osmosisd and celestia-appd in all relevant files. # Search for configuration files related to osmosisd and celestia-appd. osmosis_config_files=$(fd --type f --glob '*osmosis*config*') celestia_config_files=$(fd --type f --glob '*celestia*config*') # Check the contents of these configuration files for the relevant settings. for file in $osmosis_config_files $celestia_config_files; do echo "Checking file: $file" grep -H "chain-id" "$file" grep -H "gas" "$file" grep -H "gas-adjustment" "$file" grep -H "gas-prices" "$file" grep -H "keyring-backend" "$file" doneLength of output: 131
Script:
#!/bin/bash # Broad search for any configuration files and verify their contents for osmosisd and celestia-appd settings. # Search for any files containing "config" in their name. config_files=$(fd --type f --glob '*config*') # Check the contents of these configuration files for the relevant settings. for file in $config_files; do echo "Checking file: $file" grep -H "chain-id" "$file" grep -H "gas" "$file" grep -H "gas-adjustment" "$file" grep -H "gas-prices" "$file" grep -H "keyring-backend" "$file" doneLength of output: 2897
scripts/testnet/local-celestia-testnet-multi-continue.sh (1)
Line range hint
1-24
: Check that the use oftmux
and the configuration of multiple validators align with the intended testnet setup and requirements.scripts/testnet/utils/import-accounts-keys.sh (1)
7-13
: Ensure that sensitive information such as mnemonics is handled securely and not exposed in logs or terminal history.Verification successful
Sensitive information such as mnemonics is not exposed in logs or terminal history.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that mnemonics are not stored in logs or visible in process lists. # Test: Check bash history and process lists for mnemonic exposure. history | grep "TESTNET_MNEMONIC" ps aux | grep "TESTNET_MNEMONIC"Length of output: 136
Script:
#!/bin/bash # Ensure the ps command is available and check for mnemonic exposure. # Check bash history for mnemonic exposure. history | grep "TESTNET_MNEMONIC" # Check running processes for mnemonic exposure. command -v ps >/dev/null 2>&1 && ps aux | grep "TESTNET_MNEMONIC"Length of output: 49
scripts/testnet/local-osmosis-testnet-new.sh (2)
20-21
: Good use of temporary files inupdate_genesis
function to prevent data corruption.
5-7
: Ensure that the PATH modification does not unintentionally shadow system binaries, which could lead to security issues.Verification successful
The directory
//bins
does not exist, so there is no risk of shadowing system binaries with the current PATH modification.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if PATH modification shadows system binaries. echo $PATHLength of output: 128
Script:
#!/bin/bash # Simulate the environment after PATH modification in local-osmosis-testnet-new.sh SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) BINS_DIR=$SCRIPT_DIR/bins MODIFIED_PATH=$BINS_DIR:$PATH # Check if PATH modification shadows system binaries. echo $MODIFIED_PATHLength of output: 331
Script:
#!/bin/bash # Check if the //bins directory exists and list its contents BINS_DIR=//bins if [ -d "$BINS_DIR" ]; then echo "Contents of $BINS_DIR:" ls -l $BINS_DIR else echo "$BINS_DIR does not exist." fiLength of output: 92
scripts/testnet/bins/download.sh (3)
26-40
: The download functions forcelestia-appd
andhermes
are well-implemented.Also applies to: 42-55
57-66
: Theensure_installed
function is robust and correctly handles the installation of binaries.
11-11
: SCRIPT_NAME appears unused. Verify its use or consider removing it if it's not needed.Verification successful
SCRIPT_NAME is used in
scripts/testnet/bins/wrapper.sh
, so it should not be removed fromscripts/testnet/bins/download.sh
.
scripts/testnet/bins/wrapper.sh:ensure_installed $SCRIPT_NAME
scripts/testnet/bins/wrapper.sh:$BINS_DIR/$SCRIPT_NAME $@
scripts/testnet/bins/download.sh:SCRIPT_NAME=$(basename -- "$0")
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the use of SCRIPT_NAME in the repository. rg --type bash "SCRIPT_NAME"Length of output: 57
Script:
#!/bin/bash # Description: Verify the use of SCRIPT_NAME in the repository. rg "SCRIPT_NAME" --glob "*.sh"Length of output: 215
Tools
Shellcheck
[warning] 11-11: SCRIPT_NAME appears unused. Verify use (or export if used externally). (SC2034)
scripts/testnet/bins/celestia-appd (1)
50-61
: Consider handling potential failures in thedownload_hermes
function.
[REFACTOR_SUGGESTion]wget -q -O "$BINS_DIR/hermes.zip" $download_url && unzip -j "$BINS_DIR/hermes.zip" "hermes" -d "$BINS_DIR" && rm "$BINS_DIR/hermes.zip" chmod +x "$BINS_DIR/hermes"This modification ensures that the script does not proceed if there is a failure at any step of downloading, extracting, or cleaning up the Hermes binary.
scripts/testnet/local-celestia-testnet-multi-new.sh (6)
3-5
: Ensure thePATH
is correctly set to include the local binaries.
10-10
: Including utility functions fromtx.sh
enhances modularity.
35-39
: Consider setting a default value forUNBONDING_TIME
in the script to avoid reliance on external environment setup.
[REFACTOR_SUGGESTion]- if [ -z "$UNBONDING_TIME" ]; then + UNBONDING_TIME=${UNBONDING_TIME:-"504 hours"} # Default to 21 days + if [ "$UNBONDING_TIME" = "504 hours" ]; then
90-116
: The script uses a series oftmux
sessions to manage multiple validator nodes. Ensure that each tmux session is correctly configured and that the script handles potential errors or existing sessions.
30-31
: The functionupdate_genesis
usesjq
to modify the genesis file. Ensure that thejq
command is correctly formatted and tested.Verification successful
The test output indicates that the
jq
command is attempting to modify a non-existentapp_id
object instead of the existingapp_state
object. This suggests an error in thejq
command syntax. To verify the correct behavior, we need to adjust thejq
command to target the correct path within the JSON structure.Let's update the
jq
command to correctly modify theunbonding_time
within theapp_state
object and test it again.
The corrected
jq
command successfully modifies theunbonding_time
within theapp_state
object as intended. This confirms that thejq
command in theupdate_genesis
function is correctly formatted and works as expected.
- Line 30-31: The
jq
command in theupdate_genesis
function is correctly formatted and tested.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the `jq` command in the `update_genesis` function for correct syntax and expected behavior. # Test: Run the `jq` command with a dummy input and check output. echo '{"app_state": {"staking": {"params": {"unbonding_time": "21 days"}}}}' | jq '.app_id["staking"]["params"]["unbonding_time"]="\"test\""'Length of output: 358
Script:
#!/bin/bash # Description: Verify the corrected `jq` command in the `update_genesis` function for correct syntax and expected behavior. # Test: Run the corrected `jq` command with a dummy input and check output. echo '{"app_state": {"staking": {"params": {"unbonding_time": "21 days"}}}}' | jq '.app_state.staking.params.unbonding_time = "test"'Length of output: 242
99-114
: Ensure that the transaction commands are correctly formatted and tested. Particularly check the network addresses and transaction parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 11
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (25)
- scripts/testnet/.dockerignore (1 hunks)
- scripts/testnet/Dockerfile (2 hunks)
- scripts/testnet/Dockerfile.fast (2 hunks)
- scripts/testnet/Local-Testnet.md (1 hunks)
- scripts/testnet/bins/.gitignore (1 hunks)
- scripts/testnet/bins/celestia-appd (1 hunks)
- scripts/testnet/bins/download.sh (1 hunks)
- scripts/testnet/bins/hermes (1 hunks)
- scripts/testnet/bins/osmosisd (1 hunks)
- scripts/testnet/bins/wrapper.sh (1 hunks)
- scripts/testnet/fund-accounts.sh (1 hunks)
- scripts/testnet/hermes-config.toml (2 hunks)
- scripts/testnet/init-stake-contract.sh (1 hunks)
- scripts/testnet/local-celestia-testnet-multi-continue.sh (2 hunks)
- scripts/testnet/local-celestia-testnet-multi-new.sh (4 hunks)
- scripts/testnet/local-hermes-clear-packets.sh (1 hunks)
- scripts/testnet/local-hermes-continue.sh (1 hunks)
- scripts/testnet/local-hermes-new.sh (3 hunks)
- scripts/testnet/local-osmosis-testnet-continue.sh (1 hunks)
- scripts/testnet/local-osmosis-testnet-new.sh (4 hunks)
- scripts/testnet/params.sh (1 hunks)
- scripts/testnet/tia-osmo-pool.sh (1 hunks)
- scripts/testnet/utils/configure-localnet.sh (1 hunks)
- scripts/testnet/utils/import-accounts-keys.sh (1 hunks)
- scripts/testnet/utils/tx.sh (1 hunks)
Files skipped from review due to trivial changes (9)
- scripts/testnet/.dockerignore
- scripts/testnet/bins/.gitignore
- scripts/testnet/bins/hermes
- scripts/testnet/local-celestia-testnet-multi-continue.sh
- scripts/testnet/local-hermes-clear-packets.sh
- scripts/testnet/local-hermes-continue.sh
- scripts/testnet/local-osmosis-testnet-continue.sh
- scripts/testnet/utils/configure-localnet.sh
- scripts/testnet/utils/import-accounts-keys.sh
Additional context used
Shellcheck
scripts/testnet/bins/wrapper.sh
[error] 19-19: Double quote array expansions to avoid re-splitting elements. (SC2068)
scripts/testnet/params.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. (SC2148)
[warning] 6-6: OSMOSIS_TX_PARAMS appears unused. Verify use (or export if used externally). (SC2034)
[warning] 11-11: CELESTIA_TX_PARAMS appears unused. Verify use (or export if used externally). (SC2034)
[warning] 15-15: TESTNET_MNEMONIC appears unused. Verify use (or export if used externally). (SC2034)
[warning] 18-18: OSMOSIS_ACCOUNT appears unused. Verify use (or export if used externally). (SC2034)
[warning] 19-19: OSMOSIS_TRADER appears unused. Verify use (or export if used externally). (SC2034)
[warning] 20-20: OSMOSIS_TRADER_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 23-23: CELESTIA_STAKER appears unused. Verify use (or export if used externally). (SC2034)
[warning] 24-24: CELESTIA_STAKER_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 25-25: CELESTIA_GRANTEE appears unused. Verify use (or export if used externally). (SC2034)
[warning] 26-26: CELESTIA_GRANTEE_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 27-27: CELESTIA_REWARDS_COLLECTOR appears unused. Verify use (or export if used externally). (SC2034)
[warning] 28-28: CELESTIA_REWARDS_COLLECTOR_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
scripts/testnet/utils/tx.sh
[warning] 14-14: Declare and assign separately to avoid masking return values. (SC2155)
[warning] 19-19: Declare and assign separately to avoid masking return values. (SC2155)
[warning] 44-44: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. (SC2124)
[warning] 49-49: Declare and assign separately to avoid masking return values. (SC2155)
scripts/testnet/local-osmosis-testnet-new.sh
[warning] 30-30: Quote this to prevent word splitting. (SC2046)
scripts/testnet/bins/download.sh
[warning] 11-11: SCRIPT_NAME appears unused. Verify use (or export if used externally). (SC2034)
scripts/testnet/init-stake-contract.sh
[warning] 24-24: Quote this to prevent word splitting. (SC2046)
[warning] 37-37: Quote this to prevent word splitting. (SC2046)
[warning] 45-45: VALIDATORS appears unused. Verify use (or export if used externally). (SC2034)
[warning] 47-47: CELESTIA_VALIDATOR_2 appears unused. Verify use (or export if used externally). (SC2034)
[warning] 48-48: CELESTIA_VALIDATOR_3 appears unused. Verify use (or export if used externally). (SC2034)
[warning] 76-76: Brace expansions and globs are literal in assignments. Quote it or use an array. (SC2125)
[warning] 80-80: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 80-80: Brace expansions and globs are literal in assignments. Quote it or use an array. (SC2125)
[warning] 80-80: Quotes/backslashes will be treated literally. Use an array. (SC2089)
[warning] 80-80: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 80-80: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 80-80: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 81-81: Quotes/backslashes in this variable will not be respected. (SC2090)
[warning] 85-85: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 85-85: Quotes/backslashes will be treated literally. Use an array. (SC2089)
[warning] 85-85: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 86-86: Quotes/backslashes in this variable will not be respected. (SC2090)
[warning] 90-90: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 90-90: Quotes/backslashes will be treated literally. Use an array. (SC2089)
[warning] 90-90: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 90-90: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 90-90: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 91-91: Quotes/backslashes in this variable will not be respected. (SC2090)
scripts/testnet/local-celestia-testnet-multi-new.sh
[warning] 43-43: Quote this to prevent word splitting. (SC2046)
Hadolint
scripts/testnet/Dockerfile.fast
[warning] 1-1: Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag (DL3007)
[warning] 3-3: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 3-3: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[info] 3-3: Delete the apt-get lists after installing something (DL3009)
[info] 26-26: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 28-28: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 31-31: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[warning] 41-41: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025)
scripts/testnet/Dockerfile
[warning] 1-1: Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag (DL3007)
[warning] 4-4: Pin versions in apt get install. Instead of
apt-get install <package>
useapt-get install <package>=<version>
(DL3008)
[info] 4-4: Avoid additional packages by specifying
--no-install-recommends
(DL3015)
[info] 4-4: Delete the apt-get lists after installing something (DL3009)
[info] 27-27: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[info] 28-28: Multiple consecutive
RUN
instructions. Consider consolidation. (DL3059)
[warning] 44-44: Use arguments JSON notation for CMD and ENTRYPOINT arguments (DL3025)
LanguageTool
scripts/testnet/Local-Testnet.md
[uncategorized] ~17-~17: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ... docker.io/library/mw-testnet ``` Upon creation the following accounts will be funded: ...
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operate the stake...
[misspelling] ~21-~21: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...account that operate the staker account trough thex/authz
module (grantee). - `cele...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...
[misspelling] ~26-~26: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...unt can be imported into a test keyring trough theutils/import-accounts-keys.sh
scr...
[uncategorized] ~56-~56: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...aries are available in thebins
folder and they will be lazy downloaded on first u...
[uncategorized] ~106-~106: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2)
Context: .... - This enables Tx indexing in Celestia so tooling can confirm transactions done o...
[duplication] ~110-~110: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ... the relayer on Celestia side and store in in a file celestia-relayer-key.json ``` c...
[duplication] ~116-~116: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...r the relayer on Osmosis side and store in in a file osmosis-relayer-key.json ``` os...
[uncategorized] ~153-~153: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...er --b-port transferStart Hermes (subsequently you only need to run this command)
...
[grammar] ~161-~161: It seems that a verb or a comma is missing. (MD_DT_JJ)
Context: ...rt ``` ### Check Validator output You can the output of the validators with Tmux ...
Markdownlint
scripts/testnet/Local-Testnet.md
39-39: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
41-41: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
45-45: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
51-51: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
55-55: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
7-7: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
13-13: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
62-62: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
72-72: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
98-98: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
112-112: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
118-118: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
124-124: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
131-131: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
139-139: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
146-146: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
155-155: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
163-163: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
175-175: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
Additional comments not posted (32)
scripts/testnet/bins/celestia-appd (1)
1-19
: Great use of a wrapper script to manage application execution dynamically based on the script's filename. This approach simplifies the management of different applications in the testnet environment.scripts/testnet/bins/osmosisd (1)
1-19
: The script structure forosmosisd
mirrors that ofcelestia-appd
, maintaining consistency across different application wrappers. This consistency is crucial for maintainability and scalability of the testnet scripts.scripts/testnet/params.sh (2)
1-28
: Excellent setup of centralized configuration parameters for Osmosis and Celestia nodes. This centralization will ease the management and modification of these parameters across scripts.Tools
Shellcheck
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. (SC2148)
[warning] 6-6: OSMOSIS_TX_PARAMS appears unused. Verify use (or export if used externally). (SC2034)
[warning] 11-11: CELESTIA_TX_PARAMS appears unused. Verify use (or export if used externally). (SC2034)
[warning] 15-15: TESTNET_MNEMONIC appears unused. Verify use (or export if used externally). (SC2034)
[warning] 18-18: OSMOSIS_ACCOUNT appears unused. Verify use (or export if used externally). (SC2034)
[warning] 19-19: OSMOSIS_TRADER appears unused. Verify use (or export if used externally). (SC2034)
[warning] 20-20: OSMOSIS_TRADER_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 23-23: CELESTIA_STAKER appears unused. Verify use (or export if used externally). (SC2034)
[warning] 24-24: CELESTIA_STAKER_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 25-25: CELESTIA_GRANTEE appears unused. Verify use (or export if used externally). (SC2034)
[warning] 26-26: CELESTIA_GRANTEE_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 27-27: CELESTIA_REWARDS_COLLECTOR appears unused. Verify use (or export if used externally). (SC2034)
[warning] 28-28: CELESTIA_REWARDS_COLLECTOR_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
1-1
: There are several unused variables which might be intended for external use. If these are indeed used externally, consider exporting them to ensure they are accessible as intended.This script will help verify whether the defined variables are used in other scripts within the project, or if they need to be exported to be accessible.
Also applies to: 6-28
Tools
Shellcheck
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. (SC2148)
scripts/testnet/utils/tx.sh (1)
3-4
: Ensure theparams.sh
script is robust and error-free.Verification successful
The
params.sh
script appears to be robust and error-free, as indicated by the successful syntax check and the absence of any obvious issues in its contents.
- The script contains configuration parameters for Osmosis and Celestia, as well as account information.
- No syntax errors were detected.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the contents and robustness of `params.sh`. # Test: Search for potential issues in `params.sh`. rg --type bash $'source .*params.sh' --files-with-matchesLength of output: 87
Script:
#!/bin/bash # Description: Verify the contents and robustness of `params.sh`. # Test: Search for potential issues in `params.sh`. rg --type sh $'source .*params.sh' --files-with-matchesLength of output: 279
Script:
#!/bin/bash # Description: Inspect the contents of `params.sh` for potential issues. # Locate the `params.sh` file params_file=$(fd params.sh) # Display the contents of `params.sh` echo "Contents of $params_file:" cat "$params_file" # Perform a syntax check on `params.sh` echo "Syntax check of $params_file:" bash -n "$params_file"Length of output: 1576
scripts/testnet/Dockerfile.fast (1)
21-24
: Ensure thedownload.sh
script is robust and handles errors gracefully.scripts/testnet/hermes-config.toml (1)
48-48
: Updatehermes-config.toml
to reflect the changes in Hermes compatibility mode accurately.This change aligns with the updated versions of the binaries and ensures compatibility.
Also applies to: 76-76
scripts/testnet/local-osmosis-testnet-new.sh (2)
5-7
: Ensure that the PATH is correctly set to include the binaries.
40-40
: Good job confirming the status of the Osmosis validator after setup.scripts/testnet/tia-osmo-pool.sh (2)
14-16
: Ensure that the transaction parameters are correctly passed and that error handling is robust for network operations.
35-37
: Ensure the transaction parameters are correctly formatted and that the script properly handles the response.Verification successful
The
wait_tx
function captures the entire command, extracts the binary name, and retrieves the transaction hash. It then callswait_osmossis_tx
orwait_celestia_tx
based on the binary name. Both of these functions callwait_tx_included
, which handles the transaction response by querying the transaction status and checking the result.The transaction parameters in the script are correctly formatted, and the script properly handles the response by querying the transaction status and checking for success or failure.
scripts/testnet/tia-osmo-pool.sh
lines 35-37: The transaction parameters are correctly formatted and the script properly handles the response.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify the correct formatting and handling of transaction responses. ast-grep --lang bash --pattern $'wait_tx($_, $_, $_, $_, $_, $_, $_)'Length of output: 179
Script:
#!/bin/bash # Search for the `wait_tx` function calls in the bash script to verify the correct formatting and handling of transaction responses. rg 'wait_tx' scripts/testnet/tia-osmo-pool.shLength of output: 221
Script:
#!/bin/bash # Search for the implementation of the `wait_tx` function to verify the correct formatting and handling of transaction responses. rg 'function wait_tx' .Length of output: 136
Script:
#!/bin/bash # Display the implementation of the `wait_tx` function to verify the correct formatting and handling of transaction responses. rg 'function wait_tx' -A 20 scripts/testnet/utils/tx.shLength of output: 1034
Script:
#!/bin/bash # Search for the implementations of the `wait_osmossis_tx` and `wait_celestia_tx` functions to verify the handling of transaction responses. rg 'function wait_osmossis_tx' -A 20 scripts/testnet/utils/tx.sh rg 'function wait_celestia_tx' -A 20 scripts/testnet/utils/tx.shLength of output: 1190
scripts/testnet/local-hermes-new.sh (2)
20-21
: Ensure that the key generation commands are correctly capturing errors and that the keys are securely stored.Verification successful
The key generation commands in
local-hermes-new.sh
are correctly capturing errors and storing the keys securely in JSON files.
celestia-appd keys add relayer --output=json --keyring-backend test 2>./celestia-relayer-key.json
osmosisd keys add relayer --output=json --keyring-backend test 2>./osmosis-relayer-key.json
Both commands redirect errors to respective JSON files, ensuring proper error handling.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify secure storage and error handling for key generation. ast-grep --lang bash --pattern $'keys add($_, $_, $_, $_, $_, $_)'Length of output: 176
Script:
#!/bin/bash # Extract relevant lines from local-hermes-new.sh and verify error handling and secure storage of keys. # Extract the relevant lines rg 'keys add relayer --output=json --keyring-backend test' scripts/testnet/local-hermes-new.sh # Check for error handling rg '2>' scripts/testnet/local-hermes-new.shLength of output: 522
26-28
: The transaction command should correctly handle fees and ensure that the transaction does not fail due to incorrect fee configuration.scripts/testnet/bins/download.sh (1)
14-24
: The functiondownload_osmosisd
is well-implemented with good use of conditional logic to handle versioning. Ensure that download errors are handled gracefully.scripts/testnet/fund-accounts.sh (5)
1-1
: Ensure the shebang line is correct and intended for this script usage.
3-9
: Ensure that theSCRIPT_DIR
andBINS_DIR
are correctly set and used throughout the script. Adding bins to the path is a common practice but be cautious of potential security implications if not properly managed.
41-65
: The script handles account initialization and permissions setting well. The usage ofwait_tx
for blockchain transactions ensures that the script waits for confirmation before proceeding, which is crucial for dependent operations.
67-73
: The fee grant logic is particularly important for transaction cost management on blockchain networks. Ensure that the parameters such as--period
and--period-limit
are appropriately set for your use case.
11-39
: The funding logic using thewait_tx
function appears sound. However, ensure that theOSMOSIS_TX_PARAMS
andCELESTIA_TX_PARAMS
are correctly set in the sourcedparams.sh
to avoid runtime errors.Verification successful
The
OSMOSIS_TX_PARAMS
andCELESTIA_TX_PARAMS
are correctly set in theparams.sh
file, with appropriate options for keyring backend, node, chain ID, and fees or gas prices. This ensures that the funding logic infund-accounts.sh
should work without runtime errors related to these parameters.
OSMOSIS_TX_PARAMS
includes settings for keyring backend, node, chain ID, gas prices, gas adjustment, and auto gas.CELESTIA_TX_PARAMS
includes settings for keyring backend, node, chain ID, and fees.No further action is needed as the parameters are correctly set.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that OSMOSIS_TX_PARAMS and CELESTIA_TX_PARAMS are correctly set. # Test: Check the params.sh file for correct parameter settings. cat scripts/testnet/params.sh | grep 'OSMOSIS_TX_PARAMS\|CELESTIA_TX_PARAMS'Length of output: 374
scripts/testnet/init-stake-contract.sh (6)
1-1
: Ensure the shebang line is correct and intended for this script usage.
3-14
: Proper management of directories and sourcing scripts is crucial for maintaining a clean and secure environment in shell scripts. The inclusion of error handling withset -e
is a best practice to halt on unexpected errors.
17-25
: Thestore_contract
function is critical for storing contracts on the blockchain. Ensure that error handling is robust, especially in cases where the contract file might not exist.Tools
Shellcheck
[warning] 24-24: Quote this to prevent word splitting. (SC2046)
27-38
: Theinit_contract
function initializes contracts with specific parameters. It is vital to ensure that all parameters are correctly passed and handled within the function.Tools
Shellcheck
[warning] 37-37: Quote this to prevent word splitting. (SC2046)
40-56
: Setting global variables for tokens and validators is a sensitive operation. Ensure that these values are not exposed or misused within or outside of the script.Tools
Shellcheck
[warning] 45-45: VALIDATORS appears unused. Verify use (or export if used externally). (SC2034)
[warning] 47-47: CELESTIA_VALIDATOR_2 appears unused. Verify use (or export if used externally). (SC2034)
[warning] 48-48: CELESTIA_VALIDATOR_3 appears unused. Verify use (or export if used externally). (SC2034)
58-104
: The logic for storing and initializing contracts appears comprehensive. However, ensure that the contract paths and initialization parameters are thoroughly tested to prevent deployment issues.Tools
Shellcheck
[warning] 76-76: Brace expansions and globs are literal in assignments. Quote it or use an array. (SC2125)
[warning] 80-80: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 80-80: Brace expansions and globs are literal in assignments. Quote it or use an array. (SC2125)
[warning] 80-80: Quotes/backslashes will be treated literally. Use an array. (SC2089)
[warning] 80-80: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 80-80: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 80-80: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 81-81: Quotes/backslashes in this variable will not be respected. (SC2090)
[warning] 85-85: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 85-85: Quotes/backslashes will be treated literally. Use an array. (SC2089)
[warning] 85-85: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 86-86: Quotes/backslashes in this variable will not be respected. (SC2090)
[warning] 90-90: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 90-90: Quotes/backslashes will be treated literally. Use an array. (SC2089)
[warning] 90-90: This { is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 90-90: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 90-90: This } is literal. Check expression (missing ;/\n?) or quote it. (SC1083)
[warning] 91-91: Quotes/backslashes in this variable will not be respected. (SC2090)
scripts/testnet/Local-Testnet.md (4)
Line range hint
1-1
: Ensure the title and introduction clearly explain the purpose and scope of the document.Tools
LanguageTool
[uncategorized] ~17-~17: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ... docker.io/library/mw-testnet ``` Upon creation the following accounts will be funded: ...
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operate the stake...
[misspelling] ~21-~21: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...account that operate the staker account trough thex/authz
module (grantee). - `cele...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...
[misspelling] ~26-~26: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...unt can be imported into a test keyring trough theutils/import-accounts-keys.sh
scr...
[uncategorized] ~56-~56: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...aries are available in thebins
folder and they will be lazy downloaded on first u...Markdownlint
39-39: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
41-41: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
45-45: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
51-51: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
55-55: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
17-22
: The account funding details are crucial for users. Ensure that the documentation is clear and accurate to prevent confusion during setup.Tools
LanguageTool
[uncategorized] ~17-~17: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ... docker.io/library/mw-testnet ``` Upon creation the following accounts will be funded: ...
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operate the stake...
[misspelling] ~21-~21: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...account that operate the staker account trough thex/authz
module (grantee). - `cele...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...Markdownlint
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
24-28
: Clarify the permissions and roles of different accounts to ensure users understand the security implications and capabilities of each account.Tools
LanguageTool
[misspelling] ~26-~26: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...unt can be imported into a test keyring trough theutils/import-accounts-keys.sh
scr...
30-54
: The contract deployment section is critical. Ensure that all steps are clearly explained and that any external resources (like the oracle contract download) are accessible and up-to-date.Tools
Markdownlint
39-39: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
41-41: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
45-45: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
51-51: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank linesscripts/testnet/local-celestia-testnet-multi-new.sh (3)
1-1
: Ensure the shebang line is correct and intended for this script usage.
3-11
: Proper management of directories and sourcing scripts is crucial for maintaining a clean and secure environment in shell scripts.
Line range hint
30-116
: The logic for setting up validators, configuring genesis files, and managing network configurations appears comprehensive. Ensure that all commands and configurations are tested to prevent issues during network setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (17)
- scripts/testnet/Local-Testnet.md (1 hunks)
- scripts/testnet/bins/celestia-appd (1 hunks)
- scripts/testnet/bins/download.sh (1 hunks)
- scripts/testnet/bins/hermes (1 hunks)
- scripts/testnet/bins/osmosisd (1 hunks)
- scripts/testnet/bins/wrapper.sh (1 hunks)
- scripts/testnet/fund-accounts.sh (1 hunks)
- scripts/testnet/init-stake-contract.sh (1 hunks)
- scripts/testnet/local-celestia-testnet-multi-continue.sh (2 hunks)
- scripts/testnet/local-celestia-testnet-multi-new.sh (2 hunks)
- scripts/testnet/local-hermes-new.sh (3 hunks)
- scripts/testnet/local-osmosis-testnet-continue.sh (1 hunks)
- scripts/testnet/local-osmosis-testnet-new.sh (1 hunks)
- scripts/testnet/params.sh (1 hunks)
- scripts/testnet/tia-osmo-pool.sh (1 hunks)
- scripts/testnet/utils/import-accounts-keys.sh (1 hunks)
- scripts/testnet/utils/tx.sh (1 hunks)
Files skipped from review as they are similar to previous changes (15)
- scripts/testnet/bins/celestia-appd
- scripts/testnet/bins/download.sh
- scripts/testnet/bins/hermes
- scripts/testnet/bins/osmosisd
- scripts/testnet/bins/wrapper.sh
- scripts/testnet/fund-accounts.sh
- scripts/testnet/init-stake-contract.sh
- scripts/testnet/local-celestia-testnet-multi-continue.sh
- scripts/testnet/local-celestia-testnet-multi-new.sh
- scripts/testnet/local-hermes-new.sh
- scripts/testnet/local-osmosis-testnet-continue.sh
- scripts/testnet/local-osmosis-testnet-new.sh
- scripts/testnet/tia-osmo-pool.sh
- scripts/testnet/utils/import-accounts-keys.sh
- scripts/testnet/utils/tx.sh
Additional context used
Shellcheck
scripts/testnet/params.sh
[warning] 8-8: OSMOSIS_TX_PARAMS appears unused. Verify use (or export if used externally). (SC2034)
[warning] 13-13: CELESTIA_TX_PARAMS appears unused. Verify use (or export if used externally). (SC2034)
[warning] 17-17: TESTNET_MNEMONIC appears unused. Verify use (or export if used externally). (SC2034)
[warning] 20-20: OSMOSIS_ACCOUNT appears unused. Verify use (or export if used externally). (SC2034)
[warning] 21-21: OSMOSIS_TRADER appears unused. Verify use (or export if used externally). (SC2034)
[warning] 22-22: OSMOSIS_TRADER_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 25-25: CELESTIA_STAKER appears unused. Verify use (or export if used externally). (SC2034)
[warning] 26-26: CELESTIA_STAKER_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 27-27: CELESTIA_GRANTEE appears unused. Verify use (or export if used externally). (SC2034)
[warning] 28-28: CELESTIA_GRANTEE_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
[warning] 29-29: CELESTIA_REWARDS_COLLECTOR appears unused. Verify use (or export if used externally). (SC2034)
[warning] 30-30: CELESTIA_REWARDS_COLLECTOR_ACCOUNT_INDEX appears unused. Verify use (or export if used externally). (SC2034)
LanguageTool
scripts/testnet/Local-Testnet.md
[uncategorized] ~17-~17: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ... docker.io/library/mw-testnet ``` Upon creation the following accounts will be funded: ...
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operate the stake...
[uncategorized] ~21-~21: This verb does not appear to agree with the subject. Consider using a different form. (AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)
Context: ...tacaums4s8w5yn6: Celestia account that operate the staker account trough the
x/authz`...
[misspelling] ~21-~21: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...account that operate the staker account trough thex/authz
module (grantee). - `cele...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...
[misspelling] ~26-~26: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...unt can be imported into a test keyring trough theutils/import-accounts-keys.sh
scr...
[uncategorized] ~56-~56: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE)
Context: ...aries are available in thebins
folder and they will be lazy downloaded on first u...
[uncategorized] ~106-~106: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2)
Context: .... - This enables Tx indexing in Celestia so tooling can confirm transactions done o...
[uncategorized] ~110-~110: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...elayer Create a key for the relayer on Celestia side and store in in a file celestia-re...
[duplication] ~110-~110: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ... the relayer on Celestia side and store in in a file celestia-relayer-key.json ``` c...
[uncategorized] ~116-~116: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...on ``` Create a key for the relayer on Osmosis side and store in in a file osmosis-rel...
[duplication] ~116-~116: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...r the relayer on Osmosis side and store in in a file osmosis-relayer-key.json ``` os...
[grammar] ~161-~161: It seems that a verb or a comma is missing. (MD_DT_JJ)
Context: ...rt ``` ### Check Validator output You can the output of the validators with Tmux ...
[uncategorized] ~173-~173: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...tart the network again after setting it up run: ``` sh ./local-osmosis-testnet-co...
[uncategorized] ~173-~173: Possible missing preposition found. (AI_HYDRA_LEO_MISSING_TO)
Context: ...t the network again after setting it up run: ``` sh ./local-osmosis-testnet-contin...
Markdownlint
scripts/testnet/Local-Testnet.md
39-39: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
41-41: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
45-45: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
51-51: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
55-55: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
7-7: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
13-13: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
62-62: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
72-72: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
98-98: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
112-112: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
118-118: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
124-124: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
131-131: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
139-139: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
146-146: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
155-155: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
163-163: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
175-175: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
Additional comments not posted (2)
scripts/testnet/params.sh (1)
1-1
: Add a shebang line to specify the shell interpreter explicitly, e.g.,#!/bin/bash
.scripts/testnet/Local-Testnet.md (1)
44-54
: Ensure accuracy and clarity in transaction commands.Tools
Markdownlint
45-45: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
51-51: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Outside diff range and nitpick comments (3)
scripts/testnet/Local-Testnet.md (3)
Line range hint
110-110
: Correct the repeated word "in".- store in in a file celestia-relayer-key.json + store in a file celestia-relayer-key.jsonTools
LanguageTool
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operates the stak...
[misspelling] ~21-~21: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...ccount that operates the staker account trough thex/authz
module (grantee). - `cele...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...
[misspelling] ~26-~26: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...nts can be imported into a test keyring trough theutils/import-accounts-keys.sh
scr...Markdownlint
39-39: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
41-41: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
45-45: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
51-51: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
55-55: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
Line range hint
116-116
: Correct the repeated word "in".- store in in a file osmosis-relayer-key.json + store in a file osmosis-relayer-key.jsonTools
LanguageTool
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operates the stak...
[misspelling] ~21-~21: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...ccount that operates the staker account trough thex/authz
module (grantee). - `cele...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...
[misspelling] ~26-~26: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...nts can be imported into a test keyring trough theutils/import-accounts-keys.sh
scr...Markdownlint
39-39: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
41-41: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
45-45: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
51-51: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
55-55: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
Line range hint
161-161
: Add a missing verb for clarity.- You can the output of the validators with Tmux + You can view the output of the validators with TmuxTools
LanguageTool
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operates the stak...
[misspelling] ~21-~21: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...ccount that operates the staker account trough thex/authz
module (grantee). - `cele...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...
[misspelling] ~26-~26: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...nts can be imported into a test keyring trough theutils/import-accounts-keys.sh
scr...Markdownlint
39-39: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
41-41: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
45-45: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
51-51: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
55-55: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- scripts/testnet/Local-Testnet.md (1 hunks)
Additional context used
LanguageTool
scripts/testnet/Local-Testnet.md
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operates the stak...
[misspelling] ~21-~21: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...ccount that operates the staker account trough thex/authz
module (grantee). - `cele...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...
[misspelling] ~26-~26: Did you mean the preposition “through” (e.g. "walk through a door”)? (TROUGH_THROUGH)
Context: ...nts can be imported into a test keyring trough theutils/import-accounts-keys.sh
scr...
[uncategorized] ~106-~106: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2)
Context: .... - This enables Tx indexing in Celestia so tooling can confirm transactions done o...
[duplication] ~110-~110: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ... the relayer on Celestia side and store in in a file celestia-relayer-key.json ``` c...
[duplication] ~116-~116: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...r the relayer on Osmosis side and store in in a file osmosis-relayer-key.json ``` os...
[grammar] ~161-~161: It seems that a verb or a comma is missing. (MD_DT_JJ)
Context: ...rt ``` ### Check Validator output You can the output of the validators with Tmux ...
[uncategorized] ~173-~173: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...tart the network again after setting it up run: ``` sh ./local-osmosis-testnet-co...
[uncategorized] ~173-~173: Possible missing preposition found. (AI_HYDRA_LEO_MISSING_TO)
Context: ...t the network again after setting it up run: ``` sh ./local-osmosis-testnet-contin...
Markdownlint
scripts/testnet/Local-Testnet.md
39-39: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
41-41: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
45-45: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
51-51: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
55-55: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
7-7: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
13-13: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
62-62: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
72-72: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
98-98: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
112-112: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
118-118: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
124-124: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
131-131: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
139-139: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
146-146: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
155-155: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
163-163: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
175-175: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@coderabbitai review |
Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- scripts/testnet/Local-Testnet.md (1 hunks)
Additional context used
LanguageTool
scripts/testnet/Local-Testnet.md
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operates the stak...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...
[uncategorized] ~110-~110: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2)
Context: .... - This enables Tx indexing in Celestia so tooling can confirm transactions done o...
[duplication] ~114-~114: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ... the relayer on Celestia side and store in in a file celestia-relayer-key.json ``` c...
[duplication] ~120-~120: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...r the relayer on Osmosis side and store in in a file osmosis-relayer-key.json ``` os...
[grammar] ~165-~165: It seems that a verb or a comma is missing. (MD_DT_JJ)
Context: ...rt ``` ### Check Validator output You can the output of the validators with Tmux ...
[uncategorized] ~177-~177: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...tart the network again after setting it up run: ``` sh ./local-osmosis-testnet-co...
[uncategorized] ~177-~177: Possible missing preposition found. (AI_HYDRA_LEO_MISSING_TO)
Context: ...t the network again after setting it up run: ``` sh ./local-osmosis-testnet-contin...
Markdownlint
scripts/testnet/Local-Testnet.md
59-59: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
7-7: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
13-13: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
66-66: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
76-76: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
102-102: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
116-116: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
122-122: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
128-128: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
135-135: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
143-143: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
150-150: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
159-159: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
167-167: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
179-179: null (MD040, fenced-code-language)
Fenced code blocks should have a language specified
Additional comments not posted (4)
scripts/testnet/Local-Testnet.md (4)
17-22
: Ensure clarity and correctness in the account descriptions.This section clearly outlines the specific roles and configurations for each account, enhancing user understanding and facilitating correct setup.
Tools
LanguageTool
[uncategorized] ~19-~19: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s7lkyl9`: Osmosis trader account used to swap the...
[uncategorized] ~20-~20: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1sfhy3emrgp26wnzuu64p06kpkxd9phel74e0yx`: Celestia account that stakes the TIA on...
[uncategorized] ~21-~21: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...1lh0u9sug6qh922gjpal3frwtacaums4s8w5yn6`: Celestia account that operates the stak...
[uncategorized] ~22-~22: Loose punctuation mark. (UNLIKELY_OPENING_PUNCTUATION)
Context: ...12rzczckgh8fqq533t0xqhqrrzdk76du3dxrx9q`: Celestia account where the staking rewa...Markdownlint
18-18: null (MD032, blanks-around-lists)
Lists should be surrounded by blank lines
34-36
: Confirm the steps for contract compilation and oracle contract handling are clear and executable.The instructions for contract compilation and oracle contract download are well-detailed, promoting a smooth setup process for users.
56-58
: Examine the command for liquid staking to ensure it adheres to expected parameters and syntax.The command for liquid staking is correctly formatted, facilitating the correct execution of staking operations on the network.
26-26
: Validate the script path for importing accounts.Verification successful
The script
import-accounts-keys.sh
exists at the specified path:./scripts/testnet/utils/import-accounts-keys.sh
.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of the script used to import accounts. fd "import-accounts-keys.sh" --exec echo "Script found: {}"Length of output: 121
Next, you can IBC transfer some TIA using the following command: | ||
|
||
```sh | ||
celestia-appd tx ibc-transfer transfer transfer channel-0 osmo1sfhy3emrgp26wnzuu64p06kpkxd9phel8ym0ge 1000000utia \ | ||
--from staker --fees 21000utia -b block -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review the command syntax for IBC transfer.
- celestia-appd tx ibc-transfer transfer transfer channel-0 osmo1sfhy3emrgp26wnzuu64p06kpkxd9phel8ym0ge 1000000utia \
+ celestia-appd tx ibc-transfer transfer channel-0 osmo1sfhy3emrgp26wnzuu64p06kpkxd9phel8ym0ge 1000000utia \
Ensure the command syntax is correct by removing the repeated 'transfer' keyword, which enhances clarity and prevents command errors.
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.
Next, you can IBC transfer some TIA using the following command: | |
```sh | |
celestia-appd tx ibc-transfer transfer transfer channel-0 osmo1sfhy3emrgp26wnzuu64p06kpkxd9phel8ym0ge 1000000utia \ | |
--from staker --fees 21000utia -b block -y | |
Next, you can IBC transfer some TIA using the following command: | |
```sh | |
celestia-appd tx ibc-transfer transfer channel-0 osmo1sfhy3emrgp26wnzuu64p06kpkxd9phel8ym0ge 1000000utia \ | |
--from staker --fees 21000utia -b block -y | |
``` |
After completing the above steps, you can deploy the contracts by running: | ||
|
||
```sh | ||
./init_stake_contract.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
The script init_stake_contract.sh
is not found in the repository. Please ensure that the script is added to the repository and correctly referenced in the documentation.
Analysis chain
Ensure the script init_stake_contract.sh
is correctly referenced and functional.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the `init_stake_contract.sh` script is present and executable.
fd "init_stake_contract.sh" --exec echo "Script found and executable: {}"
Length of output: 73
Script:
#!/bin/bash
# Description: Check if the `init_stake_contract.sh` script exists and is executable.
if [ -f "./init_stake_contract.sh" ]; then
if [ -x "./init_stake_contract.sh" ]; then
echo "Script found and is executable."
else
echo "Script found but is not executable."
fi
else
echo "Script not found."
fi
Length of output: 82
Overview
This PR updates the Dockerfiles and scripts to run a localnet with all the contracts required for the liquid staking protocol. These updates account for the fact that the liquid staking contract now uses a single oracle contract and the newer version of the treasury contract.
closes: #XXXX
What changes have been made in this PR?
params.sh
fileinit-stake-contract.sh
script to use only a single oracle contractChecklist