Skip to content

feat(feature-activation): implement bit signaling sysctl#962

Merged
glevco merged 1 commit intomasterfrom
feat/feature-activation/sysctl
Apr 2, 2024
Merged

feat(feature-activation): implement bit signaling sysctl#962
glevco merged 1 commit intomasterfrom
feat/feature-activation/sysctl

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
@codecov
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.

@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
@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