Skip to content

Commit 4fe7feb

Browse files
authored
Min conditions (#8)
* split script to two parts * update ftso list * read data from chain * minimal conditions info 251 * initial data epoch 252 * min conditions info epoch 252 * initial nodes data epoch 253 * min conditions epoch 253 * initial data 254 * min conditiosn info epoch 254 * initial data epoch 255 * min conditions info epoch 255 * initial data epoch 256 * min conditions info epoch 256 * initial nodes data 257 * min conditiosn data epoch 257 * initial nodes data epoch 258 * min conditions info epoch 258 * nodes initial data epoch 259 * min conditions info 259 * initial nodes data 260 * min conditions info 260 * initial data 261 * min conditions info 261 * initial nodes data 262 * min conditions initial data epoch 262 * initial nodes data 263 * min conditions info 263 * initial data 264 * min conditions info epoch 264 * update readme * rename generated files
1 parent e394ba9 commit 4fe7feb

File tree

32 files changed

+70476
-312
lines changed

32 files changed

+70476
-312
lines changed

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,36 @@ For the fastest execution `RPC` with unlimited number of requests should be used
3232
```bash
3333
yarn
3434
````
35-
- Run the calculating staking rewards process
35+
- Calculate initial nodes data
3636
```bash
37-
yarn process-staking-rewards
37+
yarn prepare-initial-data
38+
```
39+
- Calculate staking rewards
40+
```bash
41+
yarn calculate-staking-rewards
3842
```
43+
Note that for the second part of process to succeed `reward-distribution-data.json` for a given reward epoch should be present in the [FSP Rewards repository](https://github.com/flare-foundation/fsp-rewards/tree/main).
44+
3945
You can also run it with optional parameters from [file](./src/processProviders.ts) (e.g. `yarn process-staking-rewards -b 8 -f 111`), which will override parameters set in the configuration file.
4046

4147
For each run output of the process is in folder `generated-files/reward-epochs-<REWARD_EPOCH>`.
4248

4349
### Verifying the results
44-
To verify the official results posted in this repository one needs to update its configuration file with values from the `configFileData` object of a `data.json` file for some reward epoch.
50+
To verify the official results posted in this repository one needs to update configuration file with values from the `configFileData` object of a `data.json` file for a chosen reward epoch.
51+
4552
To verify the results for the reward epochs from 126 to 243 inclusive one needs to use branch `version-1`.
53+
To verify the results for the reward epochs from 244 to 264 inclusive one needs to use branch `version-2`.
54+
For both branches one should run the following process
55+
```bash
56+
yarn process-staking-rewards
57+
```
58+
59+
To replicate minimal conditions info files for reward epochs from 251 to 264 inclusive one should use branch `min-conditions-info` and run the following processes
60+
```bash
61+
yarn prepare-initial-data
62+
yarn calculate-staking-rewards
63+
```
64+
4665

4766
### Data for distributing rewards
4867
Rewards will be distributed every four reward epochs, which means that every 14 days reward amounts from the past four reward epochs will be summed. This is achieved by running the process

0 commit comments

Comments
 (0)