Skip to content

Client and server implementation of Merkle tree for large set of small files

License

Notifications You must be signed in to change notification settings

RedCuckoo/merkle-tree-verifier

Repository files navigation

merkle-tree-verifier

Client generates files, calculates merkle root and unloads files to the server (deletes locally and uploads to the server).

Server accepts files to store, calculate merkle tree, when requested file, returns merkle proof.

Client when downloading file, can calculate merkle root hash from proof and be sure the file is not corrupted.


Requirements

Installation

  1. Run server:
docker-compose up -d
  1. Run client:
docker pull redcuckoo/merkle-tree-verifier-server:v0.2.0
docker run --network merkle-tree-verifier_default -it redcuckoo/merkle-tree-verifier-client:v0.2.0

OR

Run script:

./run.sh

Usage

Available commands:

generate AMOUNT_OF_FILES # generate N amount of files on the client
list --local # list files stored locally on the client
list --remote # list files stored remotely on the server
unload # send files to the server, store merkle root, delete local
download FILE_INDEX # download file from the server
reset # reset client and server
exit

Simple demo:

generate 10
list --local
list --remote
unload
list --local
list --remote
download 1
list --local
list --remote
reset

Demo

Demo

About

Client and server implementation of Merkle tree for large set of small files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages