-
Notifications
You must be signed in to change notification settings - Fork 265
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
Extract tx publishing from watchers #1749
Conversation
91ae610
to
6cc2fab
Compare
Introduce a TxPublisher actor to publish channel txs. Move logic from watcher to this new actor, with minimal functional changes.
The TxSigningKit abstraction was introduced a bit too early. The TxPublisher will hold all the logic so we'll start by providing the full commitments, and we'll extract more compact objects later. We also now publish the commit tx and its anchor tx independently.
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 don't really like 05111f8, but I see it's meant as an intermediate step.
What do you mean by?
We also now publish the commit tx and its anchor tx independently.
eclair-core/src/main/scala/fr/acinq/eclair/channel/TxPublisher.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/TxPublisher.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/TxPublisher.scala
Outdated
Show resolved
Hide resolved
What we previously had was a bit ugly: we sent one Now it is cleaner, we separate these into two messages. |
eclair-core/src/main/scala/fr/acinq/eclair/channel/TxPublisher.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/channel/TxPublisher.scala
Outdated
Show resolved
Hide resolved
I added the This is something we had already discussed during #1728, I think it's worth doing (and the new We still need to repeat these Let me know what you think @pm47, I think it will make the logs much easier to analyze. |
Most definitely. I submitted two additions on branch tx-publisher-pm. The duplication in Helpers.scala is still itching though! |
I applied the first one, but I find the second one over-engineered to be honest ("parfois, le mieux est l'ennemi du bien !"). In order to automatically to CPFP on funding txs, we will re-work part of the |
I knew you'd say that! |
Introduce a
TxPublisher
actor whose responsibility is to publish channel transactions (from funding to closing).Move logic from
ZmqWatcher
to this new actor, with minimal functional changes.This is best reviewed commit-by-commit:
Commitments
instead ofTxSigningKit
In future PRs, we will refactor and enrich this
TxPublisher
.