mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 09:17:58 +00:00
Request based availability distribution (#2423)
* WIP * availability distribution, still very wip. Work on the requesting side of things. * Some docs on what I intend to do. * Checkpoint of session cache implementation as I will likely replace it with something smarter. * More work, mostly on cache and getting things to type check. * Only derive MallocSizeOf and Debug for std. * availability-distribution: Cache feature complete. * Sketch out logic in `FetchTask` for actual fetching. - Compile fixes. - Cleanup. * Format cleanup. * More format fixes. * Almost feature complete `fetch_task`. Missing: - Check for cancel - Actual querying of peer ids. * Finish FetchTask so far. * Directly use AuthorityDiscoveryId in protocol and cache. * Resolve `AuthorityDiscoveryId` on sending requests. * Rework fetch_task - also make it impossible to check the wrong chunk index. - Export needed function in validator_discovery. * From<u32> implementation for `ValidatorIndex`. * Fixes and more integration work. * Make session cache proper lru cache. * Use proper lru cache. * Requester finished. * ProtocolState -> Requester Also make sure to not fetch our own chunk. * Cleanup + fixes. * Remove unused functions - FetchTask::is_finished - SessionCache::fetch_session_info * availability-distribution responding side. * Cleanup + Fixes. * More fixes. * More fixes. adder-collator is running! * Some docs. * Docs. * Fix reporting of bad guys. * Fix tests * Make all tests compile. * Fix test. * Cleanup + get rid of some warnings. * state -> requester * Mostly doc fixes. * Fix test suite. * Get rid of now redundant message types. * WIP * Rob's review remarks. * Fix test suite. * core.relay_parent -> leaf for session request. * Style fix. * Decrease request timeout. * Cleanup obsolete errors. * Metrics + don't fail on non fatal errors. * requester.rs -> requester/mod.rs * Panic on invalid BadValidator report. * Fix indentation. * Use typed default timeout constant. * Make channel size 0, as each sender gets one slot anyways. * Fix incorrect metrics initialization. * Fix build after merge. * More fixes. * Hopefully valid metrics names. * Better metrics names. * Some tests that already work. * Slightly better docs. * Some more tests. * Fix network bridge test.
This commit is contained in:
@@ -864,7 +864,7 @@ fn check_and_import_assignment(
|
||||
tracing::trace!(
|
||||
target: LOG_TARGET,
|
||||
"Imported assignment from validator {} on candidate {:?}",
|
||||
assignment.validator,
|
||||
assignment.validator.0,
|
||||
(assigned_candidate_hash, candidate_entry.candidate_receipt().descriptor.para_id),
|
||||
);
|
||||
|
||||
@@ -928,7 +928,7 @@ fn check_and_import_approval<T>(
|
||||
block_entry.session(),
|
||||
);
|
||||
|
||||
let pubkey = match session_info.validators.get(approval.validator as usize) {
|
||||
let pubkey = match session_info.validators.get(approval.validator.0 as usize) {
|
||||
Some(k) => k,
|
||||
None => respond_early!(ApprovalCheckResult::Bad)
|
||||
};
|
||||
@@ -1492,13 +1492,13 @@ async fn issue_approval(
|
||||
}
|
||||
};
|
||||
|
||||
let validator_pubkey = match session_info.validators.get(validator_index as usize) {
|
||||
let validator_pubkey = match session_info.validators.get(validator_index.0 as usize) {
|
||||
Some(p) => p,
|
||||
None => {
|
||||
tracing::warn!(
|
||||
target: LOG_TARGET,
|
||||
"Validator index {} out of bounds in session {}",
|
||||
validator_index,
|
||||
validator_index.0,
|
||||
block_entry.session(),
|
||||
);
|
||||
|
||||
@@ -1517,7 +1517,7 @@ async fn issue_approval(
|
||||
tracing::warn!(
|
||||
target: LOG_TARGET,
|
||||
"Could not issue approval signature with validator index {} in session {}. Assignment key present but not validator key?",
|
||||
validator_index,
|
||||
validator_index.0,
|
||||
block_entry.session(),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user