-
Notifications
You must be signed in to change notification settings - Fork 38.7k
qa: Fix race condition failures in replace-by-fee.py, sendheaders.py #11538
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
Conversation
|
Example of the sendheaders failure is here: https://travis-ci.org/bitcoin/bitcoin/jobs/290599516 |
instagibbs
left a comment
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.
utACK
test/functional/replace-by-fee.py
Outdated
| def run_test(self): | ||
| # Leave IBD and ensure nodes are synced | ||
| self.nodes[0].generate(1) | ||
| self.sync_all() |
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.
maybe stick the sync_call after the first make_utxo on line 79, just to be sure in the future?
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.
Sounds good, done.
|
utACK eb0064be6f33c3d0015d84be38eee4f7256d943b |
|
utACK eb0064be6f33c3d0015d84be38eee4f7256d943b |
eb0064b to
6d51eae
Compare
|
tested ACK 6d51eae |
Github-Pull: bitcoin#11538 Rebased-From: c96b2e4
Github-Pull: bitcoin#11538 Rebased-From: 6d51eae
…endheaders.py 6d51eae qa: Fix race condition in sendheaders.py (Suhas Daftuar) c96b2e4 qa: Fix replace-by-fee race condition failures (Suhas Daftuar) Pull request description: I think #11407 broke replace-by-fee by introducing a race condition. I was observing frequent failures of replace-by-fee locally, always with a mempool sync failure (the sync call was added in #11407). It appeared to me like there were two causes: sometimes the node would be in IBD and not request the transaction that was relayed; other times the blocks generated in make_utxo wouldn't have relayed quickly enough for the spend of the transaction to be accepted. I believe I've fixed both potential errors. ping @instagibbs Edit: I found a race condition in the sendheaders.py test, where if the verack from the python node wasn't processed before the first block in the test was generated, then no block announcement would go out to that peer, breaking the test. Fixed by adding a sync_with_ping after waiting for verack. Tree-SHA512: 6ad160966e432c151c1ce6e88ae67e60e47123523bda3755cf7697a00e1a5ba38de8561751826e3d7cf0e492f8c2aec298e1b4de8424ebbaf497f099a1ef1d07
|
Backported in #11550 |
To align with bitcoin#11538
I think #11407 broke replace-by-fee by introducing a race condition. I was observing frequent failures of replace-by-fee locally, always with a mempool sync failure (the sync call was added in #11407).
It appeared to me like there were two causes: sometimes the node would be in IBD and not request the transaction that was relayed; other times the blocks generated in make_utxo wouldn't have relayed quickly enough for the spend of the transaction to be accepted. I believe I've fixed both potential errors.
ping @instagibbs
Edit: I found a race condition in the sendheaders.py test, where if the verack from the python node wasn't processed before the first block in the test was generated, then no block announcement would go out to that peer, breaking the test. Fixed by adding a sync_with_ping after waiting for verack.