seaiam / NLPeace

NLPeace is a social networking app available both on desktop and mobile. We aim to connect people and foster a safe environment free of hate and offensive content. We are leveraging natural language processing to build a strong language model that will allow for our content moderation to be automatic. Hateful content is thus nipped at the bud.
MIT License
1 stars 0 forks source link

SPIKE: Blockchain implementation #323

Closed AnumSidd closed 8 months ago

AnumSidd commented 9 months ago

Story points: 8

Priority: High Risk High

jeffrey-w commented 8 months ago

We will implement this spike on the Ethereum blockchain using the Solidity programming language. We propose (initially) a simple messaging application tied to users' Ethereum address. Chats may consist of one or more Participants, who are associated with a chosen name and collection of messages. The following diagram illustrates this simple data model.

blockchain-messenger-data-model

As an extension to the main NLPeace platform, we will provide content moderation on messages sent in Chats. The data flow for sending a message is shown below.

blockchain-messenger-sequence-diagram

nellyb4 commented 8 months ago

Implementation of a dVPN using the Blockchain system:

Here is a basic rundown of all components involved in the data flow of our system including a decentralized VPN. A DFD is also provided for visual references.

User Node (Entity): This is an external entity representing the user that initiates the VPN service request.

dVPN Service Manager (Process): This process handles the coordination and management of VPN connections. It processes the user's request to find a suitable provider node.

Blockchain Network (Data Store and/or Process): The blockchain can be considered both a data store and a process. For our purposes and for the DFD, we have considered it a process, as it sends a request to the data store of nodes, as well as participating in handling the smart contracts.

Smart Contract (Process/Data Store): The creation and execution of smart contracts with provider nodes can be seen as a process. However, the contracts themselves, once established, are stored on the blockchain, making the blockchain a data store for these contracts. For the purpose of simplicity in the DFD, only the flow and direct usage of the smart contract is presented (with the user).

List of Available Provider Nodes (Data Store): This data store is connected to the Blockchain Network data store but is drawn as a separate element for clarity in how the dVPN Service Manager accesses provider node information.

image