Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions deliveries/offline_elction_tool_Milestone1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Milestone Delivery :mailbox:

> Only the GitHub account, which is responsible for the pull request of the accepted application is allowed to submit milestones. Don't remove any of the mandatory parts presented in bold letters or as headlines!


**The delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grants-Program/blob/master/docs/Support%20Docs/milestone-deliverables-guidelines.md).**

* **PR Link:** https://github.com/w3f/Grants-Program/pull/2623
* **Milestone Number:** 1

**Deliverables**
> Please provide a list of all deliverables of the milestone extracted from the initial application and a link to the deliverable itself. Ideally all links inside the below table should include a commit hash, which will be used for testing. If you don't provide a commit hash, we will work off the default branch of your repository. Thus, if you plan on continuing work after delivery, we suggest you create a separate branch for either the delivery or your continuing work.



| Number | Deliverable | Link | Notes |
| ------------- | ------------- | ------------- |------------- |
| **0a.** | License |https://github.com/antiers-solutions/polkadot-staking-miner/blob/feat/offline-election-prediction-tool/LICENSE |Apache 2.0 / GPLv3 / MIT / Unlicense. |
| **0b.** | Documentation |https://github.com/antiers-solutions/polkadot-staking-miner/blob/feat/offline-election-prediction-tool/offline-election-prediction-staking/README.md |Inline code documentation and a tutorial explaining how to simulate an election with default or custom inputs via CLI. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Missing instructions on the format of the input JSON and examples of its usage
  • Inconsistent examples, e.g. --use-cached-data without --cache-dir or --uri instead of --chain-uri
  • Instructions for Docker
  • desired-validators refers to the size of the active set? It's not clear
  • Is there a reason all examples are for 19 validators?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @michalisFr,

  • The missing instructions for the input JSON format have been added.
  • All inconsistent examples have been corrected.
  • Docker usage instructions are now included as well.
  • Yes, the desired-validators parameter refers to the size of the active set.
  • There’s no fixed limit of 19 validators — you can specify any number. If not provided, the tool will automatically fetch the active validator count from the chain.

| **0c.** | Testing and Testing Guide |https://github.com/antiers-solutions/polkadot-staking-miner/blob/feat/offline-election-prediction-tool/offline-election-prediction-staking/tests/integration_tests.rs | Unit tests for the election logic; guide on how to run and interpret the results. |
| **0d.** | Docker |https://github.com/antiers-solutions/polkadot-staking-miner/blob/feat/offline-election-prediction-tool/offline-election-prediction-staking/README.md | Dockerfile to build and run the CLI simulator locally. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This links to the README instead of the Dockerfile

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

| 1. | Core Election Engine | https://github.com/antiers-solutions/polkadot-staking-miner/tree/feat/offline-election-prediction-tool/offline-election-prediction-staking| Updated version of the existing election script with support for accurate simulation of on-chain validator election logic using Phragmén and other supported algorithms. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sigurpol Could you please provide a review?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I will review it, but after Polkadot AHM so realistically not before the end of this week if it's OK for you.
@Ipsa11 I am assuming we want to merge https://github.com/paritytech/polkadot-staking-miner/antiers-solutions:polkadot-staking-miner:feat/offline-election-prediction-tool branch into main, is it correct ? If it's the case, can we have a PR against main branch so it's easier to review for me as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sigurpol
Yes, we want it to be merged into the main branch. The PR for the same is [https://github.com/paritytech/polkadot-staking-miner/pull/1189]

| 2. | Custom Inputs Support |https://github.com/antiers-solutions/polkadot-staking-miner/tree/feat/offline-election-prediction-tool/offline-election-prediction-staking | Allows passing custom active set size, voters, candidates, and their stakes via JSON input. |
Loading