10000 GitHub - rimvydascivilis/blockchain-2
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

rimvydascivilis/blockchain-2

Repository files navigation

Simplified Blockchain

Description

This is a simplified blockchain implementation in C++. It creates 1000 users and generates 10000 transactions. Each block contains 100 transactions.

Results

After running the program, you will see blocks, users and transactions information in the results directory.

Prerequisites

install secp256k1 library

See secp256k1 building.

Usage

Build

make

Run

./main

Implementation Details

Transaction

  • Transaction contains:

    • sender's public key
    • receiver's public key
    • inputs
    • outputs
    • signature
  • Transaction signing and verification is implemented using secp256k1 library and my hashing algorith

Block

  • Block contains:
    • previous block hash
    • merkle root hash
    • timestamp
    • nonce
    • version
    • difficulty
    • transactions

Blockchain

  • Blockchain contains:
    • chain of blocks
    • transaction pool
    • unspent transaction outputs

User

  • User contains:
    • name
    • private key
    • public key

Mining

  • Block is mined using Proof of Work algorithm.
  • Mining is implemented using my hashing algorith.
  • Mining is multithreaded. Each thread tries to mine a block with a different nonce. The first thread that finds a valid block wins.

UTXO Model

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0