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(feature-activation): implement bit signaling sysctl #962

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Feb 27, 2024

Motivation

Add sysctl commands to control Feature Activation bit signaling without having to restart the full node (previously, this was only available through CLI options). The commands are the following:

core.features.supported_features

Return features that are explicitly enabled. Read-only.

core.features.not_supported_features

Return features that are explicitly disabled. Read-only.

core.features.signaling_features

Return which feature are currently in a signaling phase. Read-only.

core.features.add_support

Add support for a feature. Write-only.

core.features.remove_support

Remove support for a feature. Write-only.

Example

$ nc -U /tmp/hathor.sock
core.features.signaling_features
["NOP_FEATURE_5"]
core.features.remove_support="NOP_FEATURE_5"
core.features.not_supported_features
["NOP_FEATURE_5"]
core.features.supported_features
[]
core.features.add_support="NOP_FEATURE_5"
core.features.not_support_features
[]
core.features.supported_features
["NOP_FEATURE_5"]

Then, the bits in the block template will be changed accordingly.

Acceptance Criteria

  • Add core.features sysctl command group with the following subcommands: supported_features, not_supported_features, signaling_features, add_support, and remove_support.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Feb 27, 2024
@glevco glevco marked this pull request as ready for review February 27, 2024 16:28
@glevco glevco force-pushed the feat/feature-activation/sysctl branch from bdf3a43 to 139577d Compare February 27, 2024 22:57
Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 73.68421% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 85.04%. Comparing base (881c5ff) to head (4b44a2a).

Files Patch % Lines
hathor/feature_activation/bit_signaling_service.py 53.84% 12 Missing ⚠️
hathor/builder/sysctl_builder.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #962       +/-   ##
===========================================
+ Coverage        0   85.04%   +85.04%     
===========================================
  Files           0      296      +296     
  Lines           0    22918    +22918     
  Branches        0     3451     +3451     
===========================================
+ Hits            0    19490    +19490     
- Misses          0     2741     +2741     
- Partials        0      687      +687     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

hathor/builder/sysctl_builder.py Outdated Show resolved Hide resolved
hathor/sysctl/feature_activation/manager.py Show resolved Hide resolved
hathor/sysctl/feature_activation/manager.py Outdated Show resolved Hide resolved
hathor/sysctl/feature_activation/manager.py Outdated Show resolved Hide resolved
hathor/sysctl/feature_activation/manager.py Outdated Show resolved Hide resolved
hathor/sysctl/feature_activation/manager.py Outdated Show resolved Hide resolved
hathor/sysctl/feature_activation/manager.py Show resolved Hide resolved
hathor/sysctl/feature_activation/manager.py Show resolved Hide resolved
hathor/sysctl/feature_activation/manager.py Show resolved Hide resolved
hathor/sysctl/feature_activation/manager.py Show resolved Hide resolved
@glevco glevco force-pushed the feat/feature-activation/sysctl branch 2 times, most recently from 3ef4d62 to be9a2de Compare March 21, 2024 21:32
@glevco glevco force-pushed the feat/feature-activation/sysctl branch from be9a2de to 8a864eb Compare April 2, 2024 17:01
@glevco glevco force-pushed the feat/feature-activation/sysctl branch from 8a864eb to 4b44a2a Compare April 2, 2024 17:01
@glevco glevco merged commit 3ff748d into master Apr 2, 2024
12 checks passed
@glevco glevco deleted the feat/feature-activation/sysctl branch April 2, 2024 18:53
@jansegre jansegre mentioned this pull request Apr 5, 2024
2 tasks
@jansegre jansegre mentioned this pull request May 8, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants