Skip to content
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

Enforce a minimum fee rate #530

Merged
merged 6 commits into from
Apr 3, 2018
Merged

Enforce a minimum fee rate #530

merged 6 commits into from
Apr 3, 2018

Conversation

sstone
Copy link
Member

@sstone sstone commented Apr 3, 2018

Make sure that our fee rate is always above a minimum value, set by default at 1 satoshi/byte

@@ -36,6 +36,8 @@ eclair {
}
}

min-feerate = 1 // minimum feerate in satoshis per byte
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need to make this configurable?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it is safer, otherwise if the minimum relay fee goes up in the bitcoin network we may end up with tx that cannot even be relayed

@@ -129,7 +129,16 @@ class Setup(datadir: File, overrideDefaults: Config = ConfigFactory.empty(), act
val zmqConnected = Promise[Boolean]()
val tcpBound = Promise[Unit]()

val defaultFeerates = FeeratesPerByte(block_1 = config.getLong("default-feerates.delay-blocks.1"), blocks_2 = config.getLong("default-feerates.delay-blocks.2"), blocks_6 = config.getLong("default-feerates.delay-blocks.6"), blocks_12 = config.getLong("default-feerates.delay-blocks.12"), blocks_36 = config.getLong("default-feerates.delay-blocks.36"), blocks_72 = config.getLong("default-feerates.delay-blocks.72"))
val minFeerate = config.getLong("min-feerate")
assert(minFeerate > 0, s"minimum fee rate cannnot be zero")
Copy link
Member

@pm47 pm47 Apr 3, 2018

Choose a reason for hiding this comment

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

I would put this requirement in the FeeratesPerKw.apply() method

@sstone sstone force-pushed the minimum-feerate branch 2 times, most recently from 0894770 to f5a7e6a Compare April 3, 2018 14:25
Make sure that our fee rate is always above a minimum value, set by default at 2 satoshi/byte
Same value as bitcoin core's minimum relay fee
pm47
pm47 previously approved these changes Apr 3, 2018
and require that `FeeratesPerByte` and `FeeratesPerKw` be always > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants