Closed cipherzzz closed 6 years ago
The headers are not hashed with blake256.
Take a look at my branch. I managed to make it work but with an ugly hack "Allow advancing errors" where it circumvents the transaction invalidation feature of the Decred blockchain.
Also I haven't had the time to clean up and release the pow_hash lib, but any python blake256 lib will do, just run the tests to be sure that it works.
Closing as @erasmospunk explains. Have you thought about how blocks form a chain? It has nothing to do with transactions.
@kyuupichan - Thank you for your feedback and a great product. I understand the chaining issue - we have to use a different algorithm for decred. This is the first python project I've worked on and I am new to blockchain tech.
@erasmospunk - I guess we are both working on the same thing... I looked at your deserialization logic and there is an issue that is not apparent from the decred documentation. The transactions are deserialized based on a 'type' that is derived from the 'version' bytes. There are 5 'types' (0-5) and for the types that contain witness data, there is a witness object for each input. Take a look at this repo and excuse my python - this is my first python project. https://github.com/cipherzzz/decred_tx_py_parser
Hello, I am deserializing the Decred transactions, but keep getting a loop of
I am not sure what is causing the above error. Here is my code - any help would be appreciated:
coins.py
tx.py
Also, here is my ENV startup