-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconstructing Transactions from CBOR does not preserve the structure #311
Comments
Comparing the CBOR hexs one can actually see that there is a slight difference on how the list of certificates are encoded (likely unbounded list vs bounded list):
|
Maybe related to #330 |
@nielstron I am reasonably certain our issues are related. From your example, I plugged this into the CBOR playground. In the original CBOR, there is a definite list that is getting converted to an indefinite list in deserialization. I believe this is the same issue I'm having with plutus data hashing in #330 The change in CBOR is nominally changing the cbor, which affects the hashing. Working on a fix now. |
I also noticed that definite lists are missing from the |
Ugh, you did. I missed that comment 😅 Well, I'm going to track it down and send a PR shortly. I need this for cancelling dex transactions. I'll make sure to include a test for your case. |
So...this ended up being significantly more complex than I realized. I thought worst case scenario was to create a custom decoder analogous to the custom encoder. It turns out that I opened an issue. I have a nominally refactored version of their code that would at least allow us to subclass the decoder. I'll submit a PR for that and see how that goes. |
Fix WIP: #331 |
Describe the bug
I am currently looking at implementing chain synchronization based on the building blocks provided by pycardano. For this it is crucial that the transaction id is preserved. There are some transactions for which the reconstructed transaction computes to a different hash than the original transaction.
To Reproduce
Example transaction: f2470890db9c93ed3a98329835a442e70a0b040c53b680a5284be9e80e9d6d89
Expected behavior
The hash should match
Environment and software version (please complete the following information):
The text was updated successfully, but these errors were encountered: