Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DNM] Used for obtaining an image for versi with all the fixes #7084

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bbd049d
Approval-voting restart
alexggh Dec 4, 2024
2e7a7fd
Populate topology when finality is lagging behind current session
alexggh Dec 13, 2024
24f8fdd
Fix importing of duplicate assingmnents
alexggh Dec 20, 2024
443309f
Fix import duplicate on restart
alexggh Dec 20, 2024
3eb2489
Reschedule wakeup
alexggh Dec 20, 2024
4e89eb1
Merge remote-tracking branch 'origin/master' into alexggh/approval_vo…
alexggh Dec 20, 2024
7d4781c
Fix in order
alexggh Dec 20, 2024
1346e76
Add unittest
alexggh Dec 20, 2024
17f8b15
Delete prdoc/pr_6729.prdoc
alexggh Dec 20, 2024
5afa9c9
Update polkadot/node/core/approval-voting/src/lib.rs
alexggh Jan 6, 2025
f53cdee
Update polkadot/node/core/approval-voting/src/lib.rs
alexggh Jan 6, 2025
4e2788b
Minor fixes
alexggh Jan 7, 2025
a49f7e0
Update polkadot/node/core/approval-voting/src/persisted_entries.rs
alexggh Jan 7, 2025
10a9d87
Do not override newer topology with older ones
alexggh Jan 7, 2025
3acbcea
Extend log
alexggh Jan 7, 2025
6608afe
Merge branch 'master' into alexggh/retrigger_assignments_after_restart
alexggh Jan 8, 2025
fd9c784
Merge branch 'master' into alexggh/fix_reimport_of_duplicate
alexggh Jan 8, 2025
5c6f111
Merge branch 'master' into alexggh/update_topology_at_restart
alexggh Jan 8, 2025
4419e37
Merge remote-tracking branch 'origin/master' into alexggh/approval_vo…
alexggh Jan 8, 2025
2260359
Make clippy happy
alexggh Jan 8, 2025
27b9847
Merge remote-tracking branch 'origin/alexggh/update_topology_at_resta…
alexggh Jan 8, 2025
4d3764e
Merge remote-tracking branch 'origin/alexggh/fix_reimport_of_duplicat…
alexggh Jan 8, 2025
25c9606
Merge remote-tracking branch 'origin/alexggh/retrigger_assignments_af…
alexggh Jan 8, 2025
e854c15
Propagate old topologies only to approval-distribution
alexggh Jan 8, 2025
52d85e4
Merge branch 'alexggh/update_topology_at_restart' into merge_all_fixe…
alexggh Jan 9, 2025
d266817
Fix fat fingers
alexggh Jan 9, 2025
41c172e
Merge branch 'alexggh/update_topology_at_restart' into merge_all_fixe…
alexggh Jan 9, 2025
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
78 changes: 50 additions & 28 deletions polkadot/node/core/approval-voting/src/approval_checking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,13 +712,13 @@ mod tests {
}
.into();

approval_entry.import_assignment(0, ValidatorIndex(0), block_tick);
approval_entry.import_assignment(0, ValidatorIndex(1), block_tick);
approval_entry.import_assignment(0, ValidatorIndex(0), block_tick, false);
approval_entry.import_assignment(0, ValidatorIndex(1), block_tick, false);

approval_entry.import_assignment(1, ValidatorIndex(2), block_tick + 1);
approval_entry.import_assignment(1, ValidatorIndex(3), block_tick + 1);
approval_entry.import_assignment(1, ValidatorIndex(2), block_tick + 1, false);
approval_entry.import_assignment(1, ValidatorIndex(3), block_tick + 1, false);

approval_entry.import_assignment(2, ValidatorIndex(4), block_tick + 2);
approval_entry.import_assignment(2, ValidatorIndex(4), block_tick + 2, false);

let approvals = bitvec![u8, BitOrderLsb0; 1; 5];

Expand Down Expand Up @@ -757,8 +757,10 @@ mod tests {
}
.into();

approval_entry.import_assignment(0, ValidatorIndex(0), block_tick);
approval_entry.import_assignment(1, ValidatorIndex(2), block_tick);
approval_entry.import_assignment(0, ValidatorIndex(0), block_tick, false);
approval_entry.import_assignment(0, ValidatorIndex(0), block_tick, true);
approval_entry.import_assignment(1, ValidatorIndex(2), block_tick, false);
approval_entry.import_assignment(1, ValidatorIndex(2), block_tick, true);

let approvals = bitvec![u8, BitOrderLsb0; 0; 10];

Expand Down Expand Up @@ -798,10 +800,10 @@ mod tests {
}
.into();

