-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store published txs in AuditDb (#1976)
We previously computed the on-chain fees paid by us after the fact, when receiving a notification that a transaction was confirmed. This worked because lightning transactions had a single input, which we stored in our DB to allow us to compute the fee. With anchor outputs, this mechanism doesn't work anymore. Some txs have their fees paid by a child tx, and may have more than one input. We completely change our model to store every transaction we publish, along with the fee we're paying for this transaction. We then separately store every transaction that confirms, which lets us join these two data sets to compute how much on-chain fees we paid. This has the added benefit that we can now audit every transaction that we tried to publish, which lets node operators audit the anchor outputs internal RBF mechanism and all the on-chain footprint of a given channel.
- Loading branch information
Showing
22 changed files
with
475 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 33 additions & 28 deletions
61
eclair-core/src/main/scala/fr/acinq/eclair/channel/Channel.scala
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.