TryQuiet / zbay

GNU General Public License v3.0
18 stars 3 forks source link

Modify zecwallet-light-cli and lightwalletd to work with 0 confirmation transactions #217

Open holmesworcester opened 4 years ago

holmesworcester commented 4 years ago

Being able to see 0 confirmation transactions is important for latency when receiving memos. We should confirm that we can request to see 0 confirmation transactions using zecwallet-light-cli.

holmesworcester commented 4 years ago

We're going to do this in-house I think.

holmesworcester commented 4 years ago

Another option is to receive transactions from the mempool ourselves, which we think is faster, and which we can do exclusively on our end. There are security and privacy considerations as well.

NorbertBodziony commented 4 years ago

Marek's idea is to use https://developer.aliyun.com/mirror/npm/package/zcashcore-p2p/v/1.1.4 but we will need some rust code from cli to parse message.

holmesworcester commented 4 years ago

@NorbertBodziony can you specify what calls we would need from zecwallet-light-cli to parse messages? Will we be adding this code as a PR?

holmesworcester commented 4 years ago

Noting that ECC might be working on this internally.

NorbertBodziony commented 4 years ago

@NorbertBodziony can you specify what calls we would need from zecwallet-light-cli to parse messages? Will we be adding this code as a PR?

We will need to check if transaction matches one of our keys if yes then we decode it to retrieve memo.

gmale commented 4 years ago

Noting that ECC might be working on this internally.

@holmesworcester We are, in fact, working on this and that work is tracked in this ticket. Essentially, we are still in the research phase.

Unfortunately, this is one area that could leak privacy info so it looks like we will not be able to do things efficiently. Most likely, we will have to download the entire mempool every time but that will be an implementation detail on the client-side. On the server-side, the function will most likely be implemented as a "mempool diff" that gives you the contents of the mempool that differ from the transactions provided. To get the entire mempool, the client will just pass no transactions.