Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: kusanagi01 on September 24, 2019, 10:35:56 AM



Title: Blockchain Demonstration [Python, JS]
Post by: kusanagi01 on September 24, 2019, 10:35:56 AM
Hello,

In this post, I wanna show you Blockchain demonstration that can help beginners to well understand the practice side of Blockchain.
The code creates in python and  I used Pycharm to create Clients and Nodes. I thought would add some docs ASAP.

Here is the link : https://github.com/L-KH/Blockchain-Demonstration (https://github.com/L-KH/Blockchain-Demonstration)

If you get any problem or something wrong please let me know.
feedbacks are appreciably welcomed.
& if you enjoy it and like it please add "star" in the upright side

Thanks


Title: Re: Blockchain Demonstration [Python, JS]
Post by: pooya87 on September 24, 2019, 02:42:54 PM
that can help beginners

for that i think you need to work more on the explanation part and start by explaining how to run this tool step by step and on each step you should try explaining what exactly is happening. for example
- what is a transaction (parts that it has, the role of previous transaction, scripts,...)
- what is the signature
- what are public/private key pairs
- what happens when you broadcast the signed tx
- how a block is mined
- how do nodes communicate with each other.

there is also something odd about the keys in your screenshot, from the code it seems like you are using RSA. why use that instead of Elliptic Curve DSA since it is more popular?
also are these keys encoded using DER? you might want to specify the encoding that your code accepts.

also this following part doesn't sound correct:
Quote
The blockchain is for authorizing payments of a cryptocurrency between two peers without the need for a centralized 3rd party approving of the transaction.
blockchain is only for "storing" the transaction history and "chain" or link them together using cryptography and in coins such as bitcoin by doing "work" hence the term proof of work. so blockchain only works as the public immutable ledger that only grows. the "authorization" happens by the user when they provide a digital signature.


Title: Re: Blockchain Demonstration [Python, JS]
Post by: kusanagi01 on September 24, 2019, 03:44:46 PM
that can help beginners

for that i think you need to work more on the explanation part and start by explaining how to run this tool step by step and on each step you should try explaining what exactly is happening. for example
- what is a transaction (parts that it has, the role of previous transaction, scripts,...)
- what is the signature
- what are public/private key pairs
- what happens when you broadcast the signed tx
- how a block is mined
- how do nodes communicate with each other.

there is also something odd about the keys in your screenshot, from the code it seems like you are using RSA. why use that instead of Elliptic Curve DSA since it is more popular?
also are these keys encoded using DER? you might want to specify the encoding that your code accepts.

also this following part doesn't sound correct:
Quote
The blockchain is for authorizing payments of a cryptocurrency between two peers without the need for a centralized 3rd party approving of the transaction.
blockchain is only for "storing" the transaction history and "chain" or link them together using cryptography and in coins such as bitcoin by doing "work" hence the term proof of work. so blockchain only works as the public immutable ledger that only grows. the "authorization" happens by the user when they provide a digital signature.

Maaaan!!! ;D Really Thank you very very much for your feedback. I am not that good in English but I tried to write and learn.
All that you said is totally true and amazing, really thank you.
I will try to explain all of that you notice, also I didn't know about Elliptic Curve DSA, I will check it now.
Thanks.

Best Regards