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

Commit

Permalink
add accounts.csv and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
behaviary committed Nov 22, 2019
1 parent 5985a4b commit 57a521b
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 22 deletions.
118 changes: 96 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
# **WE ARE LAUNCHING STAKE WARS ON MONDAY, NOV 4th AT 8AM PST!**
# **NEXT CALL IS ON MONDAY, NOV 25th AT 6PM PST!**

Here is the last call recorded: https://youtu.be/52mY0sWGJRU?t=13

accounts.csv for the second week can be downloaded here: https://docs.google.com/spreadsheets/d/1WwuwTP_Ng6xdJLMqE5p6NQpnTmJyIorc1tKiYiQUkxY/edit#gid=0
(It's called week 1 because we were indexing from 0)

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

~~~LINK TO NEXT CALL~~~
Topic: Stake Wars Genesis Meeting
Time: This is a recurring meeting Meet anytime
Join Zoom Meeting
https://zoom.us/j/810242088
~~~~~~~~~~~~~~~~~~~~~~~
## 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.
## How to get started
Expand All @@ -8,51 +36,84 @@ 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.
Make sure to read the *guidelines document* in this repo. It's not just legal mumbo-jumbo, it actually explains how this competition will be run and how to submit tests and bugs

Handy link for submitting genesis each week: [https://near.ai/genesis](https://near.ai/genesis)
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
## Requirements

Before you start, please make sure that you have a machine with publicly routable ip address.
Handy link for submitting genesis each week: [https://near.ai/genesis](https://near.ai/genesis). More about this in a moment.
## Initialization
To start, checkout nearcore repository:
```bash
git clone https://github.com/nearprotocol/nearcore.git
cd nearcore
```
In nearcore, generate node key and validator key by
Next, generate node key and validator key by
```bash
sudo ./scripts/start_stakewars.py --init --account-id=<your_account_id>
./scripts/start_stakewars.py --init --account-id=<your_account_id>
```
Here for account id, enter the account id you want.
Here for account id, enter the account id you want to use for staking.
Observe that `node_key.json` and `validator_key.json` are
generated in `~/.near`.
Please note that if you would like to generate keypairs for your account,
Please note that if you would like to generate key pairs for your account,
you can also do it using the following command:
```bash
sudo ./scripts/start_stakewars.py --init --signer-keys --account-id=<your_account_id>
./scripts/start_stakewars.py --init --signer-keys --account-id=<your_account_id>
```
It will by default generate three keypairs in files `signer0_key.json`, `signer1_key.json`, and
It will by default generate three key pairs in files `signer0_key.json`, `signer1_key.json`, and
`signer2_key.json`.
## Upload your information
## 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.
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**
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:
```bash
near stake <YOUR_ACCOUNT_ID> <VALIDATOR_KEYS_PUBLIC_KEY> <AMOUNT>
```
**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.
### Difference between different types of keys
You might wonder why there are three different types of keys and how they can be used. Here is a short explanation:
Now in the typeform found [here](https://near.ai/genesis) enter the relevant information, including:
* `node_key` is used to sign messages sent between nodes and you don't need to worry about them.
* `validator_key` is the key that your validating node will use to sign the blocks that they produce, as well as approvals of other blocks.
Notice that this key is not stored in state and cannot be used to sign transactions.
* `signer_key` is used to sign transactions originated from your account. They are not related to running a validating node per se,
but if you want to do anything with your account on the network, you need to have the corresponding private key(s) to send transactions.
## Uploading info for genesis
We will be using a different genesis every week.
Fill your information in the typeform found at [near.ai/genesis](https://near.ai/genesis). You will be asked for:
* `account_id`: the account id you used in the previous step.
* `full_pks`: the public keys you want to use for your account. Please make sure that your have the corresponding private keys.
* If, in the initialization step, you generated signer keys this is where you should put the public keys.
* `full_pks`: the public keys you want to use for your account. **If you enter multiple keys here, please make sure that they are comma separated**. Please make sure that your have the corresponding private keys.
* If, in the initialization step, you generated signer keys this is where you should put the public keys.
* If you would like to use near-shell, make sure that your have your keys in the proper place (`~/neardev/default` for example).

* `amount`: please enter `10000000000000000000`.
* `is_treasury`: please enter `false`.
* `validator_stake`: please enter `10000000000000000000`.
Expand All @@ -65,9 +126,9 @@ For other fields, please leave the blank.
## Download the spreadsheet
When everyone who wants to participate finishes filling in their information,
download the form as a csv file and upload to `~/.near/accounts.csv` on your node.
download the spreadsheet as a csv file and upload to `~/.near/accounts.csv` on your node.
We will host thre csv for you to download during the calls.
We will host the three csv for you to download during the calls.
If you are running a node on gcloud, the following command might be useful:
Expand All @@ -81,8 +142,21 @@ on your node and then transfer it to `~/.near`.
## Start your node
Finally, to start your node, run
Finally, to start your node, run:
```bash
sudo ./scripts/start_stakewars.py
./scripts/start_stakewars.py
```
Or if you're running locally on MacOS
```bash
./scripts/start_stakewars.py
```
## Stop your node
To stop your node, run:
```bash
./scripts/stop.py
```
9 changes: 9 additions & 0 deletions accounts.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
genesis_time,account_id,regular_pks,privileged_pks,foundation_pks,full_pks,amount,is_treasury,validator_stake,validator_key,peer_info,smart_contract,lockup,vesting_start,vesting_end,vesting_cliff
2019-11-25T02:10:00.000000Z,far,,,,ed25519:32zVgoqtuyRuDvSMZjWQ774kK36UTwuGRZMmPsS6xpMy,100178604570099000000000,false,10000000000000000000,ed25519:7WwXZVD8TGhj2DGtCPpgQhqcbLN6yB2YgLxW7CGuVWGw,ed25519:6P39XGzWBCHhvGhWg2TpMFzsQtxDKz7RdkpHdW9h8Xad@34.67.252.132:24567,,,,,
,near,,,,ed25519:DuZSg3DRUQDiR5Wvq5Viifaw2FXPimer2omyNBqUytua,101001765660296000000000,true,0,,,,,,,
,test,,,,ed25519:H8s1j365hyHcbcm2zd7PGHS9SS3T9yCg54qTLbt1uifW,100000000000000000000000,false,0,,,,,,,
,far2,,,,ed25519:G4mrAVur5kncNw4Mvt1QhD9AP6M1LALeHANjeziGSJ5K,10000000000000000000,false,10000000000000000000,ed25519:7i8kCFmZixnQnAHWSxSzjk7DAWK3Dn9qS1B9xZyxU96q,ed25519:HBhnKcw1vPvNdvU6uFp9DeqNVYJNMd7ZTpcEUBdxkB5T@34.74.9.7:24567,,,,,
,far3,,,,ed25519:HFdUJWB7DxAnjhJM6HdET24Zcu4s8QX1Et1XeeYpH5Rj,10000000000000000000,false,10000000000000000000,ed25519:3JAWWFcBNFWjdxuYuZxSJw9WbcXfcYLsmtL6aXVLTshU,ed25519:GEWykW4RWkgaKQjc2UXawiZnXAeUShZi4Kxh4SgZihye@34.95.36.29:24567,,,,,
,far4,,,,ed25519:DBj65WSByCiBtCbbL14Hy5rW8TnDn1YhuNjQvQwZAoC1,10000000000000000000,false,10000000000000000000,ed25519:GZoAEa1PKm7NJcc2ysJnkPSRKYj3tbyFphgqAiLACqCU,ed25519:2W1VN16wj6ujLf6dPyHGURvrZkgJF9WMYWJT9iHKt3Wc@34.95.174.83:24567,,,,,
,far5,,,,ed25519:HUjF55gr9HGgq1tKYBdcviVK7a3rYGC5SJESYZsFpMbH,10000000000000000000,false,10000000000000000000,ed25519:AxP5wf7w3qWhtg2vt1WcSNdFDrRd8AXsnFeE9gfuDus5,ed25519:BzNGFkKJJF9dNyV2KeXtKC9u2n22DC7EeVerzcnsyQ2v@35.228.240.15:24567,,,,,
,far6,,,,ed25519:GF2F6ysC9Sd2fMdWkzSG2ZyYvb8A1exg5cgAQuXkYW8e,10000000000000000000,false,10000000000000000000,ed25519:7kZTxKYyrj2G75ky96tjfpVjHxrcKVpQPzfyUeWXfE4n,ed25519:5RrbVojmrWvQkot2smuw2ddnUgmzgSBcxKTHUu22iY26@35.195.39.208:24567,,,,,

0 comments on commit 57a521b

Please sign in to comment.