mirror of https://github.com/waku-org/specs.git
clarify types of state transitions in the diagram
This commit is contained in:
parent
fd91933c47
commit
3a1aabbd79
|
@ -91,17 +91,24 @@ Any existing membership MUST always be in exactly one of the following states:
|
||||||
graph TD;
|
graph TD;
|
||||||
NonExistent --> |"register"| Active;
|
NonExistent --> |"register"| Active;
|
||||||
Active -.-> |"time T passed"| GracePeriod;
|
Active -.-> |"time T passed"| GracePeriod;
|
||||||
GracePeriod --> |"extend"| Active;
|
GracePeriod ==> |"extend"| Active;
|
||||||
GracePeriod -.-> |"time G passed"| Expired;
|
GracePeriod -.-> |"time G passed"| Expired;
|
||||||
GracePeriod --> |"erase"| ErasedAwaitsWithdrawal;
|
GracePeriod ==> |"erase"| ErasedAwaitsWithdrawal;
|
||||||
Expired --> |"erase"| ErasedAwaitsWithdrawal;
|
Expired --> |"erase"| ErasedAwaitsWithdrawal;
|
||||||
Expired --> |"overwritten by a new membership"| ErasedAwaitsWithdrawal;
|
Expired --> |"overwritten by a new membership"| ErasedAwaitsWithdrawal;
|
||||||
ErasedAwaitsWithdrawal --> |"withdraw"| Erased;
|
ErasedAwaitsWithdrawal ==> |"withdraw"| Erased;
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
State updates triggered by a transaction (e.g., from _GracePeriod_ to _Active_ as a result of `extend`) MUST be applied immediately.
|
Different line types denote the types of state transitions:
|
||||||
State updates defined by time progression (e.g., from _GracePeriod_ to _Expired_ after time `G`) MAY be applied lazily.
|
|
||||||
|
| Line type | Triggered by | Requirements |
|
||||||
|
| -------------- | ---------------- | ------------------------------------------------------------------------------------ |
|
||||||
|
| Thick (`==`) | Transaction | MUST be initiable by the membership keeper and MUST NOT be initiable by other users. |
|
||||||
|
| Thin (`--`) | Transaction | MAY be initiable by any user. |
|
||||||
|
| Dotted (`-.-`) | Time progression | MAY be applied lazily. |
|
||||||
|
|
||||||
|
Transaction-triggered state transitions MUST be applied immediately.
|
||||||
|
|
||||||
When handling a membership-specific transaction, the contract MUST:
|
When handling a membership-specific transaction, the contract MUST:
|
||||||
- check whether the state of the involved membership is up-to-date;
|
- check whether the state of the involved membership is up-to-date;
|
||||||
|
|
Loading…
Reference in New Issue