Git Product home page Git Product logo

resilientdb's Introduction

GitHub Generated Button build build

ResilientDB: Global-Scale Sustainable Blockchain Fabric

ResilientDB is a High Throughput Yielding Permissioned Blockchain Fabric founded by ExpoLab at UC Davis in 2018. ResilientDB advocates a system-centric design by adopting a multi-threaded architecture that encompasses deep pipelines. Further, ResilientDB separates the ordering of client transactions from their execution, which allows it to process messages out-of-order.

Quick Facts on ResilientDB

  1. ResilientDB orders client transactions through a highly optimized implementation of the PBFT [Castro and Liskov, 1998] protocol, which helps to achieve consensus among its replicas. ResilientDB also supports deploying other state-of-the-art consensus protocols [release are planned] such as GeoBFT [blog, released], PoE, RCC, RingBFT, PoC, SpotLess, HotStuff, and DAG.
  2. ResilientDB requires deploying at least 3f+1 replicas, where f (f > 0) is the maximum number of arbitrary (or malicious) replicas.
  3. ResilientDB supports primary-backup architecture, which designates one of the replicas as the primary (replica with identifier 0). The primary replica initiates consensus on a client transaction, while backups agree to follow a non-malicious primary.
  4. ResilientDB exposes a wide range of interfaces such as a Key-Value store, Smart Contracts, UTXO, and Python SDK. Following are some of the decentralized applications (DApps) built on top of ResilientDB: NFT Marketplace and Debitable.
  5. To persist blockchain, chain state, and metadata, ResilientDB provides durability through LevelDB and RocksDB.
  6. ResilientDB provides access to a seamless GUI display for deployment and maintenance, and supports Grafana for plotting monitoring data.
  7. [Historial Facts] The ResilientDB project was founded by Mohammad Sadoghi along with his students (Suyash Gupta as the lead Architect, Sajjad Rahnama, Jelle Hellings) at UC Davis in 2018 and was open-sourced in late 2019. On September 30, 2021, we released ResilientDB v-3.0. In 2022, ResilientDB was completely re-written and re-architected (Junchao Chen as the lead Architect, Dakai Kang as the lead Recovery Architect along with the entire NexRes Team), paving the way for a new sustainable foundation, referred to as NexRes (Next Generation ResilientDB). Thus, on September 30, 2022, NexRes-v1.0.0 was born, marking a new beginning for ResilientDB. On October 21, 2023, ResilientDB was officially accepted into Apache Incubation.

Online Documentation:

The latest ResilientDB documentation, including a programming guide, is available on our blog repository. This README file provides basic setup instructions.

Table of Contents

  1. Software Stack Architecture
    • SDK, Interface/API, Platform, Execution, and Chain Layers
    • Detailed API Documentation: Core and SDK
  2. SDK Layer: Python SDK and Wallet - ResVault
  3. Interface Layer: Key-Value, Solidity Smart Contract, Unspent Transaction Output (UTXO) Model, ResilientDB Database Connectivity (RDBC) API
  4. Platform Layer: Consensus Manager Architecture (ordering, recovery, network, chain management)
  5. Execution Layer: Transaction Manager Design (Runtime)
  6. Chain Layer: Chain State & Storage Manager Design (durability)
  7. Installing & Deploying ResilientDB

OS Requirements

Ubuntu 20.*


Build and Deploy ResilientDB

Next, we show how to quickly build ResilientDB and deploy 4 replicas and 1 client proxy on your local machine. The proxy acts as an interface for all the clients. It batches client requests and forwards these batches to the replica designated as the leader. The 4 replicas participate in the PBFT consensus to order and execute these batches. Post execution, they return the response to the leader.

Install dependencies:

./INSTALL.sh

Run ResilientDB (Providing a Key-Value Service):

./service/tools/kv/server_tools/start_kv_service.sh
  • This script starts 4 replicas and 1 client. Each replica instantiates a key-value store.

Build Interactive Tools:

bazel build service/tools/kv/api_tools/kv_service_tools

Run tools to set a value by a key (for example, set the value with key "test" and value "test_value"):

bazel-bin/service/tools/kv/api_tools/kv_service_tools service/tools/config/interface/service.config set test test_value

You will see the following result if successful:

client set ret = 0

Run tools to get value by a key (for example, get the value with key "test"):

bazel-bin/service/tools/kv/api_tools/kv_service_tools service/tools/config/interface/service.config get test 

You will see the following result if successful:

client get value = test_value

Run tools to get all values that have been set:

bazel-bin/service/tools/kv/api_tools/kv_service_tools service/tools/config/interface/service.config getallvalues

You will see the following result if successful:

client getallvalues value = [test_value]

Deployment Script

We also provide access to a deployment script that allows deployment on distinct machines.

Deploy via Docker

  1. Install Docker
    Before getting started, make sure you have Docker installed on your system. If you don't have Docker already, you can download and install it from the official Docker website.

  2. Pull the Latest ResilientDB Image
    Choose the appropriate ResilientDB image for your machine's architecture:

    • For amd architecture, run:

      docker pull expolab/resdb:amd64
    • For Apple Silicon (M1/M2) architecture, run:

      docker pull expolab/resdb:arm64
  3. Run a Container with the Pulled Image
    Launch a Docker container using the ResilientDB image you just pulled:

    • For amd architecture, run:

      docker run -d --name myserver expolab/resdb:amd64
    • For Apple Silicon (M1/M2) architecture, run:

      docker run -d --name myserver expolab/resdb:arm64
  4. Test with Set and Get Commands Exec into the running server:

    docker exec -it myserver bash

    Verify the functionality of the service by performing set and get operations:

    • Set a test value:
    bazel-bin/service/tools/kv/api_tools/kv_service_tools service/tools/config/interface/service.config set test test_value
    • Retrieve the test value:
     bazel-bin/service/tools/kv/api_tools/kv_service_tools service/tools/config/interface/service.config get test
    

resilientdb's People

Contributors

cjcchen avatar resilientdb avatar sajjadrahnama avatar dakaikang avatar gopuman avatar glenn-chen avatar juduarte00 avatar msadoghi avatar omahs avatar rohansogani avatar kamaci avatar xyhlinx 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.