From 87f4080347076b003bdcc7f4e7ff0d4919eefa4f Mon Sep 17 00:00:00 2001 From: Lyudmil Ivanov <55487633+flmel@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:38:07 +0300 Subject: [PATCH] fix: markdownlint, linkchecker issues (#564) * Adds a missing link that's breaking the link checker I've verified the contents of the previous link via [wayback machine](http://web.archive.org/web/20231204231021/https://rust-random.github.io/rand/rand/distributions/struct.WeightedIndex.html) * Fixes lint consistency error --- specs/ChainSpec/SelectingBlockProducers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/ChainSpec/SelectingBlockProducers.md b/specs/ChainSpec/SelectingBlockProducers.md index a8711e92f..0c190dcf7 100644 --- a/specs/ChainSpec/SelectingBlockProducers.md +++ b/specs/ChainSpec/SelectingBlockProducers.md @@ -113,7 +113,7 @@ validator_sampler = WeightedIndex([v.stake for v in validators]) return (validators, validator_sampler) ``` -### Algorithm for selecting block producers +## Algorithm for selecting block producers ### Input @@ -126,7 +126,7 @@ return (validators, validator_sampler) select_validators(MAX_NUM_BP, min_stake_fraction, validator_proposals) ``` -### Algorithm for selecting chunk producers +## Algorithm for selecting chunk producers ### Input @@ -197,7 +197,7 @@ We sample validators with probability proportional to their stake using the foll - `weighted_sampler: WeightedIndex` - Allow $O(1)$ sampling - This structure will be based on the - [WeightedIndex](https://rust-random.github.io/rand/rand/distributions/struct.WeightedIndex.html) + [WeightedIndex](https://docs.rs/rand/latest/rand/distributions/struct.WeightedIndex.html) implementation (see a description of [Vose's Alias Method](https://en.wikipedia.org/wiki/Alias_method) for details)