-
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
Get details from transaction differences in getrawmempool
#6035
Conversation
The mempool part will not be executed if there are no differences so you need to execute it several times to catch a diff and then get the full data. For example:
So here we have a transaction which is in zcashd but not in zebrad that we could investigate:
The output also shows one of the transactions (b18063362e72717855d8df6e614bc9c1e75974f87e481822451e8fdfedf77c52) is big enough to fail being a command line argument to |
Here's how you can read the transaction data from a file, to fix that issue: zebra/zebra-utils/zcash-rpc-block-template-to-proposal Lines 197 to 201 in 00e7418
Each extra argument needs to be on its own line, in this case you just have one argument - the transaction data:
|
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 looks great, thanks for putting it together!
I have some suggestions for making the command-line argument changes more flexible and compatible with existing setups.
I also think we might need to get transaction data from zcashd to diagnose some mempool differences.
These changes look good, but I haven't tested them yet. |
I tested these changes using this shell script: SAME=0; while zcash-rpc-diff 28232 getrawmempool; do SAME=$((SAME + 1)); echo "$SAME identical mempools"; sleep 10; date; done I found a difference, but it seems like Here is what I got, with some long data removed:
Here is the full transaction data: |
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 great, all my suggestions are optional, the script works well!
What I am getting on testnet from that script:
|
Another difference from mainnet, Zebra had this transaction, This appears to be a timing issue, but I have attached the full transaction content in case we want to do further analysis. (I deleted an identical 3.6 MB transaction from |
Same for my third difference, looks like
|
Co-authored-by: teor <[email protected]>
Motivation
We know there are differences sometimes in the zebrad mempool and the zcashd one. We want to know what are the differences by getting transaction content among other data (tx hash, height).
This is for #5935
Solution
Review
This has a problem. When a transaction is too big, the call to
decoderawtransaction
will fail withArgument list too long
. This is an OS limitation and it seems not trivial to change the argument limit in linux, i am not sure ifzcash-cli
accepts a file as argument and if this can solve the problem. Researching alsoxargs
but unsure if will work either.The PR is a draft until i can fix that, ideas are welcome.
Reviewer Checklist
Follow Up Work