Demos Network Specifications
  • Introduction
    • What is Demos Network
    • Demos Network Architecture
  • FAQ
  • Cookbook
    • Project setup
      • Run the project (MacOS)
      • Run the project (Windows)
        • WSL 2 Setup on Windows (10 and 11 only)
        • Issue Troubleshooting
      • Run the project (Ubuntu)
  • SDK
    • Getting Started
    • WebSDK
      • Authentication
        • FIDO2 Passkeys
          • Under the Hood: FIDO2 Passkeys
      • NodeCalls
      • Transactions
        • Creating a transaction
        • Signing a transaction
        • Broadcasting a transaction
      • L2PS SDK
        • The l2ps module
        • Interacting with the L2PS
        • L2PS Messaging System
      • Instant Messaging
        • What is the Instant Messaging Protocol?
        • Architecture Overview
        • Encryption
        • Quickstart
        • Message Types
        • API Reference
        • FAQ
    • Cross Chain
      • General layout of the XM SDKs
      • EVM
      • BTC
      • Solana
      • MultiversX (EGLD)
      • NEAR
      • IBC
      • TON
      • XRPL
      • The XMScript
      • Identities
    • Demoswork
    • Cookbook
      • Demoswork
        • Creating work steps
        • Conditional Operation
        • Base Operation
        • Signing and broadcasting
      • Transactions
        • Crosschain Transaction
        • Native Transactions
      • SWAP
        • Crosschain SWAP
    • Web2
      • Quick Start
      • DAHR API Reference
        • Types
      • Making Requests
      • Identities
        • Twitter
        • GitHub
    • API Reference
    • Bridges
      • Rubic Bridge Test
    • Post Quantum Cryptography
  • Backend
    • Internal Mechanisms
      • Network Time Synchronization
      • Cross Context Identities
    • Global Change Registry
      • GCR Structure
      • How is GCR Synced?
    • Consensus Mechanism
      • Unparalleled Scalability
      • Decentralization in PoR-BFT
      • Enhanced Security
      • Comparative Advantage
      • Addressing Potential Criticisms
      • Conclusion
    • Communications Stack
    • L2PS (Subnet) Framework
      • How are L2PS transactions handled?
    • Miscellaneous
      • Browsing the Postgres DB via psql
    • Bridges
      • Rubic Bridge
    • Developers Testbed
      • Setting up the environment
      • Setting up the repository
      • Installing dependencies
      • Node Configuration
      • Running the node
  • Frontend
    • Demos Providers Discovery Mechanism
Powered by GitBook
On this page
  1. Backend

L2PS (Subnet) Framework

This chapter explains in details how the L2PS (also called Subnet) Framework works and what is the principle behind it.

An L2PS (or Demos Subnet) is a shard of Demos nodes that share a cryptographic secret such as an RSA keypair and is able to exchange private informations across the network.

Why subnets

It is called a subnet because only the subnet partecipants are able to decode the messages. On top of this, only the subnet partecipants will store all the l2ps encrypted transactions, while the broader network will only store the hash of each l2ps encrypted transactions array to verify is consistent.

This is ensured by a general Block class for the whole chain:

export interface BlockContent {

	[...]

	l2ps_partecipating_nodes: Map<string, Map<string, string>> // ? "l2ps_uid": {"public_key": "connection_string"}
	
	l2ps_banned_nodes: Map<string, string> // ? "l2ps_uid": "public_key" (to implement)
	
	encrypted_transactions_hashes: Map<string, string> // ? "l2ps_uid": "hash"
}

And an extension of the class specific for L2PS Partecipants:

// Partecipating nodes to the L2PS will have the full transactions (encrypted) of the L2PS

export interface L2PSBlockExtension extends BlockContent {

	l2ps_transactions: EncryptedTransaction[]

}

PreviousCommunications StackNextHow are L2PS transactions handled?

Last updated 7 months ago