From 090c65c8e646f4a9ffb2b3d3c7c90a29a7f4491e Mon Sep 17 00:00:00 2001 From: Sergei Tikhomirov Date: Mon, 30 Sep 2024 16:02:43 +0200 Subject: [PATCH] make spec less strict on overwriting memberships --- standards/core/rln-contract.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/standards/core/rln-contract.md b/standards/core/rln-contract.md index 4c2738e..af425a8 100644 --- a/standards/core/rln-contract.md +++ b/standards/core/rln-contract.md @@ -173,9 +173,11 @@ Membership registration is additionally subject to the following requirements: - The new membership MAY overwrite one or multiple _Expired_ memberships. - If `r > R_{free}`: - if `r > R_{free} + R_{expired}`, registration MUST fail; - - if `r <= R_{free} + R_{expired}`, the new membership MUST be registered by overwriting some _Expired_ memberships. + - if `r <= R_{free} + R_{expired}`, the new membership SHOULD be registered by overwriting some _Expired_ memberships. - The sender of the registration transaction MAY specify a list of _Expired_ memberships to be overwritten. + - If any of the memberships in the list are not _Expired_, the registration MUST fail. - If the list is not provided, the contract MAY use any criteria to select _Expired_ memberships to overwrite (see Implementation Suggestions). + - If the list is not provided, the registration MAY fail even if the membership set contains _Expired_ membership that, if erased, would provide sufficient rate limit. - If a new membership A overwrites an _Expired_ membership B: - membership B MUST become _ErasedAwaitsWithdrawal_; - the current total rate limit MUST be decremented by the rate limit of membership B;