-
Notifications
You must be signed in to change notification settings - Fork 94
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): ARRR WASM implementation #1957
Conversation
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
…sful Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
Signed-off-by: borngraced <samuelonoja970@gmail.com>
# Conflicts: # mm2src/coins/z_coin/storage/walletdb/mod.rs
Signed-off-by: borngraced <samuelonoja970@gmail.com>
# Conflicts: # mm2src/mm2_db/src/indexed_db/drivers/cursor/cursor.rs
@borngraced I've just encountered a previously unseen error testing on wasm:
Is this a concern? I'll restart and try again, just curious what might cause this. Seems that though some calls to the grpc are successful, a few are returning a protocol error. After clearing cache, next attempt was as expected:
|
this is simply a network error while fetching the request prob related to the server. I don't think it's an internal issue. Note: When requesting for block ranges, we split the request into chunks of 20k headers each and fetch concurrently. So if one request fails, all request other requests will be cancelled and we try again. also, I have only experienced network error once when I had actual internet problem. |
Thanks for clarifying, it is as I expected. We're on day 4 of a heatwave here and it seems hot enough to melt the copper my internet arrives on, so sounds like its a "me" problem. |
Unfortunately I'm getting these errors pretty consistently, likely due to my location / connection (unless replicated). {
"mmrpc": "2.0",
"result": {
"status": "Error",
"details": {
"error": "Error on platform coin ARRR creation: Database 'MAIN::21605444b36ec72780bdf52a5ffbc18288893664::z_compactblocks_cache' is open already",
"error_path": "lib.z_coin_activation.z_coin.z_rpc.blockdb_idb_storage.builder",
"error_trace": "lib:104] z_coin_activation:245] z_coin:995] z_rpc:517] blockdb_idb_storage:80] builder:166]",
"error_type": "CoinCreationError",
"error_data": {
"ticker": "ARRR",
"error": "Database 'MAIN::21605444b36ec72780bdf52a5ffbc18288893664::z_compactblocks_cache' is open already"
}
}
},
"id": null
} and browser tab needs to be refreshed before another attempt is possible. I checked the lightwallet server, and there was no issues in logs. Browser console logs revealed that even after mm2 returns network error, downloading continues in the background. cnx-fail.mp4Would it be possible to recover and continue rather than be forced to start again from the beginning? Or stopping d/l and closing db connection for second attempt? If not, perhaps an error message indicating that a reload is required before trying again. |
Perhaps not an issue, but I noticed that the response for zhtlc coin initialization once a coin has been activated remains static, i.e. if balance changes after activation completes, the balance at time of activation is still returned from the It would be nice if the status returned live values for balance and block_height, though this would likely also apply to other coins so beyond the scope of this PR (I'll convert to issue). Regression testing for TCP ZHTLC activation with a variety of optional param combinations was otherwise successful, with no defects found and no issues sending (with/without memo) or trading ZHTLC coins (as maker and taker). Wasm tests still in progress |
Given my issues with connection breaks for longer scans, I focused on the date/block param tests to (hopefully) have a connection stable long enough to activate. This was successful on first try, but the second one got stuck on activating, though console seemed to suggest it has completed. If clearing cache, I was once again able to activate. Video below at 3x speed to keep filesize low: forever-activating.webmThis was the third attempt of sequential leave cache / clear cache test. Note that the sync param was changed after the first successful attempt and the failed 2nd attempts before clearing cache. When the sync param does not change between attempts, activation completes successfully. Retesting this case on TCP, it was fine on the second activation with new sync params without needing to |
thanks for the well organized bug report 😄 . can you try again now, I believe it shouldn't stuck anymore when you cancel and try to re-activate coin again without refreshing or clearing cache. @smk762 |
# Conflicts: # Cargo.lock # mm2src/coins/eth/eth_tests.rs
Great work, thanks! Confirm I no longer faced issues attempting to activate zhtlc with wasm after changing sync params and not clearing cache. |
Unfortunately I've been unable to perform withdrawals with ZHTLC coins in WASM.
I also tried the v2 withdraw method, which returned
and the v1 withdraw method returns
|
@smk762, after the build is complete, you can use the rpc commands below to initiate a withdrawal |
Attempting to place a Replicated with same result in opera and brave. Placing a |
I loaded up cant-spend.mp4 |
@smk762 withdraw has been enabled and tested, you can try withdrawing now without any issue
This has been resolved too, you can now place |
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.
Confirming withdraw is functioning as expected.
Also completed swaps using setprice, buy and sell methods. During swaps, at times the tab would freeze for a bit, I assume while generating the required transactions. cc: @CharlVS this is something we should keep an eye on once adding zhtlc to the web wallet.
Thanks for your efforts @borngraced on this great feature!
* dev: feat(zcoin): ARRR WASM implementation (KomodoPlatform#1957) feat(trading-proto-upgrade): locked amounts, kmd burn and other impl (KomodoPlatform#2046) fix(indexeddb): set stop on success cursor condition (KomodoPlatform#2067) feat(config): add `max_concurrent_connections` to mm2 config (KomodoPlatform#2063) feat(stats_swaps): add gui/mm_version in stats db (KomodoPlatform#2061) fix(indexeddb): fix IDB cursor.continue_() call after drop (KomodoPlatform#2028) security bump for `h2` (KomodoPlatform#2062) fix(makerbot): allow more than one prices url in makerbot (KomodoPlatform#2027) fix(wasm worker env): refactor direct usage of `window` (KomodoPlatform#1953) feat(nft): nft abi in withdraw_nft RPC, clear_nft_db RPC (KomodoPlatform#2039) refactor(utxo): refactor utxo output script creation (KomodoPlatform#1960) feat(ETH): balance event streaming for ETH (KomodoPlatform#2041) chore(release): bump mm2 version to 2.1.0-beta (KomodoPlatform#2044) feat(trezor): add segwit support for withdraw with trezor (KomodoPlatform#1984)
This PR integrates zcash wallet db in WASM. All changes has been tested really well.
Tasks Completed in this Pull Request:
blocksdb
I/O functions forWASM
including unit testslight_wallet_db_synch_loop
function to be fully asynchronous and removed all uses ofblock_on
andblock_in_place
.scan_blocks
function toscan_validate_and_update_blocks
and refactored it into an asynchronous function.validate_chain
andscan_cached_block
functions to be fully asynchronous. Simplified the function processes for better manageability.zcash_params
an unit tests usingindexeddb
ARRR
that works almost same way with the current native transport and also support streaming dataARRR
web integration with changes toz_coin
mod.Deps Additions
z_coin transactions
z_coin transactions
.z_coin transactions
.z_coin transactions
.Deps Updated
NOTE
Some
walletdb
wasm tests are commented out because of long running time.