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

[r2r] ARRR integration WIP. #1237

Merged
merged 47 commits into from
Apr 27, 2022
Merged

[r2r] ARRR integration WIP. #1237

merged 47 commits into from
Apr 27, 2022

Conversation

artemii235
Copy link
Member

@artemii235 artemii235 commented Mar 29, 2022

  • Added orderbook and best_orders 2.0 RPCs.
  • Set different PeerId as message source for orders/swaps messages using random p2p_privkey for more privacy.
  • Implemented Zcoin activation using RPC tasks.
  • Started implementing light wallet mode.

#927

@artemii235 artemii235 changed the title ARRR integration WIP. [wip] ARRR integration WIP. Apr 14, 2022
@artemii235
Copy link
Member Author

@shamardy @ozkanonur @sergeyboyko0791 It's ready for next review iteration 🙂

@artemii235 artemii235 changed the title [wip] ARRR integration WIP. [r2r] ARRR integration WIP. Apr 15, 2022
shamardy
shamardy previously approved these changes Apr 18, 2022
Copy link
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

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

LGTM!

let pubsecp = hex::encode(key_pair.public_slice());

// Artem Vitae
// I tried if let Some(p2p_privkey) = order_mutex.lock().await.p2p_privkey
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cloning of the order has to be used to drop the mutex in this case, if let Some(p2p_privkey) = order_mutex.lock().await.clone().p2p_privkey will work but I guess just using drop(order) is ok as it avoids cloning.

Copy link

@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

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

Last review iteration
Just a few comments

mm2src/common/privkey.rs Show resolved Hide resolved
},
#[cfg(not(target_arch = "wasm32"))]
// TODO ask Slyris
CoinProtocol::SOLANA | CoinProtocol::SPLTOKEN { .. } => unimplemented!(),

Choose a reason for hiding this comment

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

Leave this comment just not to forget

Copy link

@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

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

LGTM!

@artemii235 artemii235 requested a review from ca333 April 21, 2022 10:36
ca333
ca333 previously approved these changes Apr 21, 2022
Copy link
Member

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

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

Good Work! Just a couple of minor suggestions. Looks all good to me :)

@@ -153,6 +153,10 @@ impl ZCoin {

pub fn rpc_client(&self) -> &UtxoRpcClientEnum { &self.utxo_arc.rpc_client }

pub fn is_sapling_state_synced(&self) -> bool { self.z_fields.sapling_state_synced.load(AtomicOrdering::Relaxed) }
Copy link
Member

Choose a reason for hiding this comment

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

I think it's better to inline this function.

mm2src/coins/z_coin.rs Show resolved Hide resolved
mm2src/coins/z_coin.rs Outdated Show resolved Hide resolved
mm2src/lp_ordermatch/best_orders.rs Show resolved Hide resolved
mm2src/lp_ordermatch.rs Outdated Show resolved Hide resolved
@artemii235
Copy link
Member Author

@ozkanonur I've done all fixes, could you recheck the PR, please?

@onur-ozkan
Copy link
Member

@ozkanonur I've done all fixes, could you recheck the PR, please?

Great work, looks good for me. 🔥

onur-ozkan
onur-ozkan previously approved these changes Apr 22, 2022
@artemii235 artemii235 merged commit 3b79a87 into dev Apr 27, 2022
@artemii235 artemii235 deleted the arrr-light-mode branch April 27, 2022 08:07
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.

6 participants