This commit is contained in:
pablo 2022-01-14 09:43:21 +01:00
parent a3619df8cf
commit 986d207a04
2 changed files with 90 additions and 17 deletions

View file

@ -41,25 +41,11 @@ The checksum for this entropy is computed the following way:
- Starting from the left, grab one bit of the hash for every 32 bits of length
in the original entropy (if the entropy is 128 bits, 128/32 = 4, you grab the 4
first bits of the hash).
```python
entropy = "01000010011111001011100101101111001010010110101011011111000001101000110111111001010000101000000110011010110011110110010000011001"
entropy_len = len(entropy)
import hashlib
hash_of_entropy = hashlib.sha256(entropy)
print(hash_of_entropy)
```
- I got bored of writing, so I made some code. See `seed_playground.py`.
----------
Another interesting fact: miner fees for a transaction are not explicitly
specified anywhere, but are simply calculated as the difference between the
inputs and the outputs of the transaction.
inputs and the outputs of the transaction.