https://github.com/cgcl-codes/morphdag
The implementation of our TKDE'24 paper "MorphDAG: A Workload-Aware Elastic DAG-based blockchain"
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.4%) to scientific vocabulary
Repository
The implementation of our TKDE'24 paper "MorphDAG: A Workload-Aware Elastic DAG-based blockchain"
Statistics
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
MorphDAG-Lite
This repository contains the source code and the experiment scripts of MorphDAG-Lite, a lite version of an elastic DAG-based Blockchain. It provides an elastic DAG storage model and a dual-mode transaction processing mechanism to achieve elastic storage and transaction processing.
For more technical details, please refer to the paper [IEEE TKDE'24] MorphDAG: A Workload-Aware Elastic DAG-based Blockchain.
Build & Usage
1. Machine types
Machines are divided into two types:
- Severs: run daemons of MorphDAG (
launch/start_server.go), communicate with each other via P2P model - Clients: run client programs of MorphDAG (
launch/start_client.go), communicate withservervia RPC model
2. How to build
In the sub-directory launch, compile the node network configuration file node_config.go and the server and client programs start_server.go and start_client.go.
On Mac OS:
shell
cd launch
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build node_config.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build start_server.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build start_client.go
For Apple M1 or M2 chip, you should use GOARCH=arm64.
On Windows:
shell
cd launch
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build node_config.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build start_server.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build start_client.go
On Linux:
shell
cd launch
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build node_config.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build start_server.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build start_client.go
Deploy & Run
All the experimental scripts are located in the sub-directory experiments.
shell
cd ../experiments
- #### Fetch the Ethereum datatset
Due to the large-scale transaction workloads used in the actual experiments, which includes 36,142,890 transactions (approximately several tens of GB), we have reduced the dataset size for easier sharing and user operation. The dataset can be accessed via the following Google Drive link:
https://drive.google.com/file/d/19Cneu2rX3BlDN3CJmcYkEumV628cp_XU/view?usp=drive_link
Please download the file newEthTxs.txt and place it into the folder ../data.
- #### Run in a local node environment
Step 1: configure the node connection file
shell
./nodeconfig_local.sh $num
$num denotes the number of MorphDAG nodes run locally. Generated node address files are stored in ../nodefile.
Step 2: run the daemon (server program) of MorphDAG
shell
./server_local.sh $num $cycles
$cycles denotes the number of cycles MorphDAG servers run. It will take 2~3 minutes for node discovery and connections. After all server processes print Server $id starts on the terminal , please run the client program immediately.
Step 3: run the client program of MorphDAG
shell
./client_local.sh $send $large $observe
$send denotes the number of transaction sending cycles. $large denotes whether to use the large workload size (0 is the Ethereum workload size and 1 is the large workload size). loads.txt depicts the Ethereum workload size, and large_loads.txt depicts the large workload size. You can modify large_loads.txt to change the transaction sending rate (each row represents the number of transactions sent per second). $observe denotes the number of cycles run by anther client process to observe system tps and latency.
Step 4: kill the server and client programs
shell
./kill_local.sh
After running the speicific number of cycles, the server program can automatically stop, or you can dircetly kill the server and client programs. You can find two experimental results in the current directory, where tps_appending_result.txt presents the appending tps and latency of MorphDAG, and tps_overall_result.txt presents the system overall tps and latency.
- #### Run in a distributed node environment
Step 1: modify hosts.txt and deploy compiled codes to each remote node
shell
./deploy.sh
Please enter the ip address of each remote node in hosts.txt. Notice that you should enable your work computer to login in these remote nodes without passwords in advance.
Step 2: configure the node connection file
shell
./nodeconfig.sh $num
$num denotes the number of MorphDAG nodes run in a distributed environment. Generated node address files are stored in ../nodefile/ecs/ in the local, as well as in ~/MorphDAG/nodefile in each remote node.
Step 3: run the daemon (server program) of MorphDAG
shell
./server.sh $num $cycles $large
In a distributed environment, we directly use the daemon program for tx sending and performance observation (pick two different servers for performing those). $num denotes the number of running MorphDAG servers. $cycles denotes the number of cycles MorphDAG servers run and the number of cycles of tx sending. $large denotes whether to use the large workload size (0 is the Ethereum workload size and 1 is the large workload size).
Step 4: kill the server programs
shell
./kill.sh
Step 5: download the experimental results
shell
./download.sh
Since the observation results are stored on the remote machine who runs the server program, please download the relevant files tps_appending_result.txt and tps_overall_result.txt from the server side.
Owner
- Name: CGCL-codes
- Login: CGCL-codes
- Kind: organization
- Website: http://grid.hust.edu.cn/
- Repositories: 35
- Profile: https://github.com/CGCL-codes
CGCL/SCTS/BDTS Lab
GitHub Events
Total
- Issues event: 1
- Watch event: 1
- Issue comment event: 2
- Push event: 2
Last Year
- Issues event: 1
- Watch event: 1
- Issue comment event: 2
- Push event: 2
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- s-uryansh (1)