-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(paych): add EnablePaymentChannelManager config option #13139
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
base: master
Are you sure you want to change the base?
feat(paych): add EnablePaymentChannelManager config option #13139
Conversation
… payment channel manager by default This change introduces a new configuration option EnablePaymentChannelManager to control whether the payment channel manager is started on node startup. - Added EnablePaymentChannelManager boolean field to FullNode config struct - Set default value to false (disabled by default) since payment channels get minimal use on mainnet - Added conditional wiring in node/builder_chain.go to only start payment channel manager when config option is enabled - Updated config documentation with clear description of the option This saves resources for light nodes and most full nodes that don't use payment channel functionality, while still allowing users to enable it when needed by setting EnablePaymentChannelManager: true in their config.
- Updated default-lotus-config.toml with proper documentation for the new EnablePaymentChannelManager option
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.
Pull Request Overview
This PR adds a new configuration option to control the initialization of the payment channel manager. It introduces the boolean field EnablePaymentChannelManager, sets its default value to false, and conditionally wires the payment channel components in the node builder based on this flag.
- Added the EnablePaymentChannelManager field to the FullNode config struct.
- Updated the default configuration, documentation, and dependency injection in the node builder.
- Removed the unconditional wiring of payment channel services and replaced it with conditional wiring.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
node/config/types.go | Added configuration field and documentation comments. |
node/config/doc_gen.go | Updated auto-generated documentation to include the new option. |
node/config/def.go | Set default value for the new EnablePaymentChannelManager field. |
node/builder_chain.go | Replaced unconditional wiring of payment channel components with conditional wiring based on the configuration flag. |
Updated the CHANGELOG.md entry for EnablePaymentChannelManager feature with the actual PR number from the created pull request.
@@ -8,6 +8,7 @@ | |||
> * [CHANGELOG_1.2x.md](./documentation/changelog/CHANGELOG_1.2x.md) - v1.20.0 to v1.29.2 |
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.
too many edits in this file, please back out the 3 edits below line 11
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.
agreed, removed all the 3 changes below line 11
I think this is fine. Need some removals in CHANGELOG.md, For the record, the thing that bothers me about the payment channel manager is that it actively listens to head changes and looks for messages that match its schema of things to act on. Mostly this is a very minor activity, hardly measurable. But it does become measurable when you're running in lite mode, pointing to a remote, where head change listening requires API calls. I ran into this problem when doing gateway rate limiting because the gateway is effectively a lite client. So I expect that test will fail here and need to be adjusted. It's not a huge concern, this is just a minor cleanup and we're not removing payment channel functionality or touching anything on chain. We're just preventing a node participating in payment channels while this option is turned off but it can easily be turned on again if ever required. |
…nce from PR_NUMBER to 13139 - Remove unintended formatting changes as requested by reviewer
Odd DI errors assembling lotus:
In theory, |
add EnablePaymentChannelManager config option to disable payment channel manager by default
This change introduces a new configuration option EnablePaymentChannelManager to control whether the payment channel manager is started on node startup.
This saves resources for light nodes and most full nodes that don't use payment channel functionality, while still allowing users to enable it when needed by setting EnablePaymentChannelManager: true in their config.
Related Issues
#12718
Proposed Changes
EnablePaymentChannelManager
boolean field inFullNode
config structfalse
)node/builder_chain.go
to only wire payment channel services when enabledAdditional Info
EnablePaymentChannelManager: true
Checklist
Before you mark the PR ready for review, please make sure that: