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

Kaspa WASM: recursive use of an object detected which would lead to unsafe aliasing in rust #1

Closed
coinchimp opened this issue Aug 8, 2024 · 2 comments

Comments

@coinchimp
Copy link
Owner

Happening when transaction is submitted:

    for (const transaction of transactions) {
      if (DEBUG) this.monitoring.debug(`TrxManager: Payment with ransaction ID: ${transaction.id} to be signed`);
      await transaction.sign([this.privateKey]);
      if (DEBUG) this.monitoring.debug(`TrxManager: Payment with ransaction ID: ${transaction.id} to be submitted`);
      await transaction.submit(this.processor.rpc);
      if (DEBUG) this.monitoring.debug(`TrxManager: Payment with ransaction ID: ${transaction.id} submitted`);
      await new Promise(resolve => setTimeout(resolve, 5000)); // 5-second delay
    }

this is the error:

8-Aug-2024 12:00:05 DEBUG TrxManager: Payment with ransaction ID: 0fdf3d90382cc7d87f84aa69fceaa1d9b6f7be0c9ae1be65dac32a3b7a551f3e submitted
8-Aug-2024 12:00:10 DEBUG TrxManager: Payment with ransaction ID: 65d49fe897930ab5e071ee55cfa9ff9e670caa95e541876303b8533643bc7b40 to be signed
8-Aug-2024 12:00:10 DEBUG TrxManager: Payment with ransaction ID: 65d49fe897930ab5e071ee55cfa9ff9e670caa95e541876303b8533643bc7b40 to be submitted
13532 |     getInt32Memory0()[arg0 / 4 + 1] = len1;
13533 |     getInt32Memory0()[arg0 / 4 + 0] = ptr1;
13534 | };
13535 | 
13536 | module.exports.__wbindgen_throw = function(arg0, arg1) {
13537 |     throw new Error(getStringFromWasm0(arg0, arg1));
                  ^
error: recursive use of an object detected which would lead to unsafe aliasing in rust
      at /app/wasm/kaspa/kaspa.js:13537:11
      at <?>.wasm-function[6944]
      at <?>.wasm-function[6946]
      at <?>.wasm-function[4837]
      at /app/wasm/kaspa/kaspa.js:7104:44

Bun v1.1.22-canary.83+1aa35089d (Linux x64)
@coinchimp
Copy link
Owner Author

coinchimp commented Aug 8, 2024

I got a new WASM.zip from aspect and it's working so far. Issue also reported at kaspanet/rusty-kaspa#516

@coinchimp
Copy link
Owner Author

After many tests, the fix seems to be working fine.

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

No branches or pull requests

1 participant