-
Notifications
You must be signed in to change notification settings - Fork 107
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
test(grpc): GetMempoolTx
and GetMempoolStream
test
#4537
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4537 +/- ##
==========================================
- Coverage 78.77% 78.72% -0.05%
==========================================
Files 305 305
Lines 38742 37423 -1319
==========================================
- Hits 30518 29461 -1057
+ Misses 8224 7962 -262 |
@oxarbitrage can you please sync this again now that the lightwalletd image issue was fixed? |
@Mergifyio update |
✅ Branch has been successfully updated |
Same issue persists after the CI fix... I'm investigating in #4626 |
This PR depends on CI and test fixes in PRs:
It might also depend on the sync fixes in PR: After those PRs merge, we should be able to make more progress on these tests. |
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.
I just noticed this typo.
Once PR #4848 is merged, let's update this branch with main
and see if the tests pass.
.await? | ||
.into_inner(); | ||
|
||
// Make sure transactions are returned from the mmepool |
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.
// Make sure transactions are returned from the mmepool | |
// Make sure transactions are returned from the mempool |
@Mergifyio update |
✅ Branch has been successfully updated |
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.
We need to find out how the GetMempoolTx gRPC is meant to work.
counter += 1; | ||
} | ||
// TODO: It seems to be a bug in `GetMempoolTx` as the grpc is not returning transactions | ||
// but we know there are transactions in the mempool as they are returned by `GetMempoolStream` test above. |
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.
Have you tried calling the RPCs in the opposite order?
It's possible that they only provide new mempool transactions.
while let Some(_txs) = response.message().await? { | ||
counter += 1; | ||
} | ||
assert!(counter > 0); |
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.
This assertion might be failing because lightwalletd is still syncing when the transactions are sent. When lightwalletd finishes syncing, it looks like it clears its internal mempool cache, so transactions are no longer available to clients.
(It should eventually re-check the mempool and get the transactions again. But the test will still be unreliable, because it doesn't wait.)
{"app":"lightwalletd","level":"info","msg":"Latest Block changed, clearing everything","time":"2022-08-01T05:30:30Z"}
https://github.com/ZcashFoundation/zebra/runs/7605046338?check_suite_focus=true#step:6:269
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.
I opened ticket #4894 to fix this.
It looks like we need to fix the full sync test, then this test should work. I've opened ticket #4894 in the next sprint to fix that. We can't make any progress on this PR until that's done, so I've moved this ticket to the next sprint as well. Feel free to re-open this PR when we start work on it again. |
Motivation
We have this 2 calls missing from the grpc tests.
Close #4350
Depends-On: #4663
Depends-On: #4704
Depends-On: #4848
Solution
One of the calls seems to be not working.
Review
Reviewer Checklist
Follow Up Work