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

Add support for Boxes #191

Closed
manuelmauro opened this issue Nov 3, 2022 · 11 comments
Closed

Add support for Boxes #191

manuelmauro opened this issue Nov 3, 2022 · 11 comments

Comments

@manuelmauro
Copy link
Owner

Reference commit on py-algorand-sdk: https://github.com/algorand/py-algorand-sdk/pull/348/files

@Sam2much96
Copy link

Just Noticed this while posting some Pyteal code to Algonaut. Thanks for making it high priority!

@Astewart1510
Copy link

Hi there! has there been any progress on this? Desperately needing support for boxes ASAP.

@Sam2much96
Copy link

I think so. Consider checking the docs.rs. It could've been among the most recent commits made recently

@Astewart1510
Copy link

Thanks @Sam2much96 for the reply. I have just checked the doc.rs ... I dont think its been commited... https://docs.rs/algonaut_model/0.4.2/algonaut_model/transaction/struct.ApiTransaction.html

Do you know when this would be implemented?

@Astewart1510
Copy link

@manuelmauro do you have any update on this progress currently? desperately needing support for boxes

@Sam2much96
Copy link

Sam2much96 commented Jun 1, 2023

It isn't in any of the pull requests, open or closed unfortunately, but looking through the Source Code shows that there's code implemented to Search for Box Storages from a SmartContract's app ID. May i suggest you use the Python SDK for implementing the Box storages? or perhaps reconsider Global storage? because, whereas Algonaut cannot programmatically create box storages, it can Search through them. Also, seeing as how it wasn't included in the docs.rs, the documentation might need updating on Box storage implementation in Algonaut. Lastly, Mr Mauro is a Senior engineer at the Foundation, please avoid tagging him directly unless it involves testing data, or critical bugs.

@manuelmauro
Copy link
Owner Author

Hey @Astewart1510! Support for boxes is certainly on top of my list. Unfortunately, being algonaut a personal project, I can't give a clear deadline on when I will get the time to implement it. @Sam2much96 thanks for helping out with your suggestions. Concerning the tagging though, please @Astewart1510 and everyone watching this project feel free to tag me directly for any matter!
Lastly, if someone feels like drafting a PR adding box support, I am happy to review and work on that together!

@Astewart1510
Copy link

Thank you @manuelmauro for allowing me to tag you, you are so kind!
Thanks @Sam2much96 for the suggestions, you have been a huge help. Unfortunately for our project, we have to sign it in Rust because these are where our signing keys sit ( on our backend in a TEE).
So currently we are trying to create an unsigned transaction using the js-algosdk and then pass it into a rust programme (our backend) that uses the algonaut SDK to sign the transaction. To pass the unsigned transaction successfully from JS to rust we have to modify the exisitng txn that the js-algosdk produces and rename the field names to their codec property names "apid", "apaa", "apbx" etc, we found this is the only way to get the algonaut SDK to recognsize the transaction properties..
We then pass back the signed transaction to javascript to issue to the blockchain.

We can get all different types of transactions working but we cant get the box references right, we have tried to hack/stitch the box references into the algonaut SDK but unfortunately, when we issue the signed transaction to the blockchain, we keep receiving the error :

LOG: URLTokenBaseHTTPError: Network request error. Received status 400 (): At least one signature didn't pass verification
URLTokenBaseHTTPError: Network request error. Received status 400 (): At least one signature didn't pass verification

Or this error:
invalid : tx.Boxes[0].Index is 225020720. Exceeds len(tx.ForeignApps)

@Astewart1510
Copy link

We just managed to figure it out. So all is good and well. 👍

@manuelmauro
Copy link
Owner Author

Addressed by @k13n in #235 Thanks!

@Sam2much96
Copy link

Sweet. Thanks for this @k13n

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

No branches or pull requests

4 participants
@manuelmauro @Sam2much96 @Astewart1510 and others