approval_entry.import_assignment(0, ValidatorIndex(0), block_tick);
approval_entry.import_assignment(0, ValidatorIndex(1), block_tick);
approval_entry.import_assignment(0, ValidatorIndex(0), block_tick, false);
approval_entry.import_assignment(0, ValidatorIndex(1), block_tick, false);

approval_entry.import_assignment(1, ValidatorIndex(2), block_tick);
approval_entry.import_assignment(1, ValidatorIndex(2), block_tick, false);

let mut approvals = bitvec![u8, BitOrderLsb0; 0; 10];
approvals.set(0, true);
Expand Down Expand Up @@ -844,11 +846,11 @@ mod tests {
}
.into();

approval_entry.import_assignment(0, ValidatorIndex(0), block_tick);
approval_entry.import_assignment(0, ValidatorIndex(1), block_tick);
approval_entry.import_assignment(0, ValidatorIndex(0), block_tick, false);
approval_entry.import_assignment(0, ValidatorIndex(1), block_tick, false);

approval_entry.import_assignment(1, ValidatorIndex(2), block_tick);
approval_entry.import_assignment(1, ValidatorIndex(3), block_tick);
approval_entry.import_assignment(1, ValidatorIndex(2), block_tick, false);
approval_entry.import_assignment(1, ValidatorIndex(3), block_tick, false);

let mut approvals = bitvec![u8, BitOrderLsb0; 0; n_validators];
approvals.set(0, true);
Expand Down Expand Up @@ -913,14 +915,24 @@ mod tests {
}
.into();

approval_entry.import_assignment(0, ValidatorIndex(0), block_tick);
approval_entry.import_assignment(0, ValidatorIndex(1), block_tick);
approval_entry.import_assignment(0, ValidatorIndex(0), block_tick, false);
approval_entry.import_assignment(0, ValidatorIndex(1), block_tick, false);

approval_entry.import_assignment(1, ValidatorIndex(2), block_tick + 1);
approval_entry.import_assignment(1, ValidatorIndex(3), block_tick + 1);
approval_entry.import_assignment(1, ValidatorIndex(2), block_tick + 1, false);
approval_entry.import_assignment(1, ValidatorIndex(3), block_tick + 1, false);

approval_entry.import_assignment(2, ValidatorIndex(4), block_tick + no_show_duration + 2);
approval_entry.import_assignment(2, ValidatorIndex(5), block_tick + no_show_duration + 2);
approval_entry.import_assignment(
2,
ValidatorIndex(4),
block_tick + no_show_duration + 2,
false,
);
approval_entry.import_assignment(
2,
ValidatorIndex(5),
block_tick + no_show_duration + 2,
false,
);

let mut approvals = bitvec![u8, BitOrderLsb0; 0; n_validators];
approvals.set(0, true);
Expand Down Expand Up @@ -1007,14 +1019,24 @@ mod tests {
}
.into();

approval_entry.import_assignment(0, ValidatorIndex(0), block_tick);
approval_entry.import_assignment(0, ValidatorIndex(1), block_tick);
approval_entry.import_assignment(0, ValidatorIndex(0), block_tick, false);
approval_entry.import_assignment(0, ValidatorIndex(1), block_tick, false);

approval_entry.import_assignment(1, ValidatorIndex(2), block_tick + 1);
approval_entry.import_assignment(1, ValidatorIndex(3), block_tick + 1);
approval_entry.import_assignment(1, ValidatorIndex(2), block_tick + 1, false);
approval_entry.import_assignment(1, ValidatorIndex(3), block_tick + 1, false);

approval_entry.import_assignment(2, ValidatorIndex(4), block_tick + no_show_duration + 2);
approval_entry.import_assignment(2, ValidatorIndex(5), block_tick + no_show_duration + 2);
approval_entry.import_assignment(
2,
ValidatorIndex(4),
block_tick + no_show_duration + 2,
false,
);
approval_entry.import_assignment(
2,
ValidatorIndex(5),
block_tick + no_show_duration + 2,
false,
);

let mut approvals = bitvec![u8, BitOrderLsb0; 0; n_validators];
approvals.set(0, true);
Expand Down Expand Up @@ -1066,7 +1088,7 @@ mod tests {
},
);

approval_entry.import_assignment(3, ValidatorIndex(6), block_tick);
approval_entry.import_assignment(3, ValidatorIndex(6), block_tick, false);
approvals.set(6, true);

let tranche_now = no_show_duration as DelayTranche + 3;
Expand Down Expand Up @@ -1176,7 +1198,7 @@ mod tests {
// Populate the requested tranches. The assignments aren't inspected in
// this test.
for &t in &test_tranche {
approval_entry.import_assignment(t, ValidatorIndex(0), 0)
approval_entry.import_assignment(t, ValidatorIndex(0), 0, false);
}

let filled_tranches = filled_tranche_iterator(approval_entry.tranches());
Expand Down
Loading
Loading