Skip to content

High level SmartPlasma Description

H Jiang edited this page Oct 9, 2018 · 1 revision

图片_1.png

Description: Application allow to add, withdraw funds from deposits, also exchange deposits under Plasma Cash protocol between application users. Application support direct P2P transaction transfer in Child Chain Plasma Cash). For initialization the P2P connection and NAT traversal we use centralized service (we don’t describe it at the scheme) For NAT traversal and P2P connection initialization we use technology which described on https://tools.ietf.org/html/rfc5245 Also similar technology: https://en.wikipedia.org/wiki/Distributed_hash_table

App client (for example, smartphone application may interact with SmartPlasma): 1) directly (be Spectrum node); 2) receive information from blockchain, through SmartPlasma RPC API Client; User make decision what is better. In first point User In the first case, user will not rely on the App backend when receiving information from the Spectrum, which is more secure, but then user will be required to the Spectrum store blocks. In the second case, user become to light Spectrum client, like Electrum client for BTC. (https://electrum.org/#home) App Client may subscribe to сможет подписаться на events in SmartPlasma and receive notifications in SmartPlasma through websocket protocol from App backend.

App components description:

Client App: Component which deploy on the User side. Functional:

  1. Wallet for SmartPlasma deposits.
  2. Light and full client (Smart Plasma RPC API Client). Component must have access to the Spectrum node (In the case of full client).
  3. App API client, where developed next methods: a) receive information or change her/his account. b) receive ip address another application user, to create with him/her P2P connection. c) subscribe/unsubscribe to events in SmartPlasma. d) another similar methods 4) Network component for direct connection with another users. To provide direct connection between users, we use App backend. Protocol for user interaction is similar with Telegram or Whatsapp.

Client settings (client data): Data base on the user side. User will save transactions prove, user transaction, checkpoints, private keys and all other data, which may need to work properly. Smart Plasma Backend: The server component is responsible for the life cycle of SmartPlasma. Backend interact with SmartPlasma users and interact with Smart Plasma Operator.

Parts of SmartPlasma Backend:

  1. Smart Plasma RPC API - API for interaction with Plasma Cash participants. (users and participants)
  2. Smart Plasma Blocks - key/value database with SmartPlasma blocks.
  3. Checkpoints - key/value database with checkpoints.

Operator Smart Plasma: Client App component on the SmartPlasma operator side. For interaction with SmartPlasma main components is Smart Plasma RPC API Client. But no one doesn’t prohibit to Operator be a client of the SmartPlasma. Spectrum: Spectrum main blockchain. Blockchain where deployed Root Chain and Mediator smart contracts.

App API: API for clients interaction with application. Provide:

  1. possibility of establishing P2P connection between clients (ISA and DHT protocols, etc.)
  2. Receiving clients information about other participants of the application.
  3. Registration and authorization of the user (if necessary), in order to secure user data (IP addresses, phone numbers, ID in the system, etc.).
  4. Notification of users about events in the application to which they are subscribed (websocket protocol)
  5. subscribe/unsubscribe to events
  6. another similar methods

Users information: Database with registered user in the system The identifiers that may be need to provide P2P connections between users, for example: Spectrum address, phone, IP address.

Optionally may ensure double data encryption. It’s allow to manage personal data setting for users. Root Cain: Smart Plasma Root Chain smart contract - EVM smart contract Root chain located in main chain (Spectrum). Root chain periodically updated in main chain in certain situations( deposit withdraw,disputes or fraud approve caused in Root Chain. Smart Plasma operator entering SmartPlasma hash in checkpoints hash to Root Chain Contract. Anyone user may find information to validate SmartPlasma transaction or Checkponts.

Mediator: Mediator smart contract is needed for secure entry and withdrawal of funds in the Root chain. It is on it that the funds are frozen when entering them into Smart Plasma.

What is already implemented (pic 2):

图片_2.png

Clone this wiki locally