Skip to content

Latest commit

 

History

History
114 lines (79 loc) · 5.74 KB

README.md

File metadata and controls

114 lines (79 loc) · 5.74 KB

Here is a suggested README.md for the ChainVerifier project:

ChainVerifier

ChainVerifier is a decentralized application for creating and verifying proofs of existence for digital files on the Stacks blockchain.

Features

  • Connect your Stacks wallet to get started
  • Create a new proof of existence by uploading a file
  • The SHA-256 hash of the file content is recorded on the Stacks blockchain
  • Verify an existing proof of existence by entering the transaction ID and uploading the same file
  • The file hash is compared against the hash recorded on chain to verify the proof

How It Works

ChainVerifier works by computing a SHA-256 hash of the uploaded file's content. This hash is then recorded on the Stacks blockchain by sending a 0 STX transaction to the burn address with the hash included in the memo field.

To verify a proof of existence, the same process is followed to compute the hash of the uploaded file. This newly computed hash is compared against the hash stored on chain in the transaction memo. If the hashes match, the file is verified!

Roadmap

Version: v0.1 - Milestone 1: ExpressJS Serverless App with Proof of Existence

Features:

  1. User can upload a file (max size 100MB) to generate a SHA-256 hash.
  2. The hash is stored on the Stacks blockchain as a transaction.
  3. The app provides a Transaction Id (Document Digest) and Timestamp (Date and Time of transaction).
  4. The transaction is sent to the Hiro Wallet, with the destination address being a BURN address.
  5. User pays for the Stack blockchain fees for the transaction.
  6. App does not deploy a special smart contract; it uses Stacks transactions and data stored in transactions in the memo field.
  7. Another feature allows users to verify a Transaction Id against another uploaded file for Green or Red Flag indicating validity.
  8. The hash is computed in the user's browser (client-side) and is not uploaded to the server.
  9. Support for Stacks Blockchain and connection to Hiro Wallet.
  10. Short domain and app name chosen.
  11. The app displays a connection status to Hiro Wallet and transaction pending/completed messages.

Header Text: "Certify your documents - The original STX blockchain notary service. Instant, anonymous, distributed, and secure proof of existence for any digital document."

Text (Use Case 1): A: Registration: The app stores a unique identifier (hash) generated from your document, linked to the submission time, ensuring anonymous and private proof stored in an immutable decentralized system. Users can select a file to start, and the document itself will not be uploaded. B: Payment: To record the unique identifier, a new transaction in the Stacks blockchain is created. The fees for this transaction are to be paid in Stacks (STX). C: Certified: Successful embedding of the document's digest in the Stacks blockchain, providing permanent certification and existence proof. Transaction ID and details are provided for verification.

Text (Use Case 2): "Validation: Once a transaction is created, the unique identifier is securely stored in the blockchain. Your document's existence is permanently validated by the blockchain, even if this site is compromised or down. The transaction can be consulted from any Stacks service."

Version: v0.2 - Milestone 2: Fee Collection Smart Contract

Features:

  1. Deploy a Proof of Existence smart contract written in Clarity.
  2. The smart contract collects fees and stores the Registry of Digest.
  3. Only the deployer of the smart contract can withdraw collected fees.
  4. The fees are a fixed number of STX or a percentage of the average transaction cost.

Version: v0.3 - Milestone 3: Decentralized Storage of Hashed Files

Features:

  1. Users can choose decentralized storage for uploaded files.
  2. File content is encrypted using AES-256 with the hash of the file as the symmetric key.
  3. Utilize HHS or another p2p web service for file upload and replication on multiple nodes.
  4. Special registered storage nodes are used, and nodes are randomly selected for file replication.
  5. Banning mechanism for nodes that are offline, with multiple bans leading to removal from the storage nodes list.

Version: v0.4 - Milestone 4: Enhanced Decentralized Storage

Features:

  1. 20% of nodes are randomly selected for file replication, ensuring increased redundancy.
  2. All selected nodes must store the complete file.

Version: v0.5 - Milestone 5: Fee Distribution among Storage Nodes

Features:

  1. Storage nodes must register into the smart contract to be eligible for storage rewards.
  2. Users include Stacks addresses of 5 storage nodes to distribute fees when registering a file digest.
  3. Each node receives a share of the fees, minus 10% for the admin/deployer address.
  4. The smart contract provides a "withdraw-fees" function for nodes to claim their collected fees.
  5. A dashboard displays File Digest, Timestamp, and the number of Storage Nodes available for each file.
  6. Users can pay to replicate files into additional nodes if the number of available nodes is low.

Demo

You can try a live demo of ChainVerifier here.

Run Locally

  1. Install dependencies:
npm install
  1. Start the app:
npm start
  1. Upload a file to create a new proof, then verify it by entering the transaction ID and re-uploading the same file.

Tech Stack

ChainVerifier is built using:

  • React.js
  • Tailwind CSS
  • Stacks.js for blockchain integration

License

ChainVerifier is open source and available under the MIT license.

Let me know if you would like me to modify or expand the README in any way. I aimed to provide an overview of the project, the main features and functionality, a brief how-it-works section, setup/run instructions, and the tech stack used. Please feel free to adjust the wording as needed.