Skip to content

Conversation

sdaftuar
Copy link
Member

@sdaftuar sdaftuar commented Jan 9, 2018

We haven't used the "mining_score" index since 0.12, so remove it.

@sipa
Copy link
Member

sipa commented Jan 9, 2018

utACK

@promag
Copy link
Contributor

promag commented Jan 9, 2018

Remove comment:

* - mining score (feerate modified by any fee deltas from PrioritiseTransaction)

@sdaftuar sdaftuar force-pushed the 2018-01-remove-unused-index branch from 552724b to 8e617e3 Compare January 9, 2018 13:59
@sdaftuar
Copy link
Member Author

sdaftuar commented Jan 9, 2018

Thanks @promag, fixed.

@promag
Copy link
Contributor

promag commented Jan 9, 2018

utACK 8e617e3.

@morcos
Copy link
Contributor

morcos commented Jan 9, 2018

concept ACK

Note: This score was useful for quick approximations for fee estimation and to observe how closely miner policy is matching expectations (as well as possibly coinsviewcache warming). However none of this has made it into master in a couple years and the goals are probably equally accomplishable by using ancestor_score sorting and skipping entries with ancestors.

@TheBlueMatt
Copy link
Contributor

Can we kill CTxMemPool::GetSortedDepthAndScore() and DepthAndScoreComparator, too? I dont see why queryHashes (used to flush fee estimator - this should probably loop over mapTx or something to avoid the needless copy, and getrawmempool output) and infoAll (::MEMPOOL responses and mempool disk-dumping) should be sorted.

@sdaftuar
Copy link
Member Author

@TheBlueMatt I didn't look at the fee estimator usage at all, but we use depth-and-score comparisons for both responding to MEMPOOL requests and for regular transaction relay, to avoid relaying child transactions before parents, which I think is essential behavior. The sort-by-feerate is imo desirable , if not essential. I don't think we should get rid of either behavior.

However I think we can get rid of CompareTxMemPoolEntryByScore after #12118, and replace its only remaining uses with the ancestor feerate comparison (that's the only remaining change I had left at the moment), once that's fixed to be the min(feerate, feerate_with_ancestors). I was going to PR that separately after these were merged.

If reviewers would rather see all these changes in one PR, I can do that too (I thought smaller would be better here).

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 8e617e3. Seems fine to make the other changes separately.

@TheBlueMatt
Copy link
Contributor

utACK 8e617e3, though I'd prefer if the sort in queryHashes were killed as its uneccessary for its users, and then remove the local prioritization's effect on scoring and maybe rename it or give the score sorter more clear documentation for what its (now) used for.

@laanwj
Copy link
Member

laanwj commented Jan 15, 2018

utACK 8e617e3

Seems fine to make the other changes separately.

Agree - this is an easy to review, self-contained change, the rest can be done later, no reason to extend the scope.

@laanwj laanwj merged commit 8e617e3 into bitcoin:master Jan 15, 2018
laanwj added a commit that referenced this pull request Jan 15, 2018
8e617e3 Remove unused mempool index (Suhas Daftuar)

Pull request description:

  We haven't used the "mining_score" index since 0.12, so remove it.

Tree-SHA512: ae37b8663194986eaeecfc2bbeca7ecb4ae6f0d8384515fa218cbc939a580d4b9f7f997c5297c3f1b3c3a0651edb092f373ac9a4808aaec30d38cb99d5f3ed70
@sdaftuar sdaftuar mentioned this pull request Jan 19, 2018
laanwj added a commit that referenced this pull request Feb 8, 2018
669c943 Avoid leaking prioritization information when relaying transactions (Suhas Daftuar)
e868b22 fee estimator: avoid sorting mempool on shutdown (Suhas Daftuar)
0975406 Correct mempool mapTx comment (Suhas Daftuar)

Pull request description:

  Following up on #12127 and #12118, this cleans up a comment that was left incorrect in txmempool.h, and addresses a couple of the observations @TheBlueMatt made about an unnecessary use of `queryHashes()` and a small information leak when prioritizing transactions.

  Left undone is nuking queryHashes altogether; that would require changing the behavior of the `getrawmempool` rpc call, which I think I might be in favor of doing, but wanted to save for its own PR.

Tree-SHA512: c97d10b96dcd6520459287a4a2eda92774173757695100fcfe61e526aef86f394507c331d17f9e0c14b496c33ec46198a0f165a847762ca50f7c6780b993f162
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 17, 2020
8e617e3 Remove unused mempool index (Suhas Daftuar)

Pull request description:

  We haven't used the "mining_score" index since 0.12, so remove it.

Tree-SHA512: ae37b8663194986eaeecfc2bbeca7ecb4ae6f0d8384515fa218cbc939a580d4b9f7f997c5297c3f1b3c3a0651edb092f373ac9a4808aaec30d38cb99d5f3ed70
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 22, 2020
8e617e3 Remove unused mempool index (Suhas Daftuar)

Pull request description:

  We haven't used the "mining_score" index since 0.12, so remove it.

Tree-SHA512: ae37b8663194986eaeecfc2bbeca7ecb4ae6f0d8384515fa218cbc939a580d4b9f7f997c5297c3f1b3c3a0651edb092f373ac9a4808aaec30d38cb99d5f3ed70
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 22, 2020
8e617e3 Remove unused mempool index (Suhas Daftuar)

