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

[tools/shoestring] fix: allow the user to retain their node key #1186

Merged
merged 7 commits into from
Dec 10, 2024

Conversation

Wayonb
Copy link
Contributor

@Wayonb Wayonb commented Nov 23, 2024

problem: migrating from symbol-bootstrap creates a new node key.
this causes the node to lose their delegated harvesters.
solution: allow the node to retain its node key during bootstrap import and cert renewal.

Copy link

codecov bot commented Nov 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.23%. Comparing base (01049eb) to head (3ffb0eb).
Report is 1 commits behind head on dev.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1186      +/-   ##
==========================================
- Coverage   98.25%   98.23%   -0.02%     
==========================================
  Files         162      158       -4     
  Lines        6630     6515     -115     
  Branches      143      143              
==========================================
- Hits         6514     6400     -114     
+ Misses        116      115       -1     
Flag Coverage Δ
explorer-rest ?
tools-shoestring 96.89% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...shoestring/shoestring/commands/import_bootstrap.py 100.00% <100.00%> (ø)
...oestring/shoestring/commands/renew_certificates.py 100.00% <100.00%> (ø)
...ols/shoestring/shoestring/internal/NodeKeyUtils.py 100.00% <100.00%> (ø)
tools/shoestring/shoestring/internal/Preparer.py 100.00% <100.00%> (ø)
...ing/shoestring/internal/ShoestringConfiguration.py 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

Copy link
Member

@AnthonyLaw AnthonyLaw left a comment

Choose a reason for hiding this comment

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

All look good 👍🏼
Added some comment

@Wayonb Wayonb force-pushed the fix/allow_reuse_of_node_key branch from 9cb0eb5 to cacfd3b Compare November 27, 2024 18:03
Copy link
Contributor

@Jaguar0625 Jaguar0625 left a comment

Choose a reason for hiding this comment

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

👍

tools/shoestring/README.md Outdated Show resolved Hide resolved
tools/shoestring/README.md Outdated Show resolved Hide resolved
tools/shoestring/shoestring/commands/import_bootstrap.py Outdated Show resolved Hide resolved
tools/shoestring/README.md Outdated Show resolved Hide resolved
tools/shoestring/tests/commands/test_import_bootstrap.py Outdated Show resolved Hide resolved
tools/shoestring/shoestring/internal/NodeKeyProvider.py Outdated Show resolved Hide resolved
tools/shoestring/shoestring/internal/NodeKeyProvider.py Outdated Show resolved Hide resolved
tools/shoestring/tests/internal/test_NodeKeyProvider.py Outdated Show resolved Hide resolved
tools/shoestring/tests/internal/test_NodeKeyProvider.py Outdated Show resolved Hide resolved
tools/shoestring/shoestring/internal/NodeKeyProvider.py Outdated Show resolved Hide resolved
tools/shoestring/shoestring/commands/import_bootstrap.py Outdated Show resolved Hide resolved
tools/shoestring/README.md Outdated Show resolved Hide resolved
tools/shoestring/README.md Outdated Show resolved Hide resolved
tools/shoestring/tests/commands/test_import_bootstrap.py Outdated Show resolved Hide resolved
tools/shoestring/tests/commands/test_import_bootstrap.py Outdated Show resolved Hide resolved
tools/shoestring/tests/internal/test_NodeKeyUtils.py Outdated Show resolved Hide resolved
tools/shoestring/tests/internal/test_NodeKeyUtils.py Outdated Show resolved Hide resolved
tools/shoestring/tests/internal/test_Preparer.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Jaguar0625 Jaguar0625 left a comment

Choose a reason for hiding this comment

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

👍

'-outform', 'PEM',
'-algorithm', 'ed25519'
])

def _create_ca_private_key(self, directory):
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this should be staticmethod too?

Copy link
Contributor

@Jaguar0625 Jaguar0625 left a comment

Choose a reason for hiding this comment

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

👍

@Wayonb Wayonb force-pushed the fix/allow_reuse_of_node_key branch from 4d1d270 to 3ffb0eb Compare December 9, 2024 15:26
@Wayonb Wayonb merged commit 6188981 into dev Dec 10, 2024
16 checks passed
@Wayonb Wayonb deleted the fix/allow_reuse_of_node_key branch December 10, 2024 02:14
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.

3 participants