Savjee / SavjeeCoin

A simple blockchain in Javascript. For educational purposes only.
MIT License
1.74k stars 752 forks source link

Subject of decentralization, worker nodes and wallets #34

Open criskurtin opened 3 years ago

criskurtin commented 3 years ago

Hi!

First, thank you so much for this great work, truly a great way to understand blockchain from implementation standpoint. Not really an issue, but this is the fastest way I could think of to contact you regarding this project. Are there any plans to continue with this, specifically to explain and implement support for decentralization and multiple worker (mining) nodes. This would answer many questions such as how real nodes actually acquire transactions to embed into the block prior to mining, how synchronization works between various nodes etc. It would also split the project into clearly visible separate components of the entire system (to see which logic is actually implemented on the wallet side, and which on worker side). And the burning question for me is, if I'm a new node, how and from who do I acquire my blockchain copy and how do I broadcast my existence to everyone else?

I know, lots of ideas and lots of text, but I hope this could be a future of the project, at least in some far future time :) maybe I even jump in with some pull requests then.

Madeindreams commented 3 years ago

Well this is kinda funny because i was looking at something to work with under NodeJS. I will take a look at this code. I was looking to add smart contract execution inside the NodeJS VM. Right now my solution is not optimal but this is what I do.

I write a Javascript contract and encode it in bytecode. I can load that bytecode in the V8 Virtual Machine. I can also encode in bytecode some function call and get them executed.

I need to find a way to store the bytecode in the blockchain and make what ever change happens persistent in the contract code. I have yet to figure this out. I also have to figure a way to encode my smart contract to a bytecode that the NodeJS will recognize no matter the OS.

As for the wallet. and node. i already have this built for Ethereum under NodeJS. The wallet is simply an password encrypted private key or seed. Depending on your HD.

masnwilliams commented 3 years ago

I am also interested in this project. I think I will look into getting this on a server where people can download the blockchain and mine. I will keep you updated.

Savjee commented 3 years ago

@Madeindreams Could you make that code open-source? I'd love to take a look at how you implemented that in a safe way. Perhaps we could merge that into this demo implementation.

dimitrihartt commented 3 years ago

I would like to join too. From Brazil.

AngelDarco commented 1 year ago

Very exciting to be able to join the team as well.

skywalker282 commented 1 year ago

First thank you for this clear explanation @Savjee , I rember th frst time I watched this playlist, I was starting my journey in the blockchain world and it very helped me in my learning path, thank you. The idea of turning this project into a real-world projetct is so exciting than the satisfaction people get after understing the basics of DLT technology. Will like also to see Consensus, Mainet capabilities impleted and would love to contribute as well