Skip to content

An application that verifies file sending between a client and server using merkle proofs

Notifications You must be signed in to change notification settings

leonardchinonso/verifile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verifile

Description

This project allows a user to upload a set of files to server using a client. It also allows a user download a file with a given index from the server and verify its authenticity using Merkle Proofs

How To Run

To run this project, you need to install rust and cargo. You can set it up here.

Once you have rust installed, clone the repository and navigate to the top level directory. You would need to add the files you need to upload to the server. You can upload the files anywhere in the current working directory. Alternatively, there are sample files in the files directory you can use.

Next, you would need to run the server and the clients on two different terminal processes and then make them interact with one another. Follow the below commands

  1. Build the the client and server binaries.
$ cargo build
  1. Start the server using the server binary.
$ cargo run --bin server

The client takes two arguments, an optional --file | -f with the relative path of the files separated by commas and a --action | -a that can either be send or download-N, where N is the index of the file to download.

  1. Send the files from the client using the client binary.
$ cargo run --bin client -- -f files/cv.txt,files/food.json,files/recipe.html,files/schools.csv -a send

The server would receive and store the files if there are no issues.

  1. Download the file by the index from the server using the server binary. Here we download the file at index 2.
$ cargo run --bin client -- -a download-2

The file should be downloaded if it is successful.

Tests

To run tests, you would need to run it from the root directory.

$ cargo test

About

An application that verifies file sending between a client and server using merkle proofs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published