Skip to content
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

Desktop App #1262

Closed
wants to merge 12 commits into from
Closed

Desktop App #1262

wants to merge 12 commits into from

Conversation

faddat
Copy link
Contributor

@faddat faddat commented Mar 10, 2024

1. Summary

Provides a desktop application for using Quicksilver that syncs a node, ensuring that users don't have their access to the network curtailed.

2.Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

3. Implementation details

4. How to test/use

5. Checklist

  • Does the Readme need to be updated?

6. Limitations (optional)

7. Future Work (optional)

Summary by CodeRabbit

  • New Features
    • Provided detailed instructions for restarting the Quicksilver-2 chain and joining the Mainnet.
    • Added SHA256 checksum file for data integrity verification.
    • Introduced scripts for processing exported chain state, modifying balances, and updating genesis files.
    • Included information on deprecated instructions for joining the Quicksilver Mainnet and seed nodes for peer discovery.
    • Added information about the "Rhye-2" testnet and instructions for migrating to it.
    • Integrated functionality to interact with an external API to fetch data and manage local files in the web UI module.

@faddat faddat requested a review from chalabi2 as a code owner March 10, 2024 16:29
Copy link

vercel bot commented Mar 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
quicksilver ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2024 2:29pm

Copy link
Contributor

coderabbitai bot commented Mar 10, 2024

Walkthrough

The recent changes encompass upgrading the Quicksilver chain to version 2, including exporting and migrating genesis states. Detailed instructions for joining the Quicksilver Mainnet, setting up validators, and introducing automation with Cosmovisor have been added. Additionally, new testnets like Rhye-1 and Rhye-2 have been established with comprehensive setup guides and scripts for network management.

Changes

Files Change Summary
mainnet/README.md, mainnet/export-quicksilver-1-115000.json.sha256, mainnet/migrate-genesis.py Provide instructions for upgrading to Quicksilver-2, including exporting, migrating genesis, and introducing Cosmovisor.
mainnet/quicksilver-1/README.md, mainnet/quicksilver-1/SEEDS Deprecated instructions for Quicksilver Mainnet v1.0.0 and introduction of seed nodes for Quicksilver network.
networks/testnets/archive/... New scripts and instructions for managing different Quicksilver testnets like Rhapsody, Rhye-1, and Rhye-2.
web-ui/src-tauri/build.rs, web-ui/src-tauri/src/main.rs Updates for building Tauri application and orchestrating setup processes with external API interactions.

🐇📜
Chains upgraded, testnets anew,
Instructions clear for the chosen few.
Scripts and files in harmony align,
Quicksilver's network, a tale divine.
Peer connections, logs ignored,
In the blockchain world, our path explored.
🌌🔗


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

"build": {
"beforeBuildCommand": "bun run build",
"beforeDevCommand": "bun run dev",
"devPath": "http://localhost:3000",

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling.

Do not leave debug code in production
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between f3fb2d9 and b337811.
Files ignored due to path filters (19)
  • web-ui/package.json is excluded by: !**/*.json
  • web-ui/src-tauri/Cargo.lock is excluded by: !**/*.lock
  • web-ui/src-tauri/Cargo.toml is excluded by: !**/*.toml
  • web-ui/src-tauri/icons/128x128.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/[email protected] is excluded by: !**/*.png
  • web-ui/src-tauri/icons/32x32.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/Square107x107Logo.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/Square142x142Logo.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/Square150x150Logo.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/Square284x284Logo.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/Square30x30Logo.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/Square310x310Logo.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/Square44x44Logo.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/Square71x71Logo.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/Square89x89Logo.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/StoreLogo.png is excluded by: !**/*.png
  • web-ui/src-tauri/icons/icon.ico is excluded by: !**/*.ico
  • web-ui/src-tauri/icons/icon.png is excluded by: !**/*.png
  • web-ui/src-tauri/tauri.conf.json is excluded by: !**/*.json
Files selected for processing (3)
  • web-ui/src-tauri/.gitignore (1 hunks)
  • web-ui/src-tauri/build.rs (1 hunks)
  • web-ui/src-tauri/src/main.rs (1 hunks)
Files skipped from review due to trivial changes (3)
  • web-ui/src-tauri/.gitignore
  • web-ui/src-tauri/build.rs
  • web-ui/src-tauri/src/main.rs

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

devskim found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link

codecov bot commented Mar 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.58%. Comparing base (3ceba2a) to head (a3eb989).
Report is 46 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1262   +/-   ##
=======================================
  Coverage   63.58%   63.58%           
=======================================
  Files         193      193           
  Lines       13654    13654           
=======================================
  Hits         8682     8682           
  Misses       4132     4132           
  Partials      840      840           
Flag Coverage Δ
unittests 63.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Comment on lines 6 to 8
if [[ ! -z $(pgrep quicksilverd) ]]; then
echo "quicksilverd is already running; you should run 'make stop' to kill the existing process"
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

The script checks if quicksilverd is already running but does not exit after printing the message. This could lead to unintended behavior if the script continues to execute.

- fi
+ else
+     exit 1
+ fi

Adding an else clause with exit 1 ensures the script exits immediately if quicksilverd is already running.


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.

Suggested change
if [[ ! -z $(pgrep quicksilverd) ]]; then
echo "quicksilverd is already running; you should run 'make stop' to kill the existing process"
fi
if [[ ! -z $(pgrep quicksilverd) ]]; then
echo "quicksilverd is already running; you should run 'make stop' to kill the existing process"
else
exit 1
fi

Comment on lines 10 to 12
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to the previous script, this one checks for the existence of $QS_BIN but does not exit if it's not found, potentially leading to unclear errors later.

- fi
+ else
+     exit 1
+ fi

Adding an else clause with exit 1 ensures the script exits immediately if $QS_BIN is not found.


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.

Suggested change
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
else
exit 1
fi

@@ -0,0 +1,14 @@
#!/bin/bash -i
Copy link
Contributor

Choose a reason for hiding this comment

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

The shebang line uses #!/bin/bash -i, which is not recommended for scripts that may run in non-interactive environments.

Consider removing the -i flag for more consistent behavior across different execution contexts.

#!/bin/bash -i
set -e

source vars.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

The script sources vars.sh without checking for its existence or handling potential errors, which could lead to unclear error messages.

- source vars.sh
+ if [[ -f vars.sh ]]; then
+     source vars.sh
+ else
+     echo "Error: vars.sh not found."
+     exit 1
+ fi

This change ensures the script exits with a clear error message if vars.sh is missing.


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.

Suggested change
source vars.sh
if [[ -f vars.sh ]]; then
source vars.sh
else
echo "Error: vars.sh not found."
exit 1
fi

Comment on lines 6 to 10
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi

$QS_BIN --home $QS_HOME tendermint unsafe-reset-all
Copy link
Contributor

Choose a reason for hiding this comment

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

The script checks if the QS_BIN binary exists before proceeding with the reset operation, which is a good practice to avoid running commands on undefined paths. However, it would be beneficial to add error handling for the case where the QS_BIN file does not exist. Instead of just echoing a message, consider exiting the script with a non-zero status to clearly indicate an error condition to calling processes.

- fi
+ else
+   exit 1
+ fi

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.

Suggested change
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi
$QS_BIN --home $QS_HOME tendermint unsafe-reset-all
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
else
exit 1
fi
$QS_BIN --home $QS_HOME tendermint unsafe-reset-all

Comment on lines 6 to 8
if [[ ! -z $(pgrep quicksilverd) ]]; then
echo "quicksilverd is already running; you should run 'make stop' to kill the existing process"
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

The script checks if quicksilverd is already running but does not exit after printing the message, potentially leading to unintended behavior.

- fi
+ else
+     exit 1
+ fi

Adding an else clause with exit 1 ensures the script exits immediately if quicksilverd is already running.


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.

Suggested change
if [[ ! -z $(pgrep quicksilverd) ]]; then
echo "quicksilverd is already running; you should run 'make stop' to kill the existing process"
fi
if [[ ! -z $(pgrep quicksilverd) ]]; then
echo "quicksilverd is already running; you should run 'make stop' to kill the existing process"
else
exit 1
fi

Comment on lines 6 to 10
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi

$QS_BIN --home $QS_HOME tendermint unsafe-reset-all
Copy link
Contributor

Choose a reason for hiding this comment

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

As with the killerqueen reset script, adding error handling for the case where the QS_BIN file does not exist would improve the script's robustness. Consider exiting the script with a non-zero status to indicate an error condition clearly.

- fi
+ else
+   exit 1
+ fi

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.

Suggested change
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi
$QS_BIN --home $QS_HOME tendermint unsafe-reset-all
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
else
exit 1
fi
$QS_BIN --home $QS_HOME tendermint unsafe-reset-all

Comment on lines 10 to 12
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

This script, like the previous one, checks for the existence of $QS_BIN but does not exit if it's not found, which could lead to unclear errors later.

- fi
+ else
+     exit 1
+ fi

Adding an else clause with exit 1 ensures the script exits immediately if $QS_BIN is not found.


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.

Suggested change
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
else
exit 1
fi

Comment on lines 6 to 13
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi

QS_KEY=$($QS_BIN --home $QS_HOME keys show validator --output=json | jq .address -r)

echo "On the Quicksilver discord:"
echo " - in the #qck-tap channel, enter: '\$request $QS_KEY rhapsody'"
Copy link
Contributor

Choose a reason for hiding this comment

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

The script correctly generates a key for the validator and provides clear instructions for requesting tokens. However, similar to the reset scripts, consider adding error handling for the case where the QS_BIN file does not exist, including exiting the script with a non-zero status.

- fi
+ else
+   exit 1
+ fi

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.

Suggested change
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi
QS_KEY=$($QS_BIN --home $QS_HOME keys show validator --output=json | jq .address -r)
echo "On the Quicksilver discord:"
echo " - in the #qck-tap channel, enter: '\$request $QS_KEY rhapsody'"
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
else
exit 1
fi
QS_KEY=$($QS_BIN --home $QS_HOME keys show validator --output=json | jq .address -r)
echo "On the Quicksilver discord:"
echo " - in the #qck-tap channel, enter: '\$request $QS_KEY rhapsody'"

@@ -0,0 +1,16 @@
#!/bin/bash -i
Copy link
Contributor

Choose a reason for hiding this comment

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

The shebang line uses #!/bin/bash -i, which might not be suitable for scripts intended to run in non-interactive environments.

Consider removing the -i flag to ensure consistent behavior across different execution contexts.

#!/bin/bash -i
set -e

source vars.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

The script sources vars.sh without verifying its existence or handling potential errors, which could lead to unclear error messages.

- source vars.sh
+ if [[ -f vars.sh ]]; then
+     source vars.sh
+ else
+     echo "Error: vars.sh not found."
+     exit 1
+ fi

This ensures the script exits with a clear error message if vars.sh is missing.


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.

Suggested change
source vars.sh
if [[ -f vars.sh ]]; then
source vars.sh
else
echo "Error: vars.sh not found."
exit 1
fi

Comment on lines 6 to 8
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to the previous scripts, this one checks for the existence of $QS_BIN but does not exit if it's not found, potentially leading to unclear errors later.

- fi
+ else
+     exit 1
+ fi

Adding an else clause with exit 1 ensures the script exits immediately if $QS_BIN is not found.


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.

Suggested change
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
fi
if [[ ! -f $QS_BIN ]]; then
echo "Run 'make init' before running this command."
else
exit 1
fi

@@ -0,0 +1,14 @@
#!/bin/bash -i
Copy link
Contributor

Choose a reason for hiding this comment

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

The shebang line uses #!/bin/bash -i, which might not be suitable for scripts intended to run in non-interactive environments.

Consider removing the -i flag to ensure consistent behavior across different execution contexts.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b807c7f and 67d263f.
Files selected for processing (1)
  • web-ui/src-tauri/src/main.rs (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • web-ui/src-tauri/src/main.rs

@joe-bowman
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 358c233
✅ Preview: https://pr-1262.app-dev.quicksilver.zone
🔍 Inspect: https://vercel.com/quicksilver/quicksilver/J5YDxCjnTEaYDT5Ua1unC1Q2L6JD

View Workflow Logs

@joe-bowman
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

@joe-bowman
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

@joe-bowman joe-bowman added Stale and removed Stale labels May 28, 2024
@joe-bowman
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

@joe-bowman joe-bowman added Stale and removed Stale labels Jun 13, 2024
@joe-bowman
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

@joe-bowman joe-bowman added Stale and removed Stale labels Jun 28, 2024
@joe-bowman
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants