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

feat: only enable rcmgr by default in full nodes #8769

Merged
merged 4 commits into from
May 31, 2022
Merged

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented May 31, 2022

opt-in with envvar for other nodes, as there are still some issues with markets related protocols

opt-in with envvar for other nodes, as there are still some issues
with markets related protocols
@vyzo vyzo requested a review from a team as a code owner May 31, 2022 09:03
@vyzo
Copy link
Contributor Author

vyzo commented May 31, 2022

Needs backport to nv16 branch for v1.16.0 release.

envvar := os.Getenv("LOTUS_RCMGR")
if envvar == "0" {
// this is enabled by default; specify LOTUS_RCMGR=0 to disable
if (isFullNode && envvar == "0") || // enable by default for full nodes
Copy link
Collaborator

@ribasushi ribasushi May 31, 2022

Choose a reason for hiding this comment

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

Logic seems wrong, I think it should be IGNORE, I misread the outer logic of this:

Suggested change
if (isFullNode && envvar == "0") || // enable by default for full nodes
if (isFullNode && envvar != "0") || // enable by default for full nodes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the branch is for disabling, logic is correct.
Maybe fix the comment?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I retract comment, the entire if block is to do network.NullResourceManager, I am a muppet ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we might want to fix the comment to avoid tripping casual reading.
Any suggestions?

Copy link
Collaborator

@ribasushi ribasushi left a comment

Choose a reason for hiding this comment

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

LFG 🚀

node/modules/lp2p/rcmgr.go Outdated Show resolved Hide resolved
node/modules/lp2p/rcmgr.go Outdated Show resolved Hide resolved
vyzo and others added 2 commits May 31, 2022 12:32
Co-authored-by: Peter Rabbitson <ribasushi@protocol.ai>
Co-authored-by: Peter Rabbitson <ribasushi@protocol.ai>
@magik6k magik6k merged commit 9de9c58 into master May 31, 2022
@magik6k magik6k deleted the feat/rcmgr-for-daemon branch May 31, 2022 10:30
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.

4 participants