From 0964db294c718b0d3574945a963cd2502a1aef32 Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Wed, 18 Dec 2024 17:28:51 +1100 Subject: [PATCH 1/3] Fix custody `sampling_size` logic. --- specs/fulu/das-core.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/fulu/das-core.md b/specs/fulu/das-core.md index 25576bc1f4..6908144799 100644 --- a/specs/fulu/das-core.md +++ b/specs/fulu/das-core.md @@ -237,7 +237,7 @@ The particular columns/groups that a node custodies are selected pseudo-randomly ## Custody sampling -At each slot, a node advertising `custody_group_count` downloads a minimum of `sampling_size = max(SAMPLES_PER_SLOT, custody_group_count)` total custody groups. The corresponding set of columns is selected by `groups = get_custody_groups(node_id, sampling_size)` and `compute_columns_for_custody_group(group) for group in groups`, so that in particular the subset of columns to custody is consistent with the output of `get_custody_groups(node_id, custody_group_count)`. Sampling is considered successful if the node manages to retrieve all selected columns. +At each slot, a node advertising `custody_group_count` downloads a minimum of `sampling_size = max(SAMPLES_PER_SLOT, custody_group_count * (NUMBER_OF_COLUMNS / NUMBER_OF_CUSTODY_GROUPS))` total columns. The corresponding set of columns is selected by `groups = get_custody_groups(node_id, sampling_size)` and `compute_columns_for_custody_group(group) for group in groups`, so that in particular the subset of columns to custody is consistent with the output of `get_custody_groups(node_id, custody_group_count)`. Sampling is considered successful if the node manages to retrieve all selected columns. ## Extended data From c33124ebe40fe2092c138b2c90959330810f539a Mon Sep 17 00:00:00 2001 From: Justin Traglia <95511699+jtraglia@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:38:55 -0600 Subject: [PATCH 2/3] Use integer division --- specs/fulu/das-core.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/fulu/das-core.md b/specs/fulu/das-core.md index 6908144799..923cb7db29 100644 --- a/specs/fulu/das-core.md +++ b/specs/fulu/das-core.md @@ -237,7 +237,7 @@ The particular columns/groups that a node custodies are selected pseudo-randomly ## Custody sampling -At each slot, a node advertising `custody_group_count` downloads a minimum of `sampling_size = max(SAMPLES_PER_SLOT, custody_group_count * (NUMBER_OF_COLUMNS / NUMBER_OF_CUSTODY_GROUPS))` total columns. The corresponding set of columns is selected by `groups = get_custody_groups(node_id, sampling_size)` and `compute_columns_for_custody_group(group) for group in groups`, so that in particular the subset of columns to custody is consistent with the output of `get_custody_groups(node_id, custody_group_count)`. Sampling is considered successful if the node manages to retrieve all selected columns. +At each slot, a node advertising `custody_group_count` downloads a minimum of `sampling_size = max(SAMPLES_PER_SLOT, custody_group_count * (NUMBER_OF_COLUMNS // NUMBER_OF_CUSTODY_GROUPS))` total columns. The corresponding set of columns is selected by `groups = get_custody_groups(node_id, sampling_size)` and `compute_columns_for_custody_group(group) for group in groups`, so that in particular the subset of columns to custody is consistent with the output of `get_custody_groups(node_id, custody_group_count)`. Sampling is considered successful if the node manages to retrieve all selected columns. ## Extended data From 8e0d0d48e81d6c7c5a8253ab61340f5ea5bac66a Mon Sep 17 00:00:00 2001 From: Jimmy Chen Date: Thu, 19 Dec 2024 09:29:58 +1100 Subject: [PATCH 3/3] Simplify inline code Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com> --- specs/fulu/das-core.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/fulu/das-core.md b/specs/fulu/das-core.md index 923cb7db29..31c4af3c38 100644 --- a/specs/fulu/das-core.md +++ b/specs/fulu/das-core.md @@ -237,7 +237,7 @@ The particular columns/groups that a node custodies are selected pseudo-randomly ## Custody sampling -At each slot, a node advertising `custody_group_count` downloads a minimum of `sampling_size = max(SAMPLES_PER_SLOT, custody_group_count * (NUMBER_OF_COLUMNS // NUMBER_OF_CUSTODY_GROUPS))` total columns. The corresponding set of columns is selected by `groups = get_custody_groups(node_id, sampling_size)` and `compute_columns_for_custody_group(group) for group in groups`, so that in particular the subset of columns to custody is consistent with the output of `get_custody_groups(node_id, custody_group_count)`. Sampling is considered successful if the node manages to retrieve all selected columns. +At each slot, a node advertising `custody_group_count` downloads a minimum of `sampling_size = max(SAMPLES_PER_SLOT, custody_group_count * columns_per_group)` total columns, where `columns_per_group = NUMBER_OF_COLUMNS // NUMBER_OF_CUSTODY_GROUPS`. The corresponding set of columns is selected by `groups = get_custody_groups(node_id, sampling_size)` and `compute_columns_for_custody_group(group) for group in groups`, so that in particular the subset of columns to custody is consistent with the output of `get_custody_groups(node_id, custody_group_count)`. Sampling is considered successful if the node manages to retrieve all selected columns. ## Extended data