mirror of
https://github.com/logos-messaging/specs.git
synced 2026-01-05 23:53:12 +00:00
Fixes op-chan
This commit is contained in:
parent
b73d5fff41
commit
de0720a38c
@ -34,7 +34,7 @@ content stored locally while distributing messages using the [10/WAKU2](https://
|
|||||||
|
|
||||||
## Terminology
|
## Terminology
|
||||||
|
|
||||||
- Cell: A discussion board or channel that hosts posts and moderation controls.
|
- Channel: A discussion board or channel that hosts posts and moderation controls.
|
||||||
- Post: User content created within a forum.
|
- Post: User content created within a forum.
|
||||||
- Comment: A reply to a `Post` or other `Comment` (threaded discussion).
|
- Comment: A reply to a `Post` or other `Comment` (threaded discussion).
|
||||||
- Participant: Any user able to publish or consume messages (anonymous or
|
- Participant: Any user able to publish or consume messages (anonymous or
|
||||||
@ -51,16 +51,16 @@ The keywords “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL N
|
|||||||
OpChan uses the [10/WAKU2](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/10/waku2.md)
|
OpChan uses the [10/WAKU2](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/10/waku2.md)
|
||||||
network for the distribution of forum content amongst peers.
|
network for the distribution of forum content amongst peers.
|
||||||
The messages, which are [14/WAKU-MESSAGE](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/14/message.md) objects,
|
The messages, which are [14/WAKU-MESSAGE](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/14/message.md) objects,
|
||||||
are cryptographically signed using ED25519 keys generated by the client locally.
|
are cryptographically signed using Ed25519 keys generated by the client locally.
|
||||||
Users SHOULD use the [19WAKU2-LIGHTPUSH]() protocol to send messages to Waku nodes storing the forum's content.
|
Users SHOULD use the [19WAKU2-LIGHTPUSH](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/19/lightpush.md) protocol to send messages to Waku nodes storing the forum's content.
|
||||||
|
|
||||||
OpChan supports two types of messages,
|
OpChan supports two types of messages,
|
||||||
content and control messages.
|
content and control messages.
|
||||||
Content messages are user-generated content on the forum.
|
Content messages are user-generated content on the forum.
|
||||||
The message types include the following:
|
The message types include the following:
|
||||||
|
|
||||||
- Channel: Metadata information like name, description, and admins of a forum feed.
|
- Channel: Includes the metadata information like name, description, and admins of a forum feed.
|
||||||
- Post: User content created within a cell.
|
- Post: User content created within a channel.
|
||||||
- Comment: Users reply to a post or another comment.
|
- Comment: Users reply to a post or another comment.
|
||||||
- Vote: To cast upvote or downvote for a post or comment.
|
- Vote: To cast upvote or downvote for a post or comment.
|
||||||
- User: Includes username, delegation proofs, and identities.
|
- User: Includes username, delegation proofs, and identities.
|
||||||
@ -89,17 +89,17 @@ All messages transmitted over the Waku network MUST include the following envelo
|
|||||||
``` js
|
``` js
|
||||||
{
|
{
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"type": "CELL_CREATED | POST_CREATED | COMMENT_CREATED | VOTE | BOOKMARK | MODERATION | DELEGATION",
|
"type": "CHANNEL_CREATED | POST_CREATED | COMMENT_CREATED | VOTE | BOOKMARK | MODERATION | DELEGATION",
|
||||||
"timestamp": "uint64"
|
"timestamp": "uint64"
|
||||||
"author": "string" // author public key or wallet address
|
"author": "string" // author public key or wallet address
|
||||||
"signature": "bytes" // ed25519 signature of the canonical serialized body
|
"signature": "bytes" // ed25519 signature
|
||||||
"delegationProof": "bytes" // optional wallet signature authorizing the browser key
|
"delegationProof": "bytes" // optional wallet signature authorizing the browser key
|
||||||
"body": object // The message content
|
"body": object // The message content
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Every message SHOULD be signed using ED25519 keys from the publishing user.
|
Every message SHOULD be signed using `signature` owned by the publishing user.
|
||||||
Clients SHOULD verify the signature against the `author` public key and,
|
Clients SHOULD verify the signature against the `author` public key and,
|
||||||
when present, verify `delegationProof`.
|
when present, verify `delegationProof`.
|
||||||
|
|
||||||
@ -107,9 +107,7 @@ Signing Flow:
|
|||||||
|
|
||||||
1. Serialize `body` fields in stable key order.
|
1. Serialize `body` fields in stable key order.
|
||||||
2. Construct signing bytes with: `type`, `timestamp`, `author` and `body`.
|
2. Construct signing bytes with: `type`, `timestamp`, `author` and `body`.
|
||||||
3. Sign with the user's cryptographic keys for the session.
|
3. Sign with the user's cryptographic keys, `signature`, for the session.
|
||||||
|
|
||||||
- channel admin
|
|
||||||
|
|
||||||
### Identity
|
### Identity
|
||||||
|
|
||||||
@ -122,10 +120,10 @@ a username MAY choose a username attached to the post or comments.
|
|||||||
An anonymous user SHOULD NOT be granted an admin role,
|
An anonymous user SHOULD NOT be granted an admin role,
|
||||||
create moderation events, or create a channel.
|
create moderation events, or create a channel.
|
||||||
|
|
||||||
A wallet delegation uses the user's wallet private key to sign a delegation message,
|
A wallet delegation is a user blockchain wallet's private key used to sign a message,
|
||||||
the `delegationProof`.
|
which is the `delegationProof`.
|
||||||
The `delegationProof` SHOULD be a short-lived message,
|
The `delegationProof` SHOULD be a short-lived message,
|
||||||
RECCOMENDED a few minutes to a few hours.
|
RECOMMENDED a few minutes to a few hours.
|
||||||
Once a `delegationProof` is generated,
|
Once a `delegationProof` is generated,
|
||||||
the client SHOULD be able to sign messages,
|
the client SHOULD be able to sign messages,
|
||||||
without the need for repeated wallet prompts requesting to sign.
|
without the need for repeated wallet prompts requesting to sign.
|
||||||
@ -165,7 +163,7 @@ A post can gain better visibility on the forum channel and
|
|||||||
the forum's search through the content relevance score.
|
the forum's search through the content relevance score.
|
||||||
Clients with verified wallet identities MUST be favored over an anonymous session identity.
|
Clients with verified wallet identities MUST be favored over an anonymous session identity.
|
||||||
|
|
||||||
There are a few RECCOMENDED areas that collect points when calculating the relevance score of a post:
|
There are a few RECOMMENDED areas that collect points when calculating the relevance score of a post:
|
||||||
|
|
||||||
Basic points include the activities that each user is able to engage in.
|
Basic points include the activities that each user is able to engage in.
|
||||||
|
|
||||||
@ -204,14 +202,14 @@ Where $$\( -\lambda \)$$ is the time-decay rate per day.
|
|||||||
|
|
||||||
There SHOULD be a moderation penalty that reduces the score when a post or
|
There SHOULD be a moderation penalty that reduces the score when a post or
|
||||||
comment is moderated with a value of 0.5(50%).
|
comment is moderated with a value of 0.5(50%).
|
||||||
This penalty is applied once a post is `HIDDEN`, `REMOVED` or `FLAGGED` by a moderator.
|
This penalty is applied once a post is `HIDDEN`, `REMOVED` or flagged by users to be reviewed by a moderator.
|
||||||
|
|
||||||
$$
|
$$
|
||||||
\text{moderationPenalty} = \begin{cases} 0.5, & \text{if moderated} \\
|
\text{moderationPenalty} = \begin{cases} 0.5, & \text{if moderated} \\
|
||||||
1, & \text{otherwise} \end{cases}
|
1, & \text{otherwise} \end{cases}
|
||||||
$$
|
$$
|
||||||
|
|
||||||
Below is the final relevance score based on the RECCOMENDED points above:
|
Below is the final relevance score based on the RECOMMENDED points above:
|
||||||
|
|
||||||
$$
|
$$
|
||||||
\text{Total RelevanceScore} = (\text{basic} + \text{engagement} + \text{verifiedUpvote})
|
\text{Total RelevanceScore} = (\text{basic} + \text{engagement} + \text{verifiedUpvote})
|
||||||
@ -224,6 +222,7 @@ Copyright and related rights waived via [CC0](https://creativecommons.org/public
|
|||||||
|
|
||||||
## References
|
## References
|
||||||
- [10/WAKU2](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/10/waku2.md)
|
- [10/WAKU2](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/10/waku2.md)
|
||||||
|
- [19WAKU2-LIGHTPUSH](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/19/lightpush.md)
|
||||||
- [14/WAKU-MESSAGES](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/14/message.md)
|
- [14/WAKU-MESSAGES](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/14/message.md)
|
||||||
- [23/WAKU2-TOPICS](https://github.com/vacp2p/rfc-index/blob/main/waku/informational/23/topics.md)
|
- [23/WAKU2-TOPICS](https://github.com/vacp2p/rfc-index/blob/main/waku/informational/23/topics.md)
|
||||||
-
|
-
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user