Skip to content

Service customization


Overview

Based on the matrix protocol, we have done some customization work to adapt to the cosmos ecology. Including customized cosmos signature verification login, and a series of chat restrictions increase.

Cosmos signature verification login

Add com.xs.cosmos_sign_auth login type on the basis of the original login API, and realize automatic registration if the user is not registered when logging in. The process is as follows:

     1. Verify signature
     2. Determine whether the signature is consistent with the public key export address
     3. Determine whether the user exists
     4. If 3, it is judged that it does not exist, automatically register the user to the chat system

Space Limits

Usage Quota Calculation Method

Medal level, each level increases the bonus by 3%, and level 33 can get a maximum bonus of 100%

User base = remaining disk used by the node / number of users who have uploaded today on the node /  2 (upper limit 200M)

User bonus amount = user base amount x medal level increase

Roll over the oldest file when the quota is insufficient


++++++++++ Example: ++++++++++++++

The remaining disk available for the node is 100G,  and the number of daily active users on the node today is 500

100G / 500 / 2 = 102M (base storage capacity of node users)

User A's medal level is level 10, and the bonus ratio is 9%

102M x (1 + 0.09) = 111.18M (the actual storage capacity after medal bonus)

Bandwidth limit

Schematic diagram of current limiting

Public room limit

Users are not allowed to create public rooms before level 5, and after level 5, each level increases the permission to create a public room

Tourist Mode

Tourist mode is different from official users. Tourist representatives only register in the chat service, but users who have not registered on the chain for pledge, tourists are not allowed to send messages when they have not pledged enough.