Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes the fingerprint of a tuple$(x_1, ..., x_n)$ :
$\sum_{i=1}^n \alpha^{(n - i)} x_i$
$\sum_{i=1}^n \alpha^{(i - 1)} x_i$
from
to
The difference is that previously, you could pad any number of zeros to the left and get the same fingerprint. Now, you can pad any number of zeros to the right, which I find more intuitive.
This also fixes a potential soundness bug: In practice, we always use
fingerprint_with_id
, which prepends the bus ID to the payload, e.g.(<BUS_ID_FOO>, a, b, c)
&(<BUS_ID_BAR>, a, b)
. Butfingerprint((<BUS_ID_BAR>, a, b)) == fingerprint((0, <BUS_ID_BAR>, a, b))
, so ifBUS_ID_FOO
is0
, the receiver could be ambiguous.This is fixed now, because every bus interaction will at least fingerprint the bus ID, which is always the first element.