Skip to content

SDK: MASP param storage is broken in NodeJS #1586

@jurevans

Description

@jurevans

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)

Metadata

Metadata

Assignees

Labels

Lib: SDKbugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions