Giter VIP home page Giter VIP logo

gpu-merkle-patricia-trie's Introduction

GPU Merkle Patricia Trie

Note: We are working on completing this documents.

Dependencies

  • crypto++ 8.7
  • libxml2
  • gtest
  • golang

Submodules

We have two externel git submodules. One includes our modified go-ethereum implementation and experiments. Another includes our modified ycsb generator. They are forked from open-sourced branch.

For anonymity, we removed the .gitmodules and also make them anonymous. Please download Geth and YCSB into current folder before you start to build.

Data

You can load the ycsb and wiki dataset by runing our script

bash download_data.sh

Ethereum transaction dataset is a financial dataset. It should be downloaded from Google BigQuery by following query.

select *
from bigquery-public-data.crypto_ethereum.transactions 
where 
  EXTRACT(date FROM block_timestamp) between "2022-11-15" and "2022-12-29"

The results need to be exported to one or multiple csv files and saved in /ethereum/transactions/ folder.

Build

mkdir build
cd build
cmake ../mpt-with-compress/
cmake --build . -j

For Ethereum transaction processing case study:

bash geth_install_libgmpt.sh

Run

Experiments

You can run unit tests in go-ethereum/trie/experiments_test.go and

bash do_all_experiments.sh

Profiling

You can run the experiments and generate profiling report by profile.sh. The Nsight Compute report will be stored in ./profile/. If you'd like a csv version, just run convert_to_csv.sh and you will get all csv reports in ./profile/.

Case study: Applied to Go-ethereum

We integrate GPU MPT into go-ethereum using cgo.

Install

First make sure the gmpt target is compiled. Then run geth_install_libgmpt.sh to install the library and header files into go-ethereum's folder.

Configure geth to use GPU MPT

  • TODO

Code Structure

Overview

.
├── dataset           # created by [download_data.sh](./download_data.sh)
├── go-ethereum       # forked from official go-ethereum. downloaded by git submodule
├── YCSB-C            # YCSB workload generator. downloaded by git submodule
├── mpt-with-compress # GPU MPT implementations
└── mpt-no-compress   # You can ignore it

Key Algorithms

Extension of LockNU

Key experiments

Please refer to ./do_all_experiments.sh, ./go-ethereum/trie/experiments_test.go and ./go-ethereum/miner/benchmark_test.go.

gpu-merkle-patricia-trie's People

Contributors

tkoniy avatar qiansuimingmingming avatar

Stargazers

 avatar Eito Miyamura avatar LuYi avatar  avatar Ma1oneZhang avatar 魔幻骑士 avatar  avatar

Watchers

 avatar

gpu-merkle-patricia-trie's Issues

Hash update

Hierarchy Hash Update TODO

  • use stack to reduce multiple get
    One pass Hash Updaete TODO
  • use parent to reduce multiple get

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.