mirror of
https://github.com/logos-messaging/specs.git
synced 2026-01-07 00:23:12 +00:00
address some suggestions
This commit is contained in:
parent
7ea898bb8e
commit
7df465d9c6
@ -35,7 +35,7 @@ which is necessary for proof generation and verification.
|
|||||||
In testnet deployment, the RLN contract does not require any payment apart from gas costs.
|
In testnet deployment, the RLN contract does not require any payment apart from gas costs.
|
||||||
This document aims to make the RLN contract suitable for mainnet deployment.
|
This document aims to make the RLN contract suitable for mainnet deployment.
|
||||||
In particular, the contract would require users to put down a deposit.
|
In particular, the contract would require users to put down a deposit.
|
||||||
The aim of the deposit initially is purely to protect the system from abuse.
|
The aim of the deposit initially is purely to protect the system from denial-of-service attacks using bandwidth capping.
|
||||||
It may also be explored as a revenue stream for Waku in later versions.
|
It may also be explored as a revenue stream for Waku in later versions.
|
||||||
|
|
||||||
## Semantics
|
## Semantics
|
||||||
@ -68,7 +68,7 @@ At any point, a user can withdraw their deposit and terminate the membership.
|
|||||||
In more detail, the membership life-cycle is as follows:
|
In more detail, the membership life-cycle is as follows:
|
||||||
1. A user registers a membership:
|
1. A user registers a membership:
|
||||||
1. If there are expired unclaimed slots in the tree, use the slot with the earliest expiration date past its grace period, otherwise create a new slot;
|
1. If there are expired unclaimed slots in the tree, use the slot with the earliest expiration date past its grace period, otherwise create a new slot;
|
||||||
2. if the membership re-uses a previously used slot, refund the previous user’s deposit.
|
2. if the membership re-uses a previously used slot, the previous user can claim their deposit back.
|
||||||
2. The user sends messages while the membership is active:
|
2. The user sends messages while the membership is active:
|
||||||
1. If the user exceeds the rate limit, their over-limit messages are not propagated in that epoch; the deposit is not slashed.
|
1. If the user exceeds the rate limit, their over-limit messages are not propagated in that epoch; the deposit is not slashed.
|
||||||
3. After the membership expires, the user can do one of the following:
|
3. After the membership expires, the user can do one of the following:
|
||||||
@ -89,7 +89,7 @@ The contract governance is as follows:
|
|||||||
|
|
||||||
1. the first deployment of the contract allows the `Owner` to modify certain parameters (TBD) under certain constraints (TBD);
|
1. the first deployment of the contract allows the `Owner` to modify certain parameters (TBD) under certain constraints (TBD);
|
||||||
2. at some point, the `Onwer` would renounce their privileges, and the contract will become immutable;
|
2. at some point, the `Onwer` would renounce their privileges, and the contract will become immutable;
|
||||||
3. further upgrades, if necessary, can be done by deploying a new contract and moving the membership set.
|
3. further upgrades, if necessary, can be done by deploying a new contract and migrating the membership set.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
@ -102,14 +102,14 @@ We make the following design choices:
|
|||||||
For the initial deployment, we suggest the following values.
|
For the initial deployment, we suggest the following values.
|
||||||
|
|
||||||
| Parameter | Symbol | Value | Units | Modifiable? | Comment |
|
| Parameter | Symbol | Value | Units | Modifiable? | Comment |
|
||||||
| --------------------------------------------------------- | ---------- | ------- | --------------------------------- | ----------- | ------------------------------ |
|
| --------------------------------------------------------- | ---------- | ------- | ------------------------------------------------------------------------------------ | ----------- | ------------------------------ |
|
||||||
| Epoch length | `epoch` | `10` | minutes | TBD | |
|
| Epoch length | `epoch` | `10` | minutes | Yes | |
|
||||||
| Maximum total rate limit of concurrent active memberships | `R_{max}` | TBD | messages per `epoch` | Yes | Can be replaced with `N_{max}` |
|
| Maximum total rate limit of concurrent active memberships | `R_{max}` | TBD | messages per `epoch` | Yes | Can be replaced with `N_{max}` |
|
||||||
| Maximum number of concurrent active memberships | `N_{max}` | `10000` | units | Yes | Can be replaced with `R_{max}` |
|
| Maximum number of concurrent active memberships | `N_{max}` | `10000` | units | Yes | Can be replaced with `R_{max}` |
|
||||||
| Rate limit for low-tier | `R_{low}` | `20` | messages per `epoch` | TBD | |
|
| Rate limit for low-tier | `R_{low}` | `20` | messages per `epoch` | TBD | |
|
||||||
| Rate limit for mid-tier | `R_{mid}` | `200` | messages per `epoch` | TBD | |
|
| Rate limit for mid-tier | `R_{mid}` | `200` | messages per `epoch` | TBD | |
|
||||||
| Rate limit for high-tier | `R_{high}` | `600` | messages per `epoch` | TBD | |
|
| Rate limit for high-tier | `R_{high}` | `600` | messages per `epoch` | TBD | |
|
||||||
| Unit price | `p_u` | TBD | `USD` per `1` message per `epoch` | Yes | |
|
| Unit price | `p_u` | TBD | `USD` per `1` message per `epoch` for the duration of one membership expiration term | Yes | |
|
||||||
| Membership expiration term | `T` | `90` | days | Yes | |
|
| Membership expiration term | `T` | `90` | days | Yes | |
|
||||||
| Grace period | `G` | `30` | days | Yes | |
|
| Grace period | `G` | `30` | days | Yes | |
|
||||||
|
|
||||||
@ -130,8 +130,12 @@ allowing us to reason about network utilization on a longer time scale.
|
|||||||
On the other hand, long epochs lead to more memory requirements for nodes due to the growth of the nullifier log.
|
On the other hand, long epochs lead to more memory requirements for nodes due to the growth of the nullifier log.
|
||||||
Each message contains a nullifier that proves its validity in terms of RLN.
|
Each message contains a nullifier that proves its validity in terms of RLN.
|
||||||
Within the latest epoch, each relaying node stores all nullifiers to detect users exceeding the rate limit.
|
Within the latest epoch, each relaying node stores all nullifiers to detect users exceeding the rate limit.
|
||||||
|
Nullifier log data needs to be stored in memory.
|
||||||
Each nullifier plus metadata is `128` bytes (per message).
|
Each nullifier plus metadata is `128` bytes (per message).
|
||||||
This means that one user with a `1` message per second rate limit (high-tier) generates up to `600 * 128 / 1024 = 75 KiB` of nullifier log data per 10-min epoch.
|
This means that one user with a `1` message per second rate limit (high-tier) generates up to `600 * 128 / 1024 = 75 KiB` of nullifier log data per 10-min epoch.
|
||||||
|
This corresponds to:
|
||||||
|
- for 1000 users: approximately `73 MiB`;
|
||||||
|
- for 10 thousand users: approximately `732 MiB`.
|
||||||
|
|
||||||
#### Maximum total message limit / concurrently active memberships
|
#### Maximum total message limit / concurrently active memberships
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user