Skip to content

Commit

Permalink
fixup! Spec: Define per-context contribution limits
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcardle committed Jan 10, 2025
1 parent bfffb8e commit c96162a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ items:
:: A [=string=] or null
: <dfn>filtering ID max bytes</dfn> (default: [=default filtering ID max bytes=])
:: A positive integer
: <dfn>requested max contributions</dfn> (default: null)
: <dfn>max contributions</dfn> (default: null)
:: A positive integer or null

</dl>
Expand Down Expand Up @@ -578,7 +578,7 @@ steps. They return a [=boolean=]:
not null, return true.
1. If |preSpecifiedParams|' [=pre-specified report parameters/filtering ID max
bytes=] is not the [=default filtering ID max bytes=], return true.
1. If |preSpecifiedParams|' [=pre-specified report parameters/requested max
1. If |preSpecifiedParams|' [=pre-specified report parameters/max
contributions=] is not null, return true.
1. Return false.

Expand Down Expand Up @@ -699,9 +699,9 @@ scope</dfn> given a [=pre-specified report parameters=] |params| and a
filtering ID max bytes=].
1. [=Assert=]: |filteringIdMaxBytes| is [=set/contained=] in the [=valid
filtering ID max bytes range=]
1. Let |requestedMaxContributions| be |params|' [=pre-specified report
parameters/requested max contributions=].
1. [=Assert=]: |requestedMaxContributions| is null or greater than zero.
1. Let |maxContributions| be |params|' [=pre-specified report parameters/max
contributions=].
1. [=Assert=]: |maxContributions| is null or greater than zero.
1. [=map/Set=] [=pre-specified report parameters map=][|batchingScope|] to
|params|.

Expand Down Expand Up @@ -849,13 +849,13 @@ They return a [=moment=].
To <dfn>determine the max contributions</dfn> given a [=pre-specified report
parameters=] |preSpecifiedParams| and a [=context type=] |api|, perform the
following steps. They return a positive integer.
1. Let |requestedMaxContributions| be |preSpecifiedParams|' [=pre-specified
report parameters/requested max contributions=].
1. If |requestedMaxContributions| is null, return [=default maxContributions by
1. Let |maxContributions| be |preSpecifiedParams|' [=pre-specified report
parameters/max contributions=].
1. If |maxContributions| is null, return [=default maxContributions by
API=][|api|].
1. If |requestedMaxContributions| is greater than [=maximum maxContributions=],
return [=maximum maxContributions=].
1. Return |requestedMaxContributions|.
1. If |maxContributions| is greater than [=maximum maxContributions=], return
[=maximum maxContributions=].
1. Return |maxContributions|.

</div>

Expand Down Expand Up @@ -1297,9 +1297,9 @@ by a randomized amount of time to make it difficult to determine whether a
report was sent or not from any particular event. In the case that a
[=pre-specified report parameters/context ID=] is supplied, a non-default
[=pre-specified report parameters/filtering ID max bytes=] is specified, or a
[=pre-specified report parameters/requested max contributions=] is specified,
the API makes the number of reports sent deterministic (sending 'null reports'
if necessary — each containing only a contribution with a value of 0 in the
[=pre-specified report parameters/max contributions=] is specified, the API
makes the number of reports sent deterministic (sending 'null reports' if
necessary — each containing only a contribution with a value of 0 in the
payload). Additional mitigations may also be possible in the future, e.g. adding
noise to the report count.

Expand Down

0 comments on commit c96162a

Please sign in to comment.