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(NODE-1486): Add node_remuneration_type to config.ini #1787

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

andrewbattat
Copy link
Member

@andrewbattat andrewbattat commented Oct 1, 2024

NODE-1486

  • Add a node_remuneration_type config.ini field
  • Fail in SetupOS if field is left empty or is invalid (not of typeX or typeX.Y)
  • Propagate field into a file /boot/config/remuneration.conf on GuestOS to be used in node registration (the work to update registration to make use of remuneration.conf will be covered by DRE)
image

@github-actions github-actions bot added the feat label Oct 1, 2024
Comment on lines +40 to +42
--node_remuneration_type node_remuneration_type
(optional) The node remuneration type used for node rewards

Copy link
Member Author

Choose a reason for hiding this comment

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

The reason I left node_remuneration_type optional in build-bootstrap-config-image (and generate-guestos-config), even though it's required in setupOS, is for backwards compatibility. This script runs on reboot, so after a HostOS upgrade on mainnet, node_remuneration_type will not be in config.ini, and therefore the field should be optional.

But note that once we are on the new config, this script as well as generate-guestos-config.sh and bootstrap-ic-node.sh will all be removed.

Copy link
Member

Choose a reason for hiding this comment

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

I totally agree with that. We should make it non-optional only in SetupOS!
(and also in the registry at some point, but that shouldn't be a big concern for you)

Copy link
Member Author

Choose a reason for hiding this comment

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

once we are on the new config, check-remuneration.sh will be removed, as all config validation will be contained in the config-tool, so this is only temporary 👍

log_and_halt_installation_on_error 1 "Configuration error: node_remuneration_type is not set"
fi

if [[ ! "$node_remuneration_type" =~ ^type[0-9]+(\.[0-9])?$ ]]; then
Copy link
Member Author

@andrewbattat andrewbattat Oct 1, 2024

Choose a reason for hiding this comment

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

must be of the format: typeX or typeX.Y

image

Copy link
Member Author

@andrewbattat andrewbattat Oct 1, 2024

Choose a reason for hiding this comment

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

Every time we update build-bootstrap-config-image.sh We need to update the scripts that call build-bootstrap. These are:

We can leave rs/ic_os/launch-single-vm/src/main.rs. It is a development tool that does not need networking and therefore won’t need registration (correct me if I’m wrong @Bownairo )

For the other three, should we just hardcode a value of type2.1 @sasa-tomic ?

Copy link
Member

Choose a reason for hiding this comment

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

type3.1 would be more realistic, but either is okay.

Copy link
Member Author

@andrewbattat andrewbattat Oct 2, 2024

Choose a reason for hiding this comment

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

Sounds good! I'll hard-code a value of type3.1 for the other three!

Copy link
Member

Choose a reason for hiding this comment

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

So you think a value of 3.1 should be provided for the other three?

Sure, sounds like a good idea (for tests).

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 updated

I didn't touch rs/tests/driver/src/driver/boundary_node.rs (farm boundary-node) because the boundary guestos is not NNS managed.

@andrewbattat andrewbattat marked this pull request as ready for review October 1, 2024 22:57
@andrewbattat andrewbattat requested review from a team as code owners October 1, 2024 22:57
@andrewbattat andrewbattat self-assigned this Oct 1, 2024
Copy link
Member

@Bownairo Bownairo left a comment

Choose a reason for hiding this comment

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

LGTM, are we planning to make the changes to test tools and the new config tools in this PR?

@andrewbattat
Copy link
Member Author

LGTM, are we planning to make the changes to test tools and the new config tools in this PR?

@Bownairo I believe so! I opened a discussion regarding this here: https://github.com/dfinity/ic/pull/1787/files#r1783622982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants