All Projects → shargri-la → shargri-la

shargri-la / shargri-la

Licence: Apache-2.0 License
A transaction-level sharding simulator for protocol testing against users' behavior on a sharded blockchain.

Programming Languages

rust
11053 projects
python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to shargri-la

eris-fleet
Cluster management for Discord bots using the Eris library.
Stars: ✭ 38 (+52%)
Mutual labels:  sharding
activerecord-shard for
Database Sharding Library for ActiveRecord
Stars: ✭ 16 (-36%)
Mutual labels:  sharding
sharedsharder
Shard your discord.js bot across devices!
Stars: ✭ 18 (-28%)
Mutual labels:  sharding
rye
RYE, Native Sharding RDBMS
Stars: ✭ 54 (+116%)
Mutual labels:  sharding
badger
轻量级单表操作dao框架,支持分库分表
Stars: ✭ 13 (-48%)
Mutual labels:  sharding
mongodb-cluster
MongoDB sharded cluster
Stars: ✭ 25 (+0%)
Mutual labels:  sharding
routing4db
Simple Database Routing and Shard Framework
Stars: ✭ 16 (-36%)
Mutual labels:  sharding
Layr
A decentralized (p2p) file storage system built atop Kademlia DHT that enforces data integrity, privacy, and availability through sharding, proofs of retrievability, redundancy, and encryption, with smart-contract powered incentive scheme
Stars: ✭ 90 (+260%)
Mutual labels:  sharding
scilla-vanilla
No description or website provided.
Stars: ✭ 20 (-20%)
Mutual labels:  sharding
ray tutorial
An introductory tutorial about leveraging Ray core features for distributed patterns.
Stars: ✭ 67 (+168%)
Mutual labels:  sharding
spring-sharding-mybaits
mybatis3在spring中的分库分表
Stars: ✭ 24 (-4%)
Mutual labels:  sharding
practice
Java并发编程与高并发解决方案:http://coding.imooc.com/class/195.html Java开发企业级权限管理系统:http://coding.imooc.com/class/149.html
Stars: ✭ 39 (+56%)
Mutual labels:  sharding
suggestions-bot
A Discord bot designed to build better communities by encouraging a positive and constructive relationship between community and staff.
Stars: ✭ 22 (-12%)
Mutual labels:  sharding
django-horizon
Simple database sharding (horizontal partitioning) library for Django applications.
Stars: ✭ 77 (+208%)
Mutual labels:  sharding
avrio-rs
Avrio's core code written in rust.
Stars: ✭ 14 (-44%)
Mutual labels:  sharding
TONBUS
Telegram Open Network(TON)中文社区。Telegram 群组:https://t.me/ton_china
Stars: ✭ 15 (-40%)
Mutual labels:  sharding
Azuma
A package that actually syncs your ratelimits across all your clusters on Discord.JS
Stars: ✭ 19 (-24%)
Mutual labels:  sharding
simpleflakes
Fast and test-driven distributed 64-bit ID generation, using pure JavaScript, for Node.js.
Stars: ✭ 32 (+28%)
Mutual labels:  sharding
Discord-Bot-TypeScript-Template
Discord bot - A discord.js bot template written with TypeScript.
Stars: ✭ 86 (+244%)
Mutual labels:  sharding
diamond drops
WIP on sharding and Ethereum 2.0 with enshrined-in-consensus data availability and Rust: a fast, safe, concurrent and practical programming language
Stars: ✭ 54 (+116%)
Mutual labels:  sharding

Shargri-La is a transaction-level sharding simulator for protocol testing against users' behavior on a sharded blockchain. The goal of Shargri-La is to help researchers to design or refine sharding protocols.

Shargri-La performs a discrete-event simulation, which proceeds with slots. At each slot, Shargri-La simulates transaction creation by users, block proposals by validators, and state transitions.

Scope of Shargri-La

Shargri-La is a transaction-level simulator, meaning that it focuses on users’ behavior on a sharded blockchain. Therefore, Shargri-La covers the following things:

  • Transaction creation by users
  • Application-level state transitions
  • Cross-shard transactions
  • Transaction selection by block proposers
  • Transaction fee mechanism and gas auction

On the other hand, Shargri-La does not simulate the following things:

  • P2P network (gossip protocols, peer discovery, etc.)
  • Consensus algorithm
  • Data availability mechanism
  • Cryptographic processing (signatures, hashes, etc.)

Version 0.1.0: EIP-1559 and ETH Transfers

For simplicity, we assume that all the on-chain activities are only the transfers of ETH.

We partially adopt Eth1x64 Variant 1 "Apostille," i.e., each shard contains the Eth1 state transition rule and supports receipt-based cross-shard communication. Also, we adopt EIP-1559 as the transaction pricing mechanism.

Usage

We verified to work them with Rust 1.45.0.

cargo run --release

Options

FLAGS:
        --popular_user_exists         Whether or not there ia a popular user
        --popular_user_is_switcher    Whether or not the popular user is a switcher
    -h, --help                        Prints help information
    -V, --version                     Prints version information

OPTIONS:
        --csv <BIG_QUERY_CSV>
            A BigQuery Ethereum transactions csv file

        --end_slot <END_SLOT>                                                    The number of slots
        --output_dir_path <OUTPUT_DIR_PATH>                                      The path of the output directory
        --percentage_of_decreasing_minimum <PERCENTAGE_OF_DECREASING_MINIMUM>    
        --percentage_of_minimum <PERCENTAGE_OF_MINIMUM>                          
        --percentage_of_weighted_random <PERCENTAGE_OF_WEIGHTED_RANDOM>          
        --user_num <USER_NUM>                                                    The maximum number of users

(WIP) Using BigQuery

Use transactions table of the crypto_ethereum datasets.

cargo run --release -- --csv BIG_QUERY_ETHEREUM_TRANSACTION_CSV

Visualizer

Simulation results can be visualized by the sample programs using Matplotlib. We verified to work them with Python 3.8.5 (venv).

Install:

pip install -r requirements.txt

Visualize:

make visualize

Result images are saved in the data directory.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].