-
Notifications
You must be signed in to change notification settings - Fork 98
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
feat(zcoin): implement zcoin/pirate transport layer for WASM #1996
Conversation
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
# Conflicts: # Cargo.lock # mm2src/coins/Cargo.toml # mm2src/coins/z_coin/storage/walletdb/wasm/storage.rs # mm2src/coins/z_coin/z_rpc.rs # mm2src/mm2_main/src/wasm_tests.rs # mm2src/mm2_net/Cargo.toml # mm2src/mm2_net/src/lib.rs # mm2src/mm2_test_helpers/src/for_tests.rs
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, next iteration. some notes + one question
/// Download, validate and return z_params from given `DOWNLOAD_URL` | ||
async fn fetch_params(name: &str, expected_hash: &str) -> MmResult<Vec<u8>, ZcashParamsBytesError> { | ||
let (status, file) = FetchRequest::get(&format!("{DOWNLOAD_URL}/{name}")) | ||
.cors() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont use cors()
for FetchRequest::get
. Did you test it without cors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't work too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests fail without cors call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cors() doesn't fix cors issues with the server until the server was updated to allow all origin..so there's no reason to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove cors() then, if it doesnt change the situation.
Plus, I also used cors() in get req long time ago for nft, and GUI got some error on their side, after cors deletion error has gone.
As far as I remember there is no need to add cors in get req, browser does it itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@borngraced I have a question, did you check fetch_params
process with react-komodefi-wasm project? Everything was fine in logs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I didn't test with [react-komodefi-wasm](https://github.com/KomodoPlatform/react-komodefi-wasm)
yet. But I'll do that today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, if no cors issues in console, then fine
Signed-off-by: borngraced <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more notes
Signed-off-by: borngraced <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, one more note
Signed-off-by: borngraced <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work as always! Only 2 comments for now, will do one last review after this probably!
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes! Please fix wasm warnings of unused imports and fix conflicts!
Will probably do one final review round after this one!
Signed-off-by: borngraced <[email protected]>
…ort-layer # Conflicts: # mm2src/coins/z_coin.rs # mm2src/mm2_main/src/rpc/dispatcher/dispatcher.rs
Signed-off-by: borngraced <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next Iteration :)
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
Signed-off-by: borngraced <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
I've implemented a Zcoin transport layer that adheres to a common interface shared with the native transport. Additionally, I introduced helper functions within the
FetchRequest
and performed some refactoring in themm2_net
moduleZCoin
activation on the web