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

Possible Regression in GetMempoolTx #401

Closed
hhanh00 opened this issue Jul 9, 2022 · 9 comments
Closed

Possible Regression in GetMempoolTx #401

hhanh00 opened this issue Jul 9, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@hhanh00
Copy link

hhanh00 commented Jul 9, 2022

What is the bug?
GetMempoolTx does not return any transaction in recent lightwalletd

An older version that ycash uses, works correctly.

Additional context

[hanh@archlinux zcash-sync]$ grpcurl lite.ycash.xyz:9067 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetMempoolTx
{
  "hash": "C0yilQ0NtBLSbM6IFbyK9KBPdz+1y9d8QeVICGu/H8U=",
  "spends": [
    {
      "nf": "CAdkTo8t3RHewf2ROu/eDYytA9rjde+hlPoxEN8vUUA="
    }
  ],
  "outputs": [
    {
      "cmu": "XWoqMrl1oYkQn8D1ObzyRKDN6aCyT6YkOn6AJrUZDkg=",
      "epk": "JSHqG5D9zhGsbFk7ujGL3J08KgB4EtkqsLXA7WofRI0=",
      "ciphertext": "nfHhEOGxzOvea4gSWPO7cWoN7q5eKvvCMM66RC4Lom4mc39sX571ZDS++gXwJ0sVUeoOvg=="
    },
    {
      "cmu": "jpezvyj5S1uhauSy+SMOfJ4iSk6Ku9FWrtH1vzV2Ggc=",
      "epk": "3efWwcVDaJ06Gxtu8YuYXBf6gtthazgYSJw9m4vp12A=",
      "ciphertext": "G3cYp51N6sVgL9W096qfoVvo0c6Vjd/zd+IRrIMOXB8pzSC0bcxfhRB5HmNFoGjzA55MJA=="
    }
  ]
}
[hanh@archlinux zcash-sync]$ grpcurl mainnet.lightwalletd.com:9067 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetMempoolTx
[hanh@archlinux zcash-sync]$

[hanh@archlinux zcash-sync]$ grpcurl mainnet.lightwalletd.com:9067 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetMempoolStream
[hanh@archlinux zcash-sync]$

GetMempoolStream does not seem to work either.

@hhanh00 hhanh00 added the bug Something isn't working label Jul 9, 2022
@mdr0id
Copy link
Contributor

mdr0id commented Jul 9, 2022

Howdy @hhanh00,
Thank you for the report. What version of lwd is that endpoint running by chance? And do you know if it is a mirror of the current lwd stack or its own implementation from a fork?

@hhanh00
Copy link
Author

hhanh00 commented Jul 10, 2022

It's a fork of zcash/lightwalletd.

https://github.com/ycashfoundation/lightwalletd

@LarryRuane
Copy link
Collaborator

I thought I was reproducing the problem (on zcash/lightwalletd), but it turned out that no entries were being returned because my zcashd node was syncing (catching up with the tip of the chain, I had recently started it). While it's syncing, zcashd is discovering new blocks quickly, and lightwalletd learns about each of these new blocks from zcashd, and when lightwalletd learns of a new block, it immediately completes any in-progress GetMempoolStream requests (this is by design), and during that (very brief) block interval, it's unlikely that any new transactions entered the mempool. So during this time, each call will return an empty list almost immediately.

But once zcashd has synced with the actual tip of the current chain, the GetMempoolStream began working as expected for me.

In case it's helpful, one way to tell if zcashd is still syncing is to see how quickly the "Block height" value is increasing in the window where you're running zcashd, or look at the latest UpdateTip message in zcashd's debug.log file, and compare the logging timestamp (the first field) with the block timestamp (after the "date=" toward the end of each line). If those differ by much, it's still syncing. Or you can tail -f debug.log and see how quickly the UpdateTip messages are appearing.

Can you verify that the problem isn't there once your zcashd (or ycashd) is synced with the tip? If the problem is still there, then there's some other problem I'll need to investigate. Thanks.

@hhanh00
Copy link
Author

hhanh00 commented Jul 18, 2022

[hanh@archlinux warp]$ grpcurl mainnet.lightwalletd.com:9067 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLatestBlock
{
  "height": "1741781",
  "hash": "E49dxB8DzcXel4EpfimX3qlMYrdhq9onobA3AQAAAAA="
}
[hanh@archlinux warp]$ grpcurl mainnet.lightwalletd.com:9067 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetMempoolTx
[hanh@archlinux warp]$ grpcurl mainnet.lightwalletd.com:9067 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetMempoolStream

image

Same problem whether lwd is synced or not.

I don't have access to the zcashd behind mainnet.lightwalletd.com as it is not my deployment.

@LarryRuane
Copy link
Collaborator

Sorry, I misinterpreted the symptoms. I think #404 will fix this. If you're able, can you run the latest master branch locally and see if the problem is fixed?

@LarryRuane
Copy link
Collaborator

This lightwalletd has been upgraded (you could see if this problem is fixed using this instance):

$ grpcurl lightwalletd.electriccoin.co:9067 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLightdInfo | jq .version
"v0.4.13"

This one hasn't been updated yet (so will still have the bug):

$ grpcurl mainnet.lightwalletd.com:9067 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLightdInfo | jq .version
"v0.4.12-5-gdb2795a"

I don't know who runs that instance.

@hhanh00
Copy link
Author

hhanh00 commented Jul 25, 2022

Thanks, the issue is solved on lightwalletd.electriccoin.co.

mainnet.lightwalletd.com:9067 is run by the NightHawk team.

Is your server lightwalletd.electriccoin.co available for public usage? Or it's for your own development? I would like to know if it's ok to add it to the list of public servers in my wallet.

@r3ld3v
Copy link

r3ld3v commented Jul 25, 2022

Hi @hhanh00. Our server is just for our internal usage at the moment. Thanks for checking!

@LarryRuane
Copy link
Collaborator

Thanks for verifying, @hhanh00, I'll close this now; feel free to reopen it if you still see the problem on v0.4.13 or beyond.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants