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
[r2r] Implement ARRR swap in light mode. #1302
Conversation
…red SaplingSyncConnector.
# Conflicts: # Cargo.lock # mm2src/coins/Cargo.toml # mm2src/common/Cargo.toml
@sergeyboyko0791 @ozkanonur @shamardy Thanks for your notes! It’s ready for the next review iteration. |
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.
LGTM!
# Conflicts: # mm2src/coins/eth.rs # mm2src/coins_activation/src/z_coin_activation.rs # mm2src/db_common/src/sqlite.rs
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.
2nd review iteration
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.
The second review iteration :)
It mainly consists of questions
# Conflicts: # mm2src/mm2_test_helpers/src/for_tests.rs
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.
Last review iteration.
Only a couple of suggestions
let maker_coin_htlc_key_pair = self.maker_coin.derive_htlc_key_pair(self.uuid.as_bytes()); | ||
let taker_coin_htlc_key_pair = self.taker_coin.derive_htlc_key_pair(self.uuid.as_bytes()); |
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.
Can't self.unique_swap_data()
be used here instead of self.uuid.as_bytes()
?
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.
Yes, will change.
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.
Great work 🔥
I shared a suggestion, but it's not a blocker for this PR. Looks good to me!
@sergeyboyko0791 Last review notes fixed :) |
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.
Looks good to me 🔥
Thank you for the fixes!
* WIP. Fetched ZOMBIE compact blocks cache. * WIP building wallet DB for ZOMBIE. * WIP. Balance is shown incorrectly. * WIP. Got correct balance for ZOMBIE address from lightwalletd. * WIP. * Sent shielded transaction using light mode. * WIP. * ZcoinLightClient WIP. * WIP. Compilation fails. Saving dev state. * WIP. Deleted some unneeded code. * Cherry-pick from arrr-light-mode-experiments. * WIP. * WIP. Minor changes. * WIP. * WIP Zcoin light mode activation. * WIP Activated ZOMBIE in light mode. Got correct balance. * WIP. Working on withdraw. * WIP. Optimized SQLite. Added withdraw ZOMBIE test. * WIP. Got valid transaction from withdraw in light mode and broadcast it. * WIP. Implementing light wallet sync state handling using channels. * WIP. More refactoring. * WIP. * WIP. * WIP. Compilation fails. * WIP. Temporary Clippy fixes. Withdraw works. * Fix WASM. * WIP. Implementing state sync. * WIP. Added SaplingSyncStateConnector. * WIP. Added SaplingSyncRespawnHandle, SaplingSyncRespawnGuard, refactored SaplingSyncConnector. * WIP. Did the first RICK/ZOMBIE light mode swap. * WIP. Error handling. * WIP. Error handling. Removed unused code. * WIP. Trying AES. * WIP. Deriving HTLC privkeys. Compilation fails. * Finished HTLC privkeys derivation refactoring. * WIP. Checking lightwalletd response when tx does not exist. * Add watch_for_tx existence check in sync loop. Add ticker to activation response. * Fix WASM. * Fixes after merge. * Change HTLC private keys derivation algo for Zcoin. * Refactor to fix clippy::too_many_arguments. * Fix tests. * Replace block_in_place with async_blocking if required. * Update tonic, remove some deps duplicates. * WIP. * Refactor tests a bit, ignore long-running ones. * Disable blocks_cache_path for wasm32 arch. * Fix tests compilation. * More info about sync progress in init_z_coin_status. * A bit more refactoring. * Leave notes on how the light wallet state sync works. * Last minor changes. * Cargo.lock updated. * Fix review notes. * Fixes after merge. * One more fix (udeps). * Fix after merge. * WIP. Fixing review notes. * Use unique_swap_data() in try_spend_taker_payment. * Fix review notes. Co-authored-by: Artem Vitae <artem@vitae.com> Co-authored-by: Artem Vitae <email@not.set>
#927
Please note that there are few TODOs for the next iteration.
Also, native client doesn't work now and tx history is not available.