Git Product home page Git Product logo

architecture's Introduction

Architecture RFC

Structure

  • Network

    • Abstract entity the describes the network in its entirety with all its nodes.
    • Servers are broken down into organizations.
    • Clients are broken down into apps.
  • Organization

    • A distinct entity like a company that is operating nodes in the network.
    • Broken down into nodes.
  • Node

    • A collection of services running in the same data center that make a single autonomous node in the network.
    • The node can run on a single machine or on multiple machines.
    • Organization running multiple nodes should run them on different cloud providers / geographic locations.
    • The level of trust internally within a node is higher but not absolute.
    • Broken down into services.
  • Service

    • A backend program implementing a distinct function in the network adhering to a well defined interface.
    • Services are polyglots and can each be implemented in a different language or runtime.
    • There can be multiple implementations for the same service adhering to an identical interface.
    • Services can rely on common libraries to avoid duplicating code.
  • App

    • A frontend program giving an end-user access to the network.
    • All clients are assumed to be light (mobile / web) and access the network through a backend service.
    • Apps can rely on common libraries to avoid duplicating code.

Interfaces

  • Defined using protocol-buffers version proto3.
  • Services communicate internally inside a node using gRPC.
  • Nodes do not use gRPC to communicate among themselves externally.
  • The external communication protocol of same service peers in different nodes is under the responsibility of the service.

Services

  • PublicApi - Exposes public web API (such as REST or JSON-RPC) to clients.
  • Gossip - Propagates information between all nodes in an efficient manner.
  • Consensus - Logic for consensus algorithm allowing separate nodes achieve a shared view of the world.
    • TransactionPool - Holds all pending transactions and a knowledge of past confirmed transactions.
  • VirtualMachine - Owns execution of smart contracts and holds the transient state for a pre-final execution.
    • Processor - The actual runtime environments for a smart contract in various languages (Python / JS / etc).
  • StateStorage - Holds all state (mutable and immutable) updated for the latest closed block.
  • JournalStorage - Holds incremental long-term storage used to generate the state (all past closed blocks).
  • TimeSync - Synchronizes clocks, required to run on every machine that runs TransactionPool or Consensus.

Libraries

  • Crypto - Contains implementations of low-level crypto routines in native (C) with non-native fallbacks.
  • Client - Client SDK for apps to connect end-users to the network through the PublicApi backend service.

Architecture Diagram

TimeSync Gossip Layer IV
communications
Consensus

TransactionPool
VirtualMachine

Processor
Layer III
blockchain
JournalStorage StateStorage SidechainConnector Layer II
high-level storage
Raw Storage Other blockchain Layer I
low-level storage

architecture's People

Contributors

talorbs avatar oryband avatar noamoded avatar lbeder avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.