From fd2be7f8a8e9aff2a81c174185e5136fcbd81b81 Mon Sep 17 00:00:00 2001 From: BradleyOlson64 Date: Sat, 7 Jan 2023 10:16:10 -0800 Subject: [PATCH 1/2] Guide changes --- .../src/node/collators/collation-generation.md | 1 - .../implementers-guide/src/node/utility/chain-selection.md | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/roadmap/implementers-guide/src/node/collators/collation-generation.md b/roadmap/implementers-guide/src/node/collators/collation-generation.md index 0a17a8619ab1..d7c62fee39f8 100644 --- a/roadmap/implementers-guide/src/node/collators/collation-generation.md +++ b/roadmap/implementers-guide/src/node/collators/collation-generation.md @@ -99,7 +99,6 @@ On `ActiveLeavesUpdate`: * If there is no collation generation config, ignore. * Otherwise, for each `activated` head in the update: * Determine if the para is scheduled on any core by fetching the `availability_cores` Runtime API. - > TODO: figure out what to do in the case of occupied cores; see [this issue](https://github.com/paritytech/polkadot/issues/1573). * Determine an occupied core assumption to make about the para. Scheduled cores can make `OccupiedCoreAssumption::Free`. * Use the Runtime API subsystem to fetch the full validation data. * Invoke the `collator`, and use its outputs to produce a `CandidateReceipt`, signed with the configuration's `key`. diff --git a/roadmap/implementers-guide/src/node/utility/chain-selection.md b/roadmap/implementers-guide/src/node/utility/chain-selection.md index 423b5ed406c0..4bfd37b9b258 100644 --- a/roadmap/implementers-guide/src/node/utility/chain-selection.md +++ b/roadmap/implementers-guide/src/node/utility/chain-selection.md @@ -24,10 +24,13 @@ Delete data for all orphaned chains and update all metadata descending from the Update the approval status of the referenced block. If the block was stagnant and thus non-viable and is now viable, then the metadata of all of its descendants needs to be updated as well, as they may no longer be stagnant either. Update the set of viable leaves accordingly. +### `ChainSelectionMessage::Leaves` + +Gets all leaves of the chain, i.e. block hashes that are suitable to build upon and have no suitable children. Supplies the leaves in descending order by score. + ### `ChainSelectionMessage::BestLeafContaining` -If the required block is unknown or not viable, then return `None`. -Iterate over all leaves, returning the first leaf containing the required block in its chain, and `None` otherwise. +If the required block is unknown or not viable, then return `None`. Iterate over all leaves, returning the first leaf containing the required block in its chain, and `None` otherwise. ### Periodically From f75033317ed240dad494fe587ce6657481039b4a Mon Sep 17 00:00:00 2001 From: BradleyOlson64 Date: Sun, 8 Jan 2023 11:26:49 -0800 Subject: [PATCH 2/2] Adding clarification --- roadmap/implementers-guide/src/node/utility/chain-selection.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roadmap/implementers-guide/src/node/utility/chain-selection.md b/roadmap/implementers-guide/src/node/utility/chain-selection.md index 4bfd37b9b258..fc6a9820143b 100644 --- a/roadmap/implementers-guide/src/node/utility/chain-selection.md +++ b/roadmap/implementers-guide/src/node/utility/chain-selection.md @@ -30,7 +30,7 @@ Gets all leaves of the chain, i.e. block hashes that are suitable to build upon ### `ChainSelectionMessage::BestLeafContaining` -If the required block is unknown or not viable, then return `None`. Iterate over all leaves, returning the first leaf containing the required block in its chain, and `None` otherwise. +If the required block is unknown or not viable, then return `None`. Iterate over all leaves in order of descending weight, returning the first leaf containing the required block in its chain, and `None` otherwise. ### Periodically