!ZdVDBBouJUyQVsewKn:monero.social

Monero Community Dev

144 Members
Web4!!! Non-core dev chat. Speak to others as you would speak to your grandchildren or grandparents. 17 Servers

Load older messages


SenderMessageTime
12 Apr 2024
@mainnet_pat:monero.socialpatI understand that current wasm files of monero-ts are beefy, and they will become even more beefy when base64 encoded.16:17:51
@woodser:monero.socialwoodserouch, couldn't imagine base64ing them16:18:41
@woodser:monero.socialwoodserI don't see the section relevant to wasms though16:20:11
@mainnet_pat:monero.socialpat

This?

export const getEmbeddedSha256Binary = () => base64ToBin(sha256Base64Bytes).buffer;
export const instantiateSha256 = async () => instantiateSha256Bytes(getEmbeddedSha256Binary());
16:22:23
@mainnet_pat:monero.socialpatI mean it is not explicit but if one'd follow the calls it will boil down to loading the wasm16:23:01
@woodser:monero.socialwoodserman, hope we wouldn't need to resort to that. it's just loading a wasm file with the new fetch, where it needs to handle file:// protocol I suppose. shouldn't be anything to devious16:25:08
@mainnet_pat:monero.socialpatI am not forcing you, just pointed out the alternative if it is a long-lived issue16:26:06
@woodser:monero.socialwoodser so far it's been long lived, where we have to keep the --no-experimental-fetch option 16:26:43
@woodser:monero.socialwoodserbut seems to me the people defining on fetch are missing a basic use case, or I'm totally missing something and how it's supposed to be done now16:27:31
@woodser:monero.socialwoodser * but seems to me the people defining fetch are missing a basic use case, or I'm totally missing something and how it's supposed to be done now16:27:38
@mainnet_pat:monero.socialpatright, but I am not node 20, fetch is available there and I am using it to post commands to monerod16:28:08
@mainnet_pat:monero.socialpatprimarily the generateblocks for my sandbox16:28:39
@mainnet_pat:monero.socialpatanother way around would be to define a static config member like, DEFAULT_REQUEST.requestApi = "xhr"16:30:10
@mainnet_pat:monero.socialpat * another way around would be to define a static config member like, DEFAULT_REQUEST.requestApi = "xhr" if it also affects the wasm file loading 16:31:35
@woodser:monero.socialwoodseryeah it might be that only the wasm file loading needs to be customized, and the rest can be with fetch16:32:06
@mainnet_pat:monero.socialpat * right, but I am on node 20, fetch is available there and I am using it to post commands to monerod16:32:55
@woodser:monero.socialwoodser don't know how to do that with the require statements though 16:32:56
@woodser:monero.socialwoodser which could also be converted to import and then .default 16:33:00
@mainnet_pat:monero.socialpatif it is modern, then you could do const worker = await import("web-worker")16:34:10
@mainnet_pat:monero.socialpat * if it is not cjs, then you could do const worker = await import("web-worker")16:34:33
@woodser:monero.socialwoodserit's all modern as far as I know, only converted to cjs for distribution16:34:52
@woodser:monero.socialwoodserif you take interest in tweaking the library to fix it for your next.js application, we can open bounties to fix these things16:35:21
@mainnet_pat:monero.socialpatwould be my pleasure, I enjoy working with monerot-s16:35:46
@mainnet_pat:monero.socialpat * would be my pleasure, I enjoy working with monerot-ts16:35:48
@woodser:monero.socialwoodserwould be more than welcome16:35:58
@woodser:monero.socialwoodserlet me know of any fixes you have and we can line up the bounties accordingly16:39:35
@mainnet_pat:monero.socialpatsure, not that I have them already, I will come back to you16:40:12
@woodser:monero.socialwoodserok16:40:18
@xh65k:frei.chat@xh65k:frei.chat left the room.17:01:32
@mainnet_pat:monero.socialpat @woodser I have identified that emsdk 3.1.10 has this fetch issue in the locateFile routine, if I put fetch as undefined there load the worker then reinstate it, all is green, I will try to use the most recent emsdk version to produce wallet_full.js and wallet_keys.js to verify if this workaround is still needed or the issue is fixed in this version 17:51:40

Show newer messages


Back to Room ListRoom Version: 9