Skip to content

Conversation

ajtowns
Copy link
Contributor

@ajtowns ajtowns commented Aug 16, 2018

Changes the minimum bucket for fee estimation from 1000 satoshi per kilobyte to 4 satoshi per kilobyte, and upgrades any saved fee estimation data.

: buckets(defaultBuckets), bucketMap(defaultBucketMap)
{
decay = txstatsSource.decay;
scale = txstatsSource.scale;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: these could go in the initializer list

avg.resize(buckets.size());

unsigned int src = 0;
for (unsigned int dst = 0; dst < buckets.size(); dst++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: ++dst here and elsewhere

}

src++;
if (src >= txstatsSource.buckets.size()) break;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can move these conditions into the for, so that it manages both src and dst.

@ajtowns ajtowns force-pushed the 201808-fee-buckets branch 2 times, most recently from d3956db to c1ca0ea Compare September 3, 2018 08:47
@ajtowns
Copy link
Contributor Author

ajtowns commented Sep 3, 2018

The really high fee rates were due to not handling the buckets/bucketMap objects correctly, believe that's fixed now.

@ajtowns ajtowns force-pushed the 201808-fee-buckets branch 2 times, most recently from 031d860 to 7f1e3a4 Compare September 7, 2018 04:25
@ajtowns ajtowns changed the title WIP: allow fee estimation to work with lower fees Allow fee estimation to work with lower fees Sep 7, 2018
@ajtowns
Copy link
Contributor Author

ajtowns commented Sep 7, 2018

Dropped the WIP tag, this should be good to review/nitpick now.

I couldn't come up with a reasonable way to add functional tests for this change; if someone has a good idea, suggestions/patches welcome :) Though... I guess just generating an estimates file directly in python, pointing bitcoind at it, and seeing what estimates bitcoind comes up with after upgrading it without ever actually putting txes in the blockchain could work okay...

@ajtowns ajtowns force-pushed the 201808-fee-buckets branch from 7f1e3a4 to f28cf3c Compare January 3, 2019 15:15
@ajtowns
Copy link
Contributor Author

ajtowns commented Jan 3, 2019

Reworked based on a suggestion from @Sjors; could still use some functional tests to check that loading a particular set of fee rates produces an expected set of fee estimates.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 5, 2019

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept NACK tryphe, ghost
Concept ACK Empact

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #26376 (test: Use type-safe NodeSeconds for TestMemPoolEntryHelper by MarcoFalke)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@stevenroose
Copy link
Contributor

Is this work abandoned?

@Empact
Copy link
Contributor

Empact commented Mar 18, 2020

Concept ACK

@ajtowns
Copy link
Contributor Author

ajtowns commented Mar 19, 2020

Had stalled this on writing some tests. Having now written a test, it's found a bug, so now trying to fix that... :)

@ajtowns
Copy link
Contributor Author

ajtowns commented Mar 23, 2020

Rebased, test case added as first commit, should be reviewable.

Note that this only makes estimations work for fee rates below 1sat/byte if you ever actually accept fee rates that low into your mempool. To make your mempool accept/relay transactions that cheap requires setting -minrelaytxfee or changing DEFAULT_MIN_RELAY_TX_FEE; and to have your wallet use fees that low means setting-mintxfee or changing DEFAULT_TRANSACTION_MINFEE and potentially also WALLET_INCREMENTAL_RELAY_FEE. Doing those things now for mainnet would probably just be a spam vector, rather than particularly useful IMHO.

@maflcko
Copy link
Member

maflcko commented Mar 23, 2020

Doing those things now for mainnet would probably just be a spam vector

Also open a huge surface for privacy leaks

@murchandamus
Copy link
Contributor

Seems reasonable, definitely agree that making everything else ready before changing the DEFAULT_MIN_RELAY_TX_FEE is the way to go. But if we're looking at a full block at minRelayTxFee bringing more than 1% of the fees, that's about a decade away, so I agree that it doesn't seem very urgent.

@glozow
Copy link
Member

glozow commented Oct 12, 2022

@ajtowns are you still working on this?

@ajtowns ajtowns force-pushed the 201808-fee-buckets branch from 46e2b1e to d7f903c Compare October 17, 2022 06:16
@ajtowns ajtowns marked this pull request as draft October 17, 2022 06:18
@ajtowns
Copy link
Contributor Author

ajtowns commented Oct 17, 2022

Rebased, but is failing fuzz testing for reasons that aren't immediately obvious, so converted to draft

@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

@DrahtBot
Copy link
Contributor

There hasn't been much activity lately and the patch still needs rebase. What is the status here?

  • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
  • Is it no longer relevant? ➡️ Please close.
  • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

1 similar comment
@DrahtBot
Copy link
Contributor

There hasn't been much activity lately and the patch still needs rebase. What is the status here?

  • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
  • Is it no longer relevant? ➡️ Please close.
  • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

@stevenroose
Copy link
Contributor

Lately definitely looks like it is less relevant. Nothing says we can't go back to the situation from a year or two ago where txs with 1 sat/vB would easily confirm in a few hours.

@DrahtBot
Copy link
Contributor

DrahtBot commented Sep 1, 2023

There hasn't been much activity lately and the patch still needs rebase. What is the status here?

  • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
  • Is it no longer relevant? ➡️ Please close.
  • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

@achow101
Copy link
Member

Closing as up for grabs due to lack of activity.

@achow101 achow101 closed this Sep 23, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Sep 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.