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

SDK: MASP param storage is broken in NodeJS #1586

Open
jurevans opened this issue Jan 27, 2025 · 0 comments · May be fixed by #1590
Open

SDK: MASP param storage is broken in NodeJS #1586

jurevans opened this issue Jan 27, 2025 · 0 comments · May be fixed by #1590
Assignees
Labels
bug Something isn't working Lib: SDK

Comments

@jurevans
Copy link
Collaborator

jurevans commented Jan 27, 2025

As we have never had a use-case to completely support all features in NodeJS, I'm not sure whether to log this as a bug or a new feature.

When attempting to do MASP-related functions using the @namada/sdk package in NodeJS, the storage functionality surrounding MASP params is broken, and that seems to be what is breaking the shielded context functionality. Storage of MASP params was written for IndexedDB (which is not natively supported in NodeJS), so for Node specifically, this needs to be fixed.

I attempted a work-around in the example repo (see: masp.js), however, this leads to other issues. Simply implementing an instance of IndexedDB in Node isn't quite enough, potentially due to bugs in the node-indexeddb package. Also, even if this were to work completely, I don't think this would scale well, as it is simply an interface to a flat-file level-db instance (for persistence) and would ultimately use up a lot of memory. NodeJS should simply store the MASP params in the specified dir and load from there. No need for IndexedDB (this is useful on Web because of the large file size, but unneeded for Node)

@jurevans jurevans added bug Something isn't working Lib: SDK labels Jan 27, 2025
@jurevans jurevans self-assigned this Jan 27, 2025
@jurevans jurevans changed the title Extension: SDK storage is broken in NodeJS Extension: MASP param storage is broken in NodeJS Jan 27, 2025
@jurevans jurevans changed the title Extension: MASP param storage is broken in NodeJS SDK: MASP param storage is broken in NodeJS Jan 28, 2025
@jurevans jurevans linked a pull request Jan 29, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Lib: SDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant