-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
blockchain sync: reduce disk writes from 2 to 1 per tx [RELEASE] #9740
base: release-v0.18
Are you sure you want to change the base?
blockchain sync: reduce disk writes from 2 to 1 per tx [RELEASE] #9740
Conversation
The line changes differ significantly from the |
@@ -158,6 +159,48 @@ def test_p2p_reorg(self): | |||
loops -= 1 | |||
assert loops >= 0 | |||
|
|||
# create a transaction which both daemons have in their pool |
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 file has changed quite a bit on the release branch, probably a good idea to rebase and then adjust any changes you want to keep.
daemon2 = Daemon(idx = 2) | ||
daemon3 = Daemon(idx = 3) | ||
|
||
# check precondition: txid in daemon2 mempool |
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.
Probably easier to follow if you just fold this test into the tx_propagation
test at the end, as it's quite intimately related (the first part would test pooled tx propagation, and the second part tx in block propagation). For an example of the overlap, the "precondition" here vanishes, because it's already been checked at the end of the prior function.
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 disagree, they really are testing different things, but there's just a precondition that overlaps with the previous test case.
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.
If you want it to be wholly separate, then you could make it that way by explicitly adding a transaction to the pool in this test. Having tests depend on state configured by other tests makes failures all the more difficult to comprehend. Introducing such a dependency for efficiency purposes actually makes matters worse, because a fast E2E test suite requires parallelization, and independence makes that job a lot easier. I won't belabor the point because the functional test suite has so many structural flaws.
# wait until both are synced | ||
loops = 5 | ||
while True: | ||
res2 = daemon2.get_info() |
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.
There's a better way to do this, see: https://github.com/monero-project/monero/pull/9795/files
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 is a good point, I'll push a commit for this in a minute
7316ca9
to
064b3c7
Compare
I won't have time for further discussion/re-review, please proceed as you see fit. |
#9135