Code Monkey home page Code Monkey logo

rustcoin's Introduction

Structures

TODO:

  • utxo changed to only include utxo offset instead of whole hash
  • Transaction needs only one signature instead of signing each utxo input
  • networking
  • change pow algo from sha256 to something more asic resistant. (Maybe Nerva's algo?)
  • can improve on security and memory O(n) -> O(1) by switching to Schnorr (so we can batch signatures in each tx since sum(sig) verifies on sum(keys))

Utxo based cryptocurrency using sha256 hashing algorithm and ecdsa signing on secp256k1 elliptic curve

Serialized output/utxo

  • version -- 2 bytes
  • value -- 4 bytes
  • Owner -- 32 bytes

Serialized input

  • utxo hash -- 32 bytes <-- this is created from Sha256([utxo, blockheader, index in utxos of block])
  • sig size -- 1 byte
  • signaturesig size -- 67-70 bytes

Serialized transaction

  • version -- 2 bytes
  • input countn -- 1 byte
  • serialized inputsn -- 99-102 bytes
  • output countz -- 1 byte
  • serialized outputsz -- 42 bytes

Serialized block

  • version -- 2 bytes
  • prev block hash -- 32 bytes
  • hash of all tx -- 32 bytes
  • nonce -- 4 bytes
  • serialized transactionsy

rustcoin's People

Contributors

outdoteth avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.