Pull request description:

  We haven't used the "mining_score" index since 0.12, so remove it.

Tree-SHA512: ae37b8663194986eaeecfc2bbeca7ecb4ae6f0d8384515fa218cbc939a580d4b9f7f997c5297c3f1b3c3a0651edb092f373ac9a4808aaec30d38cb99d5f3ed70
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 29, 2020
8e617e3 Remove unused mempool index (Suhas Daftuar)

Pull request description:

  We haven't used the "mining_score" index since 0.12, so remove it.

Tree-SHA512: ae37b8663194986eaeecfc2bbeca7ecb4ae6f0d8384515fa218cbc939a580d4b9f7f997c5297c3f1b3c3a0651edb092f373ac9a4808aaec30d38cb99d5f3ed70
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 29, 2020
8e617e3 Remove unused mempool index (Suhas Daftuar)

Pull request description:

  We haven't used the "mining_score" index since 0.12, so remove it.

Tree-SHA512: ae37b8663194986eaeecfc2bbeca7ecb4ae6f0d8384515fa218cbc939a580d4b9f7f997c5297c3f1b3c3a0651edb092f373ac9a4808aaec30d38cb99d5f3ed70
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 29, 2020
8e617e3 Remove unused mempool index (Suhas Daftuar)

Pull request description:

  We haven't used the "mining_score" index since 0.12, so remove it.

Tree-SHA512: ae37b8663194986eaeecfc2bbeca7ecb4ae6f0d8384515fa218cbc939a580d4b9f7f997c5297c3f1b3c3a0651edb092f373ac9a4808aaec30d38cb99d5f3ed70
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 31, 2020
8e617e3 Remove unused mempool index (Suhas Daftuar)

Pull request description:

  We haven't used the "mining_score" index since 0.12, so remove it.

Tree-SHA512: ae37b8663194986eaeecfc2bbeca7ecb4ae6f0d8384515fa218cbc939a580d4b9f7f997c5297c3f1b3c3a0651edb092f373ac9a4808aaec30d38cb99d5f3ed70
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 17, 2020
669c943 Avoid leaking prioritization information when relaying transactions (Suhas Daftuar)
e868b22 fee estimator: avoid sorting mempool on shutdown (Suhas Daftuar)
0975406 Correct mempool mapTx comment (Suhas Daftuar)

Pull request description:

  Following up on bitcoin#12127 and bitcoin#12118, this cleans up a comment that was left incorrect in txmempool.h, and addresses a couple of the observations @TheBlueMatt made about an unnecessary use of `queryHashes()` and a small information leak when prioritizing transactions.

  Left undone is nuking queryHashes altogether; that would require changing the behavior of the `getrawmempool` rpc call, which I think I might be in favor of doing, but wanted to save for its own PR.

Tree-SHA512: c97d10b96dcd6520459287a4a2eda92774173757695100fcfe61e526aef86f394507c331d17f9e0c14b496c33ec46198a0f165a847762ca50f7c6780b993f162
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 17, 2020
669c943 Avoid leaking prioritization information when relaying transactions (Suhas Daftuar)
e868b22 fee estimator: avoid sorting mempool on shutdown (Suhas Daftuar)
0975406 Correct mempool mapTx comment (Suhas Daftuar)

Pull request description:

  Following up on bitcoin#12127 and bitcoin#12118, this cleans up a comment that was left incorrect in txmempool.h, and addresses a couple of the observations @TheBlueMatt made about an unnecessary use of `queryHashes()` and a small information leak when prioritizing transactions.

  Left undone is nuking queryHashes altogether; that would require changing the behavior of the `getrawmempool` rpc call, which I think I might be in favor of doing, but wanted to save for its own PR.

Tree-SHA512: c97d10b96dcd6520459287a4a2eda92774173757695100fcfe61e526aef86f394507c331d17f9e0c14b496c33ec46198a0f165a847762ca50f7c6780b993f162
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 17, 2020
669c943 Avoid leaking prioritization information when relaying transactions (Suhas Daftuar)
e868b22 fee estimator: avoid sorting mempool on shutdown (Suhas Daftuar)
0975406 Correct mempool mapTx comment (Suhas Daftuar)

Pull request description:

  Following up on bitcoin#12127 and bitcoin#12118, this cleans up a comment that was left incorrect in txmempool.h, and addresses a couple of the observations @TheBlueMatt made about an unnecessary use of `queryHashes()` and a small information leak when prioritizing transactions.

  Left undone is nuking queryHashes altogether; that would require changing the behavior of the `getrawmempool` rpc call, which I think I might be in favor of doing, but wanted to save for its own PR.

Tree-SHA512: c97d10b96dcd6520459287a4a2eda92774173757695100fcfe61e526aef86f394507c331d17f9e0c14b496c33ec46198a0f165a847762ca50f7c6780b993f162
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Jun 24, 2021
8e617e3 Remove unused mempool index (Suhas Daftuar)

Pull request description:

  We haven't used the "mining_score" index since 0.12, so remove it.

Tree-SHA512: ae37b8663194986eaeecfc2bbeca7ecb4ae6f0d8384515fa218cbc939a580d4b9f7f997c5297c3f1b3c3a0651edb092f373ac9a4808aaec30d38cb99d5f3ed70
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants