Skip to content

An implemention of the most disruptive technology of our time, "cryptocurrencies" in node.js

Notifications You must be signed in to change notification settings

yozaam/myCrypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

all done Yay :D => keeping this checklist as a memory of my biggest project, feel free to go through it to build your own ;)

it is ready, check it out at :

https://whispering-cliffs-93405.herokuapp.com/

Some Screenshots :)

I learnt TDD and Node.js through this project:)

Screenshot 2020-06-30 at 12 23 54 AM

Screenshot 2020-06-30 at 12 24 25 AM

Screenshot 2020-06-30 at 12 24 33 AM

Screenshot 2020-06-30 at 12 24 48 AM

My Journey & Checklist

keeping this below the readme as it is the roadmap I followed :D

Now i must add a file system persistent storage of the chain

A block stores: ( block.js file )\

timestamp
lastHash
data
hash

This will be designed with Test Driven Development - for confidence, reliability, speed and to learn TDD :P :)

tasks completed:
built genesis block
added mining functionality
developed sha256 hash functionality

next task:
link blocks, create blockchain ! :D
validate blockchain:
correct block fields,
lastHash reference previous block only! ( links ),
valid hash


chain replacement:
all nodes need to agree on single chain


stub console outputs

proof of work system:
computation to mine
static difficulty

dynamic difficulty with nonce
use binary hash
prevent difficulty jumps

build the blockchain api & network:
express js ? y/n : y
common methods to send data and recieve with API\ -> read the chain -> write ||

~~real time msging network using pubsub channels ->blockchain ->redis? y/n n(setup!) ->pubnob? internet? NO ~~
yayy now duty to broadcast chain whenever adding

now need to sync with all new peers
remove redundant pubsub code to publish to one's own self

THE BLOCKCHAIN IS READYYYY Yayy, now the crypto stuff wallets tx etc \ \


wallet,keys,verifying tx 1.tamper,2.spender public key crypt
wallet
properties of public address, balance,

gen signature and verify
tx outputs and outputMap
inputs for a transaction
verify signatures, validate entire transaction-> outputMap + signature
add the ability to create transaction to wallet so we can access the wallet local state
allow multiple outputs
WAIT js is going to give same hash for all the outputMap object everytime because objects hash is same even when changing the data! lol just stringify

transaction edge cases, same recipient and all
transaction pooooollllll
endpoint for transaction pool+handle invalid
broadcast,handle transactions
sync on connect

put the transactions into the blocks+reward miner
->get data from pool->if valid tx...
clear pool if added

wallet checks balance
check balance before each transaction\ only sum from recent!
validate the data! in the block thus validate tx blocks
format of tx ie IO->only one reward->input acc to balance-> no identical tx

BACKEND COMPLETE!
front end
block explorer
react and parcel setup
build components
blockchain frontend

cyptocurrency frontend
blocks & wallet separate
transaction pool
mine

MVP readyyy!!
Issue :dev-peer is considering invalid for dev blockchain(mayber coz diff wallets, need to add import wallet also)\
//yes its the different wallets, testing some soln ideas now

About

An implemention of the most disruptive technology of our time, "cryptocurrencies" in node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages