-
Notifications
You must be signed in to change notification settings - Fork 130
Description
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)