Skip to content

Commit f927fad

Browse files
authored
cleanup todos with tracking issues (#996)
1 parent b186d04 commit f927fad

File tree

3 files changed

+18
-21
lines changed

3 files changed

+18
-21
lines changed

src/commands/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ pub struct MonitorConfig {
169169
pub dry_run: bool,
170170
}
171171

172-
/// TODO(niklasad1): Add solver algorithm configuration to the monitor command.
172+
/// TODO: make `solver algorithm` configurable https://github.com/paritytech/polkadot-staking-miner/issues/989
173173
#[derive(Debug, Clone, clap::Parser)]
174174
#[cfg_attr(test, derive(PartialEq))]
175175
pub struct ExperimentalMultiBlockMonitorConfig {

src/dynamic/multi_block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ where
216216
all_targets: target_snapshot.clone(),
217217
voter_pages: voter_pages.clone(),
218218
pages: n_pages,
219-
// TODO: get from runtime/configs.
219+
// TODO: https://github.com/paritytech/polkadot-staking-miner/issues/995
220220
do_reduce: false,
221221
round,
222222
};

src/static_types/multi_block.rs

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,30 @@ impl_u32_parameter_type!(max_length, MaxLength);
1818
pub mod node {
1919
use super::*;
2020

21+
// TODO: validate config https://github.com/paritytech/polkadot-staking-miner/issues/994
2122
frame_election_provider_support::generate_solution_type!(
2223
#[compact]
2324
pub struct NposSolution16::<
2425
VoterIndex = u16,
2526
TargetIndex = u16,
2627
Accuracy = Percent,
27-
MaxVoters = ConstU32::<22500> // TODO: fetch
28+
MaxVoters = ConstU32::<22500>
2829
>(16)
2930
);
3031

3132
#[derive(Debug)]
3233
pub struct MinerConfig;
3334

35+
// TODO: validate config https://github.com/paritytech/polkadot-staking-miner/issues/994
3436
impl multi_block::unsigned::miner::MinerConfig for MinerConfig {
3537
type AccountId = AccountId;
3638
type Solution = NposSolution16;
37-
// TODO: make it configurable via CLI/data from the node.
39+
// TODO: make it configurable via CLI https://github.com/paritytech/polkadot-staking-miner/issues/989
3840
type Solver = SequentialPhragmen<AccountId, Accuracy>;
3941
type Pages = Pages;
40-
// TODO: make it configurable via CLI/data from the node.
4142
type MaxVotesPerVoter = ConstU32<16>;
4243
type MaxWinnersPerPage = MaxWinnersPerPage;
4344
type MaxBackersPerWinner = MaxBackersPerWinner;
44-
// TODO: make it configurable via CLI/data from the node.
4545
type MaxBackersPerWinnerFinal = ConstU32<{ u32::MAX }>;
4646
type VoterSnapshotPerBlock = VoterSnapshotPerBlock;
4747
type TargetSnapshotPerBlock = TargetSnapshotPerBlock;
@@ -54,31 +54,30 @@ pub mod polkadot {
5454
use super::*;
5555
use frame_election_provider_support::SequentialPhragmen;
5656

57-
// TODO: not tested, not sure whether the accuracy will be changed to percent as well.
57+
// TODO: validate config https://github.com/paritytech/polkadot-staking-miner/issues/994
5858
frame_election_provider_support::generate_solution_type!(
5959
#[compact]
6060
pub struct NposSolution16::<
6161
VoterIndex = u32,
6262
TargetIndex = u16,
6363
Accuracy = PerU16,
64-
MaxVoters = ConstU32::<22500> // TODO: fetch
64+
MaxVoters = ConstU32::<22500>
6565
>(16)
6666
);
6767

6868
#[derive(Debug)]
6969
pub struct MinerConfig;
7070

71+
// TODO: validate config https://github.com/paritytech/polkadot-staking-miner/issues/994
7172
impl multi_block::unsigned::miner::MinerConfig for MinerConfig {
7273
type AccountId = AccountId;
7374
type Solution = NposSolution16;
74-
// TODO: make it configurable via CLI/data from the node.
75+
// TODO: make it configurable via CLI https://github.com/paritytech/polkadot-staking-miner/issues/989
7576
type Solver = SequentialPhragmen<AccountId, Accuracy>;
7677
type Pages = Pages;
77-
// TODO: make it configurable via CLI/data from the node.
7878
type MaxVotesPerVoter = ConstU32<16>;
7979
type MaxWinnersPerPage = MaxWinnersPerPage;
8080
type MaxBackersPerWinner = MaxBackersPerWinner;
81-
// TODO: make it configurable via CLI/data from the node.
8281
type MaxBackersPerWinnerFinal = ConstU32<{ u32::MAX }>;
8382
type VoterSnapshotPerBlock = VoterSnapshotPerBlock;
8483
type TargetSnapshotPerBlock = TargetSnapshotPerBlock;
@@ -91,31 +90,30 @@ pub mod kusama {
9190
use super::*;
9291
use frame_election_provider_support::SequentialPhragmen;
9392

94-
// TODO: not tested, not sure whether the accuracy will be changed to percent as well.
93+
// TODO: validate config https://github.com/paritytech/polkadot-staking-miner/issues/994
9594
frame_election_provider_support::generate_solution_type!(
9695
#[compact]
9796
pub struct NposSolution24::<
9897
VoterIndex = u32,
9998
TargetIndex = u16,
10099
Accuracy = PerU16,
101-
MaxVoters = ConstU32::<12500> // TODO: fetch/validate
100+
MaxVoters = ConstU32::<12500>
102101
>(24)
103102
);
104103

105104
#[derive(Debug)]
106105
pub struct MinerConfig;
107106

107+
// TODO: validate config https://github.com/paritytech/polkadot-staking-miner/issues/994
108108
impl multi_block::unsigned::miner::MinerConfig for MinerConfig {
109109
type AccountId = AccountId;
110110
type Solution = NposSolution24;
111-
// TODO: make it configurable via CLI/data from the node.
111+
// TODO: make it configurable via CLI https://github.com/paritytech/polkadot-staking-miner/issues/989
112112
type Solver = SequentialPhragmen<AccountId, Accuracy>;
113113
type Pages = Pages;
114-
// TODO: make it configurable via CLI/data from the node.
115114
type MaxVotesPerVoter = ConstU32<24>;
116115
type MaxWinnersPerPage = MaxWinnersPerPage;
117116
type MaxBackersPerWinner = MaxBackersPerWinner;
118-
// TODO: make it configurable via CLI/data from the node.
119117
type MaxBackersPerWinnerFinal = ConstU32<{ u32::MAX }>;
120118
type VoterSnapshotPerBlock = VoterSnapshotPerBlock;
121119
type TargetSnapshotPerBlock = TargetSnapshotPerBlock;
@@ -128,31 +126,30 @@ pub mod westend {
128126
use super::*;
129127
use frame_election_provider_support::SequentialPhragmen;
130128

131-
// TODO: not tested, not sure whether the accuracy will be changed to percent as well.
129+
// TODO: validate config https://github.com/paritytech/polkadot-staking-miner/issues/994
132130
frame_election_provider_support::generate_solution_type!(
133131
#[compact]
134132
pub struct NposSolution16::<
135133
VoterIndex = u32,
136134
TargetIndex = u16,
137135
Accuracy = PerU16,
138-
MaxVoters = ConstU32::<22500> // TODO: fetch/validate
136+
MaxVoters = ConstU32::<22500>
139137
>(16)
140138
);
141139

142140
#[derive(Debug)]
143141
pub struct MinerConfig;
144142

143+
// TODO: validate config https://github.com/paritytech/polkadot-staking-miner/issues/994
145144
impl multi_block::unsigned::miner::MinerConfig for MinerConfig {
146145
type AccountId = AccountId;
147146
type Solution = NposSolution16;
148-
// TODO: make it configurable via CLI/data from the node.
147+
// TODO: make it configurable via CLI https://github.com/paritytech/polkadot-staking-miner/issues/989
149148
type Solver = SequentialPhragmen<AccountId, Accuracy>;
150149
type Pages = Pages;
151-
// TODO: make it configurable via CLI/data from the node.
152150
type MaxVotesPerVoter = ConstU32<16>;
153151
type MaxWinnersPerPage = MaxWinnersPerPage;
154152
type MaxBackersPerWinner = MaxBackersPerWinner;
155-
// TODO: make it configurable via CLI/data from the node.
156153
type MaxBackersPerWinnerFinal = ConstU32<{ u32::MAX }>;
157154
type VoterSnapshotPerBlock = VoterSnapshotPerBlock;
158155
type TargetSnapshotPerBlock = TargetSnapshotPerBlock;

0 commit comments

Comments
 (0)