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

Multicore support #27

Merged
merged 8 commits into from Mar 22, 2023
Merged

Multicore support #27

merged 8 commits into from Mar 22, 2023

Conversation

Duddino
Copy link
Member

@Duddino Duddino commented Mar 20, 2023

Adds multicore support. The feature will only be enabled if the browser supports it.
To build with multicore, run the script
./build_multicore.sh.
To build without,
wasm-pack --target web.
Both should be built to make sure the browser can fetch the one it needs.

On MPW side, the following headers should be set on the dev server:

headers: {
	    "Cross-Origin-Embedder-Policy": "require-corp",
	    "Cross-Origin-Opener-Policy": "same-origin",	
}

Closes #27

Copy link
Member

@panleone panleone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

early review: multithreading is working really well impressive job! on my PC now it is something like x10 faster.

There are still some problems: some await are missing in pivx_shielding.js and on MPW spent notes are not removed from the list leading to errors

@Duddino Duddino force-pushed the multicore branch 4 times, most recently from be7e70d to ae28c75 Compare March 21, 2023 12:51
@Duddino Duddino marked this pull request as ready for review March 21, 2023 12:54
@Duddino Duddino self-assigned this Mar 22, 2023
@panleone
Copy link
Member

can you rebase this on master?

Copy link
Member

@panleone panleone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 603f959
heavily tested:
On firefox this with 31 spent notes took less than 3 minutes
https://testnet.rockdev.org/tx/b580f57f19a356ae27c23718933667c47a8d340f957d12ab2d61c81bd4d95638

On chromium this with 31 spent notes took about 5 minutes
https://testnet.rockdev.org/tx/0249e53e723306b11a57bf3150ec18943296891391c1d7afa2ca095c63d0e9be

Only one problem: note spent ONLY IN s->t shield transaction are not removed right after the tx is confirmed (in s->s everything works fine) but we can fix it in another PR
Update: looks like it is not working only on big shield tx

@Duddino
Copy link
Member Author

Duddino commented Mar 22, 2023

Just a comment: Stable Safari does not support this because of this bug: https://bugs.webkit.org/show_bug.cgi?id=25212, which has already been fixed at least since November 2022 on Technology Preview

@Duddino Duddino merged commit 15e6f55 into PIVX-Labs:master Mar 22, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants