Skip to content

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

Notifications You must be signed in to change notification settings

outdoteth/rustcoin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages