Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
fix instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
behaviary committed Dec 19, 2019
1 parent 6e21edd commit 9c334c3
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 76 deletions.
22 changes: 4 additions & 18 deletions GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,11 @@

### Weekly calls on Mondays

* We will reset genesis roughly every three weeks.
* Time will alternate each week to accommodate different hemispheres
* We establish a new genesis each week together and start nodes on the calls
* You do stuff during the week and submit here using the issue templates
* We assign points at the end of the week and reveal the leaderboard each Monday
* At the end of the competition, we will convert the points to tokens and perform KYC required by your country of residence to assign them to you.

### Submission Types

* P3 (Test) - lowest severity of bug or test that you can run.
Example might be a bug you found in our scripts that start a node.
* P2 (Bend) - medium severity bug or test.
Example might be a bug you find in the actual core code that causes the system to lag (but not stop)
* P1 (Break) - highest severity bug or epic thing you’ve built.
Example might be a consensus breaking bug.
Example might be a fully functioning delegation suite of smart contracts working on the system

## Rules

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.
Expand All @@ -30,13 +19,11 @@ 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 to break our tools and systems.
* 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)
* Collude with other validators to try to sign bad transactions or to validate bad blocks and try to corrupt the system
* Review the code for vulnerabilities and try to exploit them
* Write reports on your experience and send them to us publicly
* Complain about things that need fixing or cleanup!

Expand All @@ -50,18 +37,18 @@ Here are some examples and we will trust you to follow the spirit of the law:

## Points Overview

In order to get points, you will need to submit an issue on GitHub for each problem you find and each test you run. ([https://github.com/nearprotocol/stakewars](https://github.com/nearprotocol/stakewars))
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))

**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.
* We update the leaderboard at least every week, but it may be more frequently based on submissions.

## Agreement and edge cases

Expand All @@ -76,7 +63,6 @@ Since we hope all of you will do this, we’ve created an issue for this in the

We want...

* You to break our system in a way that we can permanently fix it!
* You to build things that solve your own problems as future validators on the network
* To put the last year or so of hard work in front of our community to try it out
* To find glaring flaws in our systems, designs and code
Expand Down
25 changes: 25 additions & 0 deletions LEADERBOARD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# LEADERBOARD

| name | total points |
|---------------|--------------|
| marco-sundsk | 3200 |
| mbucci | 1500 |
| hoekevin | 900 |
| sweetpotatoz | 500 |
| k9thebeast | 300 |
| StakerSpace | 200 |
| bgapinski-bt | 200 |
| andreisid | 200 |
| bentiancai629 | 100 |
| victorxu0411 | 100 |
| wjdfx | 100 |
| zavodil | 100 |
| xz-cn | 100 |
| novy4 | 100 |
| winslyin | 100 |
| pranaymohan | 100 |
| stakehost | 100 |
| zhanglianghui | 100 |
| ferat8 | 100 |
| stakery | 100 |
| joesixpack | 100 |
82 changes: 25 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,33 @@
# **Next call is Decmber 16th at 8am PST**
# **Next call is December 30th at 8am PST**

[Here is the link](https://zoom.us/j/809548310?pwd=dDUvM2g4Z1NPVWMxQWRSTjlRTXRUZz09
)
[Here is the link](https://zoom.us/j/809548310?pwd=dDUvM2g4Z1NPVWMxQWRSTjlRTXRUZz09)

Meeting ID: 809 548 310
Password: 045822

LEADERBOARD
Accounts.csv is in this repo for next genesis.

| name | total points |
|---------------|--------------|
| marco-sundsk | 3200 |
| mbucci | 1500 |
| hoekevin | 900 |
| sweetpotatoz | 500 |
| k9thebeast | 300 |
| StakerSpace | 200 |
| bgapinski-bt | 200 |
| andreisid | 200 |
| bentiancai629 | 100 |
| victorxu0411 | 100 |
| wjdfx | 100 |
| zavodil | 100 |
| xz-cn | 100 |
| novy4 | 100 |
| winslyin | 100 |
| pranaymohan | 100 |
| stakehost | 100 |
| zhanglianghui | 100 |
| ferat8 | 100 |
| stakery | 100 |
| joesixpack | 100 |
[The wallet for Stake Wars](https://wallet.tatooine.nearprotocol.com)

Accounts.csv is in this repo for this week.
[Most recent update](https://youtu.be/2ySEOkRACig)

The wallet for Stake Wars: https://wallet.tatooine.nearprotocol.com
## The basics

## UPDATE Dec 13th
The first leg of Stake Wars led to us learning a ton. We made some mistakes, and we iterated based on your feedback. For that reason, we changed how points work. If you earned points for reporting bugs, you keep the points that you earned.

* We're restructuring the program to focus on finding bugs that are based on QA scenarios rather than security breaches and attacks.
* You can find these in `scenarios.md` in this repo. [HERE](./scenarios.md)
Moving forward, the way to earn points is to:

## UPDATE Nov 22nd
1. run test scenarios found in [scenarios.md](scenarios.md)
2. submit the scenario that you ran as an issue
3. participate by running a validating node each week

* We're using Github to collect genesis for this week. Please don't submit your keys for genesis if you can't make the call. Put in a PR againts accounts.csv with your changes.

## UPDATE Nov 20th

* sudo is no longer needed if you're on Mac, or if you're on linux and can run docker without sudo.

## UPDATE Nov 12th

* Just update the issue templates. We are now measuring severity internally since the templates were just confusing.
* The simplified submission process is: just follow the template, and we will add label.
* If we add the `help wanted` tag, you can fix it and receive tokens as part of the competition as well.
Soon, we will merge the Stake Wars network into TestNet. At that point, you can run all of the scenarios there for the same amounts of point.

## How to get started

Before you start, please make sure that you have a machine with
publicly routable ip address. Also please make sure you have docker
installed on your machine, or, if you prefer to run your node
without docker, follow the instructions [here](https://docs.nearprotocol.com/docs/local-setup/running-testnet)
to install the required packages.

Read the [guidelines document](GUIDELINES.md) first. It's not just legal mumbo-jumbo, it actually explains how this competition will be run and how to submit tests and bugs
Before you start, please make sure that you have or setup a machine with a publicly routable ip address. Also please make sure you have docker installed on your machine, or--if you prefer to run your node without docker--follow the instructions [here](https://docs.nearprotocol.com/docs/local-setup/running-testnet) to install the required packages.

Handy link for submitting genesis each week: [https://near.ai/genesis](https://near.ai/genesis). More about this in a moment.
Read the [guidelines document](/GUIDELINES.md) first. It's not just legal mumbo-jumbo, it actually explains how this competition will be run and how to submit tests and bugs

## Initialization

Expand Down Expand Up @@ -99,25 +61,31 @@ It will by default generate three key pairs in files `signer0_key.json`, `signer

## How to stake with a wallet generated account

**To get the local node started**
1. Make sure to clear out the ~/.near folder every week no matter what.
### To get the local node started

1. Make sure to clear out the ~/.near folder every week no matter what.
2. Run `scripts/start_stakewars.py --signer-keys --init --account-id=<YOUR_ACCOUNT_ID>`
3. Move accounts.csv into your ~/.near folder
4. Run `scripts/start_stakewars.py`

**To stake from the command line**
### To stake from the command line

1. `cd` into a directory you'd like to work in
2. Download `near-shell` with `npm install -g near-shell`
3. Run `npx create-near-app staking`
4. `cd` into `staking`
5. Set your NODE_ENV to tatooine. You can do this in `bash` with `export NODE_ENV=tatooine`
6. Run `near login` and follow the instructions that take you to the wallet.
5. Once you're logged in, you can stake. This is the command to stake:
7. Once you're logged in, you can stake. This is the command to stake:

```bash
near stake <YOUR_ACCOUNT_ID> <VALIDATOR_KEYS_PUBLIC_KEY> <AMOUNT>
```

**Check if it worked**
NOTE: `<AMOUNT>` can be set in NEAR

### Check if it worked

1. After running the command, you should see a transaction receipt that contains `status: { SuccessValue: '' }`. (As long as it is empty or contains a string you're good)
2. After two epochs, if you've staked enough, you will see the logs of your node appear with a `V/n` to tell you you're validating.
3. Run `near state <YOUR_ACCOUNT_ID>` and see if the amount you've staked is marked as locked.
Expand Down
12 changes: 11 additions & 1 deletion scenarios.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ Some of these scenarios will require reaching out to request something from us.

| scenario | point value |
|--------------------------|--------------|
| Time series challenge* | 1000 |
| Run 1 node (per week) | 100 |
| Run 10 nodes | 500 |
| Stake with 100 NEAR | 500 |
| Stake with 100k NEAR | 500 |
| Stake with 500k NEAR | 500 |
| Run in Kubernetes | 500 |
| Run in Windows | 100 |
| Run using Windows | 100 |

### \* Time Series Challenge

Connect to the network, work for 10 sec, disconnect from the network, wait for 10 sec, repeat.

Do this for values: 1 sec, 10 sec, and 60 sec.

This can be probably emulated through some Linux tool that blocks network connections, just have a cron job that blocks network for X seconds, then unblocks it for X sec, repeat.
20 changes: 20 additions & 0 deletions updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# UPDATES

## UPDATE Dec 13th

* We're restructuring the program to focus on finding bugs that are based on QA scenarios rather than security breaches and attacks.
* You can find these in `scenarios.md` in this repo. [HERE](./scenarios.md)

## UPDATE Nov 22nd

* We're using Github to collect genesis for this week. Please don't submit your keys for genesis if you can't make the call. Put in a PR againts accounts.csv with your changes.

## UPDATE Nov 20th

* sudo is no longer needed if you're on Mac, or if you're on linux and can run docker without sudo.

## UPDATE Nov 12th

* Just update the issue templates. We are now measuring severity internally since the templates were just confusing.
* The simplified submission process is: just follow the template, and we will add label.
* If we add the `help wanted` tag, you can fix it and receive tokens as part of the competition as well

0 comments on commit 9c334c3

Please sign in to comment.