[go: up one dir, main page]

Proto/DAL: Add the storage of the attestation lag for previous protocol and use it for entrapment evidence

What

Add in the protocol the ability to store the previous attestation lag and use it in the validation of entrapment evidence.

Why

When one denounces an entrapment attestation for previous protocol, the validation has to use the right attestation lag (ie the one of the protocol valid when the attestation was published), otherwise a baker behaving fairly could be denounced.

To illustrate the situation, let's consider that the previous attestation lag is 8 and the new one is 5. N <-- Publication ... N + 3 <-- Publication where a shard assigned to me is a shard ... N + 8 <-- Attestation with DAL attesting the publication ... N + 11 <-- I do not attest the DAL content here, since (N + 3) contained a trap. .. N + 20 <-- Migration happens

What would be wrong is that after migration one can denounce my attestation at (N + 8) since publication at (N + 3) contained a trap and the protocol constant after migration is 5.

Manually testing the MR

!19547 (merged) adds a test for this case.

Merge request reports

Loading