This script will help you to understand the way btc hashing works. Particularly mining process.
Todo:
- implement multiple miners
- implement random transactions
Possible output
Initial message: Alice sent 10 btc to Bob
hash of a message: b'000'
hash of a message: 4cfe243f7e2c6276d878bcac2c9cbe73fb1c38cc36428a2f56942f4ee42be8d4
hash of a message: fd21ca254e8ce9b5f5ac4cdf86b4255a36f04fe70cc73d014ebc29023539814d
hash of a message: e4e7f743499664e3628cd23f659809778c803f9ab50749b1d3bb15254a07bc40
hash of a message: b2fd8df687b9dc23fba5407841357ad615be5ff810c9b48a49e0dabaac2420e1
hash of a message: 8b9f3074ac1d30ee4bca196fe9ecba67dc9e59ca062574f77c14717987fe206a
hash of a message: fc7670c0aeb47630be92bc5a24beb30c1907692fcd710f96625304bb999d9a07
hash of a message: 5877e17aa71dc7fd1769442251bf64cf9ad2119362d95ac3f67cd7b8c0007135
hash of a message: 40f42bce45b1c49fe5d0f30edd5dca4e028215d5f3711d52173efa879420b1c7
hash of a message: 790e2cddf0800bec1c511f35ebb239ea464e8636fd242182c3aca7f623bbeafc
hash of a message: 8599e16e8474319ecfaa9c7abc0a6bda6f19f0436d800bb4b0dfc86cb2e56a28
hash of a message: f335f44f24af42f3327f0822bed615d174b75ff9002dd23ba39836cdf4113d5e
hash of a message: d28b3674ebf2b2a149d2bb8bb44ea26ad2051e156e36da863f0eb053be4b0e5b
hash of a message: 15e660d1c617bd33629381b6279e215467e31e9cfb057b8e3fa9829b4b914a4a
hash of a message: 01cecd30073ab43aa4028a0a5604b1c34fbd078c43bb7dbe92fbffbbd6b7634a
hash of a message: 26d6ce06e9e3867878273a677ca1bbfbd5c343f3e2f4f1ccf82e22e154fc0702
hash of a message: 6573f0398e4bfe0f0b849fc6fbc7c938ab5eb17e5b72b0ea8ba8bace014a914f
hash of a message: 01f638720dd73d15d4d5a8e6fb9556dda855feb89172baf7dbf88c9d3ed677db
hash of a message: fcfd8a08f54c7fc84dec3f90360e58c3149879edd5bcb1076ee3b512f5889cc6
hash of a message: 32da6fa61aa272331d69408b15e597b3ff02273adfe8c9e2abbe775a5506b7d1
hash of a message: 7d3a81b73d41464a3524cf0c91bedde21f97cd99f2f8e6bd9554a131e9355649
hash of a message: 8eb1e0f78adb449b9cde4ca7bfcc476eeb2be4687c5b663628c0fa2bd8bb6729
hash of a message: 3cd7fb5f38ae207fff7d2f6a58e73e7354d5d5a74e5d381372de044a7e57c02c
hash of a message: bf8e7e3e4e5820dc515a46efc8b6ca16ca89befc3820509cf2c1cbccbcd7d23f
hash of a message: 7e0525c507fa6910a6328a96f1a5e79d3e49f06035ceedb040efac89bd770754
hash of a message: b43193b7c61e1ad5e357c3dfb8c846a338ad9f0e1351bd18fbc1f2bf7cde08ab
hash of a message: 9ef01545e0a24d51e73c1f99d1e5a570a7719187bc9f89fae51863f2c4d5a5d1
hash of a message: fe855b83f0d10b5412875fff7e98d970df4f68b274939a34446769cc84b635ef
hash of a message: ca55626ce1ae1767bbccaa73970ad53841e29669e810d4132226c38bbfef5b51
hash of a message: 3a1f10532680e0fd2d241ee492ba05d33a8185d765d44dcfb1f382def39a3660
hash of a message: cf52ee1ed9b7ae6824c3b7217e5864ccbb42165f8d886322dd45bb55b83a1607
hash of a message: 68152467434c255492631543800b079e55f569202eb6254728f6980557331298
hash of a message: ca999dd953cea8f46240a929d822e2787a166326dcdce36c8e17c2923af850c3
RESULT: 002c2f89319bbc09d6fc2e87c1a0420cd4c8b9452de2b18d2c94452b0144536c