From 42a20e59830333423638baa168219dd11c5db1da Mon Sep 17 00:00:00 2001 From: Stefano Pepe Date: Tue, 5 May 2020 09:15:57 -0700 Subject: [PATCH] New guidelines and scenarios (#149) * new guidelines and scenarios * updated VALIDATORS.md list --- GUIDELINES.md | 55 +++++++++++++++------------------------------- LEADERBOARD.md | 13 +++++++++-- README.md | 2 +- scenarios.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 86 insertions(+), 43 deletions(-) diff --git a/GUIDELINES.md b/GUIDELINES.md index abf5773..eb50975 100644 --- a/GUIDELINES.md +++ b/GUIDELINES.md @@ -1,59 +1,38 @@ -# Stake Wars Guidelines +# Stake Wars 2.0 Guidelines ## Format +This new phase of Stake Wars will test stake delegation to validators. The winners will be those validators who deploy reliable nodes and challenge the boundaries of Proof of Stake, by offering innovative delegation solutions that can attract the favor of Stake Wars participants. The larger the stake you will attract from real users, the bigger your success during the Stake Wars and beyond, when the MainNet will be running on your nodes. +NEAR Protocol will promote this initiative across all its channels, by progressively releasing Stake Wars to every user who owns a TestNet wallet. This will be a unique opportunity to attract NEAR adopters on your platform and grow your validator business. -## Rules +This is not going to be easy: we will deploy hard forks constantly, we will test your team reactivity in case of network issues, we will run benchmarks at the network level, and we will measure the strenght of the participants as a whole. +However, Stake Wars is not about doing things right or wrong. It is mostly about learning how smart contract-based delegation works, and get ready to run NEAR together. -This program is hard to create rules for, so we’re giving you guidelines and examples. Judges on our side will rate your submissions and assign points. +## Rules +There are no strict rules, rather guidelines and examples. Judges on NEAR side will rate your participation, and will update the [leaderboard](LEADERBOARD.md) every week with basic node information. -*If you are acting in good faith, you’re almost assuredly good. If you’re acting in bad faith, moderators will ban you from the competition.* +*If you are acting in good faith, you’re almost assuredly good. If you’re acting in bad faith, moderators will exclude you from the competition.* Here are some examples and we will trust you to follow the spirit of the law: ### DO… - * Check out the QA scenarios and run them on your system. -* Run a node or as many nodes as you can figure out how to run. -* Run any kind of benchmark you think is valuable -* Try staking in all sorts of ways. - * You will be rewarded for creativity, effort and magnitude of the submission. (For instance, if you get delegation to work for a bunch of small accounts) -* Write reports on your experience and send them to us publicly +* Read the documentation, and open GitHub issues if you find ways to improve it. +* Run your node like it's a production environment and you are staking with real funds. +* Run any kind of benchmark you think is valuable. +* Try staking in all sorts of ways + * You will be rewarded for creativity, effort and magnitude of the submission +* Write reports on your experience and send them to us publicly. * Complain about things that need fixing or cleanup! ### DON’T… - -* Do anything illegal to hack our stuff. +* Do anything illegal in order to hack our stuff. * Hack other peoples’ computers or use attack vectors that are outside of our control -* For example, if you add a keylogger to someone’s computer, that is showing a flaw in their Operational Security not a flaw in the system we’re building + * For example, if you add a keylogger to someone’s computer, that is showing a flaw in their Operational Security not a flaw in the system we’re building. * Harass people in any way. This includes community members and team members. -* Be a jerk - -## Points Overview - -In order to get points, you will need to submit an issue on GitHub for each test you run. ([https://github.com/nearprotocol/stakewars](https://github.com/nearprotocol/stakewars)) +* Be a jerk. -**GET STARTED:** You can all get the basic points for running a node (or nodes) and running an interesting benchmark. - -Since we hope all of you will do this, we’ve created an issue for this in the main repo: [https://github.com/nearprotocol/stakewars/issues/4](https://github.com/nearprotocol/stakewars/issues/4) - -### Here’s how points work - -* Check for test scenarios [scenarios](/SCENARIOS.md) -* You submit issues based on what you run into while attempting to run nodes to the GitHub repo identified above. -* We (a rotating panel of reviewers) assign points to whoever submitted based on the severity of bugs. -* The identity of the submitter must be associated with the submission by the end of the comp to be valid. Otherwise no points. - -## Agreement and edge cases - -* In addition, you will have to sign a program and token agreement for the reward of tokens based on points. This will happen at some point during the competition. -* You CAN get multiple rewards for running multiple nodes, BUT only for giving us valuable information about problems in our system. It’s still dependent on the severity of the bug or the value of the test you’ve created. For example… - * If you create a bunch of nodes and then just leave them up. No points. - * If you create a bunch of nodes to test a delegation contract you created, very valuable. Much points. Very wow. -* We’re not making it public what the translation from points to tokens is. This is mainly because we don’t want to commit to specific numbers upfront and be wrong. -* The point system allows us to create weights for bugs and tests. Our goal is to do this fairly and equitably. No funny business. ## Our Goals for this - We want... * You to build things that solve your own problems as future validators on the network diff --git a/LEADERBOARD.md b/LEADERBOARD.md index a7537df..3d81a16 100644 --- a/LEADERBOARD.md +++ b/LEADERBOARD.md @@ -1,5 +1,14 @@ -# LEADERBOARD -*From previous Stake Wars* +# STAKE WARS LEADERBOARD + +*Stake Wars 2.0 Leaderboard* + +| Validator name | Produced Blocks | Expected Blocks | Delegators | +|-----------------|:---------------:|:---------------:|:----------:| +| _WIP_ | 1 | 1 | 1 | + + + +*Stake Wars 1.0 Leaderboard* | name | total points | |---------------|--------------| diff --git a/README.md b/README.md index 24d175b..511b89a 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The goals are: If you haven't already: 1. Join our Telegram validator channel [here](https://t.me/joinchat/Msj7FBRzcys3zb6J79u5bw) for general discussion -2. Join our Discord channel [here](https://discord.gg/zmwQd5) for troubleshooting and technical discussion +2. Join our Discord channel [here](https://discord.gg/ZMPr3VB) for troubleshooting and technical discussion ## The basics If you are just curious, follow the quickstart guides below, and you'll be ready in a few minutes. However, this is just a shortcut to becoming familiar with high-level concepts of the protocol, not the most secure and efficient way to do it! diff --git a/scenarios.md b/scenarios.md index 4fcb99b..d7389d9 100644 --- a/scenarios.md +++ b/scenarios.md @@ -1,5 +1,60 @@ # Stake Wars 2.0 Test Scenarios -Please note that Stake Wars is not rewarding any node-related test scenarios. Instead, we want you to test the functionalities of the delegation smart contract, by performing the following actions: + +## Basic Participation Needs +This second phase of NEAR Stake Wars will try to break the delegation of tokens to Validators. +Validators still have to properly run their nodes infrastructure, and get familiar with the activities below: +1. Professionally deploy and run the node +2. Update the node software +3. Deploy the Delegation smart contract +4. Enroll your Validator on the Delegator App +5. Update the Delegation smart contract + +### 1.Professionally deploy and run the node +- Pull `nearcore` from [https://github.com/nearprotocol/nearcore](https://github.com/nearprotocol/nearcore). To run on BetaNet you have to checkout on the `beta` branch +- Build `nearcore` launching `make release` +- Install `nearup` from [https://github.com/near/nearup](https://github.com/near/nearup) +- Run the node from your compiled binary, properly using `--nodocker` and `--binary-path` +- Monitor your node performance, by measuring `num_expected_blocks` and `num_produced_blocks` from the `validators` method on the JSON RPC - [here more info](https://docs.nearprotocol.com/docs/interaction/rpc) +- Design and build your own redundancy/availability solutions for your nodes + +**Heads up:** running a node is up to your experience, these are not requirements. As an example, you may build your own docker image, or avoid using `nearup` completely. + +### 2.Update the node software +- Download and deploy the weekly release of `nearcore` from the `beta` branch. It is normally merged by NEAR core team on Monday at 5:30pm Pacific and deployed on `DevNet`. +- In case of a planned hard-fork, restart the node with the new release at the programmed time +- Update the node without missing more than 10% of the `num_expected_blocks` (to avoid being kicked out in the next epoch) +- Promptly Re-stake if your node misses the target and will be kicked out + +**Heads up:** as of today, BetaNet goes through a reset and hard-fork every Tuesday at 6pm Pacific. More details can be found in the documentation pages at [docs.near.org/validator/staking-overview](https://docs.near.org/docs/validator/staking-overview) + + +### 3.Deploy the Delegation smart contract +_Note: this part is still work in progress_ +- Clone and compile the [Staking Pool contract](https://github.com/near/initial-contracts/tree/master) on the operator machine +- Deploy the contract with `near-shell` +- Configure the contract with the exact node id and its validator public key +- Stake delegating your BetaNet funds to the contract + + +### 4. Enroll your Validator in the Delegator App +Once your contract is ready, you can issue a pull request to the file [VALIDATORS.md](VALIDATORS.md), including your information at the bottom of the list. This file will automatically enroll your node in the Stake Wars 2.0, and will help users to find your staking pool. + + +## Advanced Participation Opportunities +Stake Wars is an opportunity to explore the potential of smart contracts for delegation. Ideally, every Validator could release its very own staking pool contract, with unique features in terms of: +- Lock duration and liquidity +- Variable validation fees +- Compounding rewards +- Governance and community voting +- Bounties and community projects +- Rewarded custody services + +Our goal, as validators, is to make end-users used with this new way of staking tokens. +Their actions will be quite basic: - deposit and withdraw tokens - lock and unlock tokens in the staking -- measure the rewards +- measure their rewards + + +## Stake Wars Rewards +Please note that Stake Wars 2.0 is not rewarding any basic scenarios, as they were already tested and rewarded during the first phase. At this stage, we suggest participating Validators to test the delegation via smart contracts and, once ready, leverage this opportunity to join the MainNet Restricted along with their users.