Skip to content
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

Data is uploaded incorrectly when uses_uploader=False #26

Closed
ldmberman opened this issue Jan 3, 2022 · 5 comments
Closed

Data is uploaded incorrectly when uses_uploader=False #26

ldmberman opened this issue Jan 3, 2022 · 5 comments

Comments

@ldmberman
Copy link
Contributor

There is a bug where data passed directly to a Transaction object is not uploaded correctly. It computes data_root from the Base64URL encoded data so the nodes do not recognize it and do not accept the original data.

An example. data_root computed from the raw data is yiIbdak6AXJ17hGF5EJC_FpleCvd3pBe2c4jSZpRDVM whereas the tx was signed with XTcZfQOhQ0byq0NjAfJbYynVMyX6fkd4IBIfRR3S0IA - the value consistent with computing data_root from a Base64URL encoded blob.

To fix the issue it should be sufficient to decode here and here.

@MikeHibbert
Copy link
Owner

Thanks for heads up, fancy submitting a PR for some project credit?

ldmberman added a commit to ldmberman/arweave-python-client that referenced this issue Jan 3, 2022
@ldmberman
Copy link
Contributor Author

Hi @MikeHibbert, thank you for the quick reply, opened one. What would you say to removing the older versions of the library from the package repositories?

@MikeHibbert
Copy link
Owner

I'll take a look and maybe remove some older ones but I'm uncertain about removing the more recent ones in it causes dependency issues.

What makes you think this is a thing that will help?

@ldmberman
Copy link
Contributor Author

The motivation is to prevent people from uploading the wrong data.

@0xEnrico
Copy link

0xEnrico commented Jan 3, 2022

@MikeHibbert please have a look at this explanation: 0xEnrico/arweave-nft-uploader#14 (comment)

Basically, if I understood well, only the arweave.net cache keeps the data, while the nodes discard it. That is, when/if the cache gets flushed, the data is gone if it was uploaded using the data= field in the constructor...

Seems to me a quite serious issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants