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

INIT: Multi Node (Validator) Testnet #4374

Open
julienrbrt opened this issue Sep 24, 2024 · 6 comments · May be fixed by #4377
Open

INIT: Multi Node (Validator) Testnet #4374

julienrbrt opened this issue Sep 24, 2024 · 6 comments · May be fixed by #4377
Labels
bounty type:feat To implement new feature.

Comments

@julienrbrt
Copy link
Member

julienrbrt commented Sep 24, 2024

Summary

This bounty seeks a developer to implement a multi-node testnet feature for Ignite CLI. The goal is to extend the existing ignite testnet command with a new ignite testnet multi-nodes subcommand, allowing developers to easily set up and manage multiple validator nodes for testing purposes.

Description

We propose extending the Ignite CLI with a multi-node testnet feature, enhancing the testing capabilities for Cosmos SDK-based blockchain applications. This feature will allow developers to create and manage multiple validator nodes, observe their behavior, and simulate various network conditions. A bounty of $3000 will be awarded to the developer completing this issue.

Requirements

  1. Extend the ignite testnet command with a new ignite testnet multi-node subcommand.
  2. Implement a new multi-node section in the config.yaml file to specify validator configurations.
  3. Create an interactive screen using the charmbracelet/bubbletea library to display logs from multiple validators simultaneously.
  4. Implement functionality to dynamically kill and restart nodes to observe chain performance.
  5. Ensure compatibility with existing Ignite CLI features and workflows.
  6. (bonus) Add the ability for nodes to join the network after initial setup.

Detailed Specifications

Config.yaml Integration:

  • Use the existing validators section from the config.yaml file.
  • Allow users to specify the number of validators and their configurations.
  • Provide options for random validator generation if specific configurations are not provided via flag.

Example config.yaml structure:

...
 validators:
    - name: validator1
      stake: 100000000stake
    - name: validator2
      stake: 200000000stake

Interactive UI:

  • Implement an interactive UI using the charmbracelet/bubbletea library.
  • Display real-time logs from all active validator nodes.
  • Provide options to toggle between different views (e.g., all nodes, specific node, network statistics).

Node Management:

  • Implement UI options (or subcommand) to kill and restart specific nodes.
  • Add functionality to introduce new nodes to the network after initial setup.
  • Provide clear feedback on network state and node status changes.

Integration with Ignite CLI:

  • Ensure the new feature works seamlessly with existing Ignite CLI commands and workflows.
  • Maintain consistency with Ignite CLI's code style and best practices.

Evaluation Criteria

  • Functionality: The implementation should meet all specified requirements and work reliably.
  • User Experience: The interactive UI should be intuitive and provide valuable insights into the multi-node testnet.
  • Code Quality: The code should be well-structured, documented, and follow Ignite CLI coding conventions.
  • Testing: Comprehensive tests should be included to ensure feature reliability.
  • Documentation: Clear and concise documentation on how to use the new feature should be provided.

Implementation

This list is not exhaustive:

  • Create a new command in ignite/cmd/testnet_multi_node.go
  • Extend the chain config (config.yaml) in ignite/config/chain/v1
    • Add in default some dummy validators so that the command always works on new scaffold
  • Add testnet code to chain templates (*.plush files), following the best practice from the Cosmos SDK Simapp, but keep it extensible via Ignite
    • Probably add helpers in ignite/pkg/chaincmd to integrate with the node command

Additional Resources

Notes

  • This issue is open to all developers with the necessary skills and experience.
  • The Ignite development team will be available to answer questions and provide support throughout the development process.
  • We encourage developers to submit clear proposals outlining their approach and estimated timeline.
  • The bounty reward is $3000. An additional reward may be granted if all bonus tasks have been completed.

Please read the bounty terms and conditions below before participating.

Bounty Terms and Conditions

LEGAL DISCLAIMER

This bounty program (“the Program”) is a discretionary initiative to encourage and reward those who are committed to helping us improve Ignite’s CLI protocol. Ignite Global, Inc. (“Ignite”, “we”, “us”), may in its sole discretion, modify these Terms at any time and may modify, restrict, suspend, terminate, or otherwise change any aspect of this Program. The Program is not a competition. No fees are payable or purchase is necessary to participate in the Program. There is no guarantee that the Participant (“you”) will earn a reward (“Bounty Reward”) by participating in the Program. The Program is provided “as-is”.

ELIGIBILITY

The Bounty Rewards are subject to compliance with local laws, rules, and regulations. To be eligible to participate in the Program, you must not (a) be a citizen or resident of a country in which use or participation is prohibited by law, decree, regulation, treaty, or administrative act; (b) be a citizen or resident of, or located in, a country or region that is subject to the U.S. or other sovereign country sanctions or embargoes; (c) an individual or an individual employed by or associated with an entity identified on the U.S. Department of Commerce’s Denied Persons or Entity List, the U.S. Department of Treasury’s Specially Designated Nationals or Blocked Persons Lists, or the Department of State’s Debarred Parties List or otherwise ineligible to receive items subject to U.S. export control laws and regulations, or other economic sanction rules of any sovereign nation; (d) be under 18 years old; If you are at least 18 years old, but considered an underage in your place of residence, you must obtain consent from your parents or legal guardians prior to getting enrolled in the Program.

CONFIDENTIALITY OBLIGATIONS

“Confidential Information” means any information that is marked or otherwise designated as confidential at the time of disclosure or that a reasonable person would consider confidential based on the circumstances and content of the disclosure, and includes, without limitation: customer information, personally identifiable information, financial information, information, pricing information, business information, and fees. Confidential Information does not include information that: (i) is or becomes known to the receiving party from a source other than one having an obligation of confidentiality to the disclosing party; (ii) is or becomes publicly known or otherwise ceases to be confidential, except through a breach of this Agreement; or (iii) is independently developed by the receiving party.
You agree that you will (i) hold in confidence and not disclose to any third party any Confidential Information, except as approved in writing by disclosing party; (ii) protect such Confidential Information with at least the same degree of care that the Researcher uses to protect its own Confidential Information, but in no case, less than reasonable care; (iii) use the disclosing party’s Confidential Information for no purpose other than the use permitted by the disclosing party; and (iv) immediately notify disclosing party upon discovery of any loss or unauthorized disclosure of disclosing party’s Confidential Information.
ALL SUBMISSIONS ARE CONFIDENTIAL INFORMATION OF THE PROGRAM OWNER UNLESS OTHERWISE STATED IN THE BOUNTY BRIEF. This means no submissions may be publicly disclosed at any time unless Ignite has otherwise consented to the disclosure.

INTELLECTUAL PROPERTY, GRANTS, AND OWNERSHIP

Intellectual Property Rights and Ownership.

We retain all intellectual property rights in our products including, without limitation, all our source code and associated related binaries. Nothing herein shall grant you any right in any part of our products, or any improvement or derivative in any deliverable you provide us. You agree that to the extent required to abide by these Terms, you will waive any and all rights that may otherwise accrue to you in such deliverable and agree that we will not be obliged to license back any derivative or improvements of the delivered work to you.

Grants to Ignite

By submitting a work deliverable to us, you represent and warrant that your submission is an original work of authorship and does not violate any applicable law or any third party intellectual property rights. Furthermore, you grant us a royalty-free, fully paid-up, perpetual, non-revocable, exclusive, worldwide, transferable, and sub-licensable license in respect of such work deliverable and any feedback thereto. We will not have an obligation to utilize any item you provide us. You waive any compensation related to the incorporation of any materials in a deliverable or any feedback provided to us into our products and services.

PRIVACY

To receive a Bounty Reward, you must provide us with your personal information to conduct a Know Your Customer (“KYC”) process to ensure certain eligibility requirements are met. KYCr information includes but is not limited to: W9 or W8-BEN, your name, email address, ID information, and your crypto wallet address. Ignite is committed to protecting and respecting your privacy. Any access and use of your personal information will be subject to applicable law and our privacy policy available at ignite.com/privacy.

GOVERNING LAW AND JURISDICTION

This Program, these Terms, and any dispute arising under or related thereto (whether for breach of contract, tortious conduct, or otherwise) will be governed, construed, and interpreted under the laws of Switzerland, without reference or giving effect to its conflicts of law principles or rules that would cause the application of any other laws. Any legal actions, suits, or proceedings related to this Program (whether for breach of contract, tortious conduct, or otherwise) will be brought exclusively in the courts of the Canton of Zug and each Participant irrevocably accepts, submits, and consents to the exclusive jurisdiction and venue of these courts with respect to any legal actions, suits, or proceedings arising out of or related to this Program. You waive any and all objections to jurisdiction and venue in these courts and hereby submit to the jurisdiction of the courts of the Canton of Zug, Switzerland.
Except where prohibited, as a condition of participating in this Program, each Participant agrees that between the parties, any and all disputes, claims, and causes of action arising out of or connected with this Program, or the Bounty Reward must be resolved individually, without resort to any form of class action.

INDEMNITY AND LIMITATION OF LIABILITY

Participant will be liable for and indemnify Ignite, its subcontractors, and their respective directors, officers, and representatives (“Ignite Indemnitees”) against any losses which Ignite Indemnitees may incur that arise from Participant’s breach of these Terms, including losses arising from Participants’ gross negligence, willful misconduct and breach of law.
In no event will Ignite be liable to you for any loss of use, revenue or profit or loss of data or for any consequential, incidental, indirect, exemplary, special, aggravated, or punitive damages whether arising out of breach of contract, tort (including negligence) or otherwise, regardless of whether such damage was foreseeable and whether or not Ignite had been advised of the possibility of such damages.
Notwithstanding anything else set out under these Terms, our aggregate liability to you under these Terms shall not exceed the lesser of the total amount of a Bounty Reward to which you may be entitled or 500 USD.
We may terminate your engagement with us and any entitlement to any Bounty Reward if you violate any part of these Terms. Ignite reserves the right to restrict or void participation from any identifiable source if any suspicious participation is detected or any violation of these Terms is suspected or detected. Ignite reserves the right, in its sole discretion, to void the participation of any Participant who Ignite believes has attempted to tamper with or impair the administration, security, fairness, or proper execution of the Program. If Ignite determines at any time, in its sole discretion, that a Participant is engaging in behavior that Ignite deems obnoxious, deceptive, inappropriate, threatening, illegal or that is intended to annoy, abuse, or harass any other person, Ignite reserves the right to disqualify that Participant.

General Terms

These Terms constitute the entire and exclusive understanding and agreement between Ignite and you regarding the Program, and these Terms supersede and replace any and all prior oral or written understandings or agreements between Ignite and you regarding the Program. If any provision of these Terms is held invalid or unenforceable by a court of competent jurisdiction, that provision will be enforced to the maximum extent permissible and the other provisions of these Terms will remain in full force and effect. You may not assign or transfer these Terms, by operation of law or otherwise, without our prior written consent. Any attempt by you to assign or transfer these Terms, without such consent, will be null. We may freely assign or transfer these Terms without restriction. Subject to the foregoing, these Terms will bind and inure to the benefit of the parties, their successors and permitted assigns.
You agree and consent to receive electronically all communications, agreements, documents, notices,and disclosures (collectively, “Communications”) that we provide in connection with your participation in the Program.

Contact Information

If you have any questions about these Terms, please contact us at [email protected].

@julienrbrt julienrbrt changed the title INIT: Ignite Multi Node (Validator) Testnet INIT: Multi Node (Validator) Testnet Sep 24, 2024
@Myestery
Copy link

I'll like to start working on this issue

@julienrbrt julienrbrt added type:feat To implement new feature. bounty labels Sep 24, 2024
@likesToEatFish
Copy link
Contributor

I have some relevant experience with this and would really like to take it on. If you're okay with it, I’d love to work on this. If you'd like, we could collaborate on it as well. @julienrbrt

@julienrbrt
Copy link
Member Author

Hey you are both welcome to give it a go!

@likesToEatFish likesToEatFish linked a pull request Sep 29, 2024 that will close this issue
@Pantani
Copy link
Collaborator

Pantani commented Sep 30, 2024

IMHO, instead of changing the config file and avoid to have the v3, we can use the current structure; instead of adding everything below the multi-node, we can put everything inside the validators key, which was made for it. like the issue #2473

@julienrbrt
Copy link
Member Author

IMHO, instead of changing the config file and avoid to have the v3, we can use the current structure; instead of adding everything below the multi-node, we can put everything inside the validators key, which was made for it. like the issue #2473

The issue of doing this, is that it makes it unclear between chain serve and multi-node. The different would be, chain serve runs the first one and multi node all of them?

Additionally, this is less breaking to add fields than rename them.

@julienrbrt
Copy link
Member Author

After our call, you are right, validators exists already, so best to use it instead.
I have updated the issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty type:feat To implement new feature.
Projects
Status: To Discuss
Development

Successfully merging a pull request may close this issue.

4 participants