Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: kasscrypto on January 30, 2020, 04:54:46 PM



Title: Blockchain Development Mega Guide
Post by: kasscrypto on January 30, 2020, 04:54:46 PM
The blockchain learning ecosystem has changed a lot since I first started. So I thought I'd share some of the cool sh*t I've either created or found on the web.  

The Mega Guide
Blockchain Development Mega Guide (Medium) (https://medium.com/programmers-blockchain/blockchain-development-mega-guide-5a316e6d10df)

Free courses
These are about understanding more than programming but... It's a decent start.

Blockchain Technology (https://www.edx.org/course/blockchain-technology) - Berkley
Bitcoin and Blockchain (https://www.khanacademy.org/economics-finance-domain/core-finance/money-and-banking#bitcoin) - Khan Academy
Cryptography Course (https://crypto.stanford.edu/~dabo/courses/OnlineCrypto/) - Stanford
Blockchain Fundamentals (https://www.pluralsight.com/courses/blockchain-fundamentals) - Plural sight
Blockchain Principles and Practices (https://www.pluralsight.com/courses/blockchain-principles-practices) - Plural sight
Hyperledger Blockchain Technologies (https://www.edx.org/course/introduction-to-hyperledger-blockchain-technologie) - Linux Foundation
Introduction to FinTech (https://www.edx.org/course/introduction-to-fintech) - Hong Kong University

Resources

How to become a blockchain developer (https://blockgeeks.com/guides/blockchain-developer/)
I don't know why they chose javascript to demonstrate lol, but otherwise, this is a solid guide!

https://asecuritysite.com/encryption (https://asecuritysite.com/encryption)
Site is kinda ugly, but packed with information about cryptography, with demonstrations and code.

https://en.bitcoin.it/wiki/Category:Developer (https://en.bitcoin.it/wiki/Category:Developer)
The bitcoin wiki developer page.


What the Guides don't tell you...
There are a good few things these guides don't tell you. These aren't hard concepts but are often glossed over or replaced with a more convenient learning example.

...about mining
In practice, mining isn't really about looking for a hash starting with serval '0' bits. Mining actually requires finding a hash that has a numerical value is less than a target hash (this results in a number of '0' bits). That target hash can be calculated from the difficulty. Bitcoin wiki page on difficulty. (https://en.bitcoin.it/wiki/Difficulty)

pseudo code:
Code:
hash = sha256(block)
if big_endian(hash) < big_endian(target_hash):
  mined = true

...about adjusting difficulty
Difficulty must be adjusted to keep up with the changing hash rate of the network (to keep a block time of say 10 mins). The easiest way is to adjust the current target based on how much faster or longer it took to mine X blocks.

pseudo code:
Code:
target_hash = big_endian(diff_to_target(difficulty))
quotient = epoch_duration / expected_duration
new_target_hash = target_hash * quotient

difficulty = target_to_diff(new_target_hash)

I will add more to this when I get a chance
Happy Coding


Title: Re: Blockchain Development Mega Guide
Post by: odolvlobo on January 31, 2020, 07:22:09 PM
This is also a good resource:

https://bitcoin.org/en/developer-guide


Title: Re: Blockchain Development Mega Guide
Post by: tromp on February 12, 2020, 04:34:24 PM
...about mining
In practice, mining isn't really about looking for a hash starting with serval '0' bits. Mining actually requires finding a hash that has a numerical value is less than a target hash (this results in a number of '0' bits).

There's more to mining than hashing:

http://cryptorials.io/beyond-hashcash-proof-work-theres-mining-hashing/


Title: Re: Blockchain Development Mega Guide
Post by: DaCryptoRaccoon on February 12, 2020, 05:44:54 PM
Another good way to visualize what is going on in the mining process it to have a look at the mining simulator.

https://yogh.io/#mine:last

This gives a good overview of how the process works in a visual manner. 

The source code is also available on github

https://github.com/yogh-io/bitcoin-transaction-explorer