Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_1_filetest.gno

4.66 Kb Β· 112 lines
  1// PKGPATH: gno.land/r/gnops/valopers/filetests/z_1
  2// SEND: 20000000ugnot
  3
  4package z_1
  5
  6import (
  7	"testing"
  8
  9	"gno.land/p/nt/testutils/v0"
 10	"gno.land/r/gnops/valopers"
 11)
 12
 13var g1user = testutils.TestAddress("g1user") // g1vuch2um9wf047h6lta047h6lta047h6l2ewm6w
 14
 15const (
 16	validMoniker     = "test-1"
 17	validDescription = "test-1's description"
 18	validServerType  = valopers.ServerTypeOnPrem
 19	validAddress     = address("g1sp8v98h2gadm5jggtzz9w5ksexqn68ympsd68h")
 20	validPubKey      = "gpub1pggj7ard9eg82cjtv4u52epjx56nzwgjyg9zqwpdwpd0f9fvqla089ndw5g9hcsufad77fml2vlu73fk8q8sh8v72cza5p"
 21)
 22
 23func init(cur realm) {
 24	// OriginCaller must equal the operator address (post-genesis squat guard).
 25	testing.SetOriginCaller(validAddress)
 26
 27	// Register a validator and add the proposal
 28	valopers.Register(cross(cur), validMoniker, validDescription, validServerType, validAddress, validPubKey)
 29}
 30
 31func main() {
 32	println(valopers.Render(""))
 33}
 34
 35// Output:
 36//
 37// # Welcome to the **Valopers** realm
 38//
 39// ## πŸ“Œ Purpose of this Contract
 40//
 41// The **Valopers** contract is designed to maintain a registry of **validator profiles**. This registry provides essential information to **GovDAO members**, enabling them to make informed decisions when voting on the inclusion of new validators into the **valset**.
 42//
 43// By registering your validator profile, you contribute to a transparent and well-informed governance process within **gno.land**.
 44//
 45// ---
 46//
 47// ## πŸ“ How to Register Your Validator Node
 48//
 49// To add your validator node to the registry, use the [**Register**](/r/gnops/valopers$help&func=Register) function with the following parameters:
 50//
 51// - **Moniker** (Validator Name)
 52//   - Must be **human-readable**
 53//   - **Max length**: **32 characters**
 54//   - **Allowed characters**: Letters, numbers, spaces, hyphens (**-**), and underscores (**_**)
 55//   - **No special characters** at the beginning or end
 56//
 57// - **Description** (Introduction & Validator Details)
 58//   - **Max length**: **2048 characters**
 59//   - Must include answers to the questions listed below
 60//
 61// - **Server Type** (Infrastructure Type)
 62//   - Must be one of the following values:
 63//     - **cloud**: For validators running on cloud infrastructure (AWS, GCP, Azure, etc.)
 64//     - **on-prem**: For validators running on on-premises infrastructure
 65//     - **data-center**: For validators running in dedicated data centers
 66//
 67// - **Validator Address**
 68//   - Your validator node's address
 69//
 70// - **Validator Public Key**
 71//   - Your validator node's public key
 72//
 73// ### ✍️ Required Information for the Description
 74//
 75// Please provide detailed answers to the following questions to ensure transparency and improve your chances of being accepted:
 76//
 77// 1. The name of your validator
 78// 2. Networks you are currently validating and your total AuM (assets under management)
 79// 3. Links to your **digital presence** (website, social media, etc.). Please include your Discord handle to be added to our main comms channel, the gno.land valoper Discord channel.
 80// 4. Contact details
 81// 5. Why are you interested in validating on **gno.land**?
 82// 6. What contributions have you made or are willing to make to **gno.land**?
 83//
 84// ---
 85//
 86// ## πŸ”„ Updating Your Validator Information
 87//
 88// After registration, you can update your validator details using the **update functions** provided by the contract.
 89//
 90// ---
 91//
 92// ## πŸ“’ Submitting a Proposal to Join the Validator Set
 93//
 94// Once you're satisfied with your **valoper** profile, you need to notify GovDAO; only a GovDAO member can submit a proposal to add you to the validator set.
 95//
 96// If you are a GovDAO member, you can nominate yourself by executing the following function: [**r/gnops/valopers/proposal.ProposeNewValidator**](/r/gnops/valopers/proposal$help&func=ProposeNewValidator)
 97//
 98// This will initiate a governance process where **GovDAO** members will vote on your proposal.
 99//
100// ---
101//
102// πŸš€ **Register now and become a part of gno.land’s validator ecosystem!**
103//
104// Read more: [How to become a testnet validator](https://gnops.io/articles/guides/become-testnet-validator/) <!-- XXX: replace with a r/gnops/blog:xxx link -->
105//
106// Disclaimer: Please note, registering your validator profile and/or validating on testnets does not guarantee a validator slot on the gno.land beta mainnet. However, active participation and contributions to testnets will help establish credibility and may improve your chances for future validator acceptance. The initial validator amount and valset will ultimately be selected through GovDAO governance proposals and acceptance.
107//
108// ---
109//
110//
111//
112//  * [test-1](/r/gnops/valopers:g1sp8v98h2gadm5jggtzz9w5ksexqn68ympsd68h) - [profile](/r/demo/profile:u/g1sp8v98h2gadm5jggtzz9w5ksexqn68ympsd68h)