Skip to content

Commit

Permalink
Sync up descriptions of DAFs and VDAFs (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
divergentdave authored Jul 11, 2024
1 parent 80dfdd3 commit 5aa7f1c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions draft-irtf-cfrg-vdaf.md
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ been used with the same input share.

DAFs MUST implement the following function:

* `daf.is_valid(agg_param: AggParam, previous_agg_params: set[AggParam]) ->
* `daf.is_valid(agg_param: AggParam, previous_agg_params: list[AggParam]) ->
bool`: Checks if the `agg_param` is compatible with all elements of
`previous_agg_params`.

Expand Down Expand Up @@ -1131,9 +1131,8 @@ the VDAF. (See {{xof}}.)

## Sharding {#sec-vdaf-shard}

Sharding transforms a measurement into input shares as it does in DAFs
(cf. {{sec-daf-shard}}); in addition, it takes a nonce as input and
produces a public share:
Sharding transforms a measurement and nonce into a public share and input shares
as it does in DAFs (cf. {{sec-daf-shard}}):

* `vdaf.shard(measurement: Measurement, nonce: bytes, rand: bytes) ->
tuple[PublicShare, list[InputShare]]` is the randomized sharding algorithm
Expand Down
2 changes: 1 addition & 1 deletion poc/daf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def shard(
def is_valid(
self,
agg_param: AggParam,
previous_agg_params: set[AggParam]) -> bool:
previous_agg_params: list[AggParam]) -> bool:
"""
Check if `agg_param` is valid for use with an input share that has
previously been used with all `previous_agg_params`.
Expand Down
2 changes: 1 addition & 1 deletion poc/tests/test_daf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def shard(
def is_valid(
self,
_agg_param: None,
_previous_agg_params: set[None]) -> bool:
_previous_agg_params: list[None]) -> bool:
return True

def prep(
Expand Down

0 comments on commit 5aa7f1c

Please sign in to comment.