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

Allow providing the key via env #435

Merged
merged 3 commits into from
Nov 27, 2023
Merged

Allow providing the key via env #435

merged 3 commits into from
Nov 27, 2023

Conversation

poszu
Copy link
Contributor

@poszu poszu commented Nov 24, 2023

Added an option to provide the private key via env variable named POET_PRIVATE_KEY. It's meant mostly for testing (systests).

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (ba98c66) 77.8% compared to head (5c95717) 77.6%.

Files Patch % Lines
server/server.go 20.0% 2 Missing and 2 partials ⚠️
server/state.go 90.9% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop    #435     +/-   ##
=========================================
- Coverage     77.8%   77.6%   -0.2%     
=========================================
  Files           25      26      +1     
  Lines         2010    2033     +23     
=========================================
+ Hits          1565    1579     +14     
- Misses         328     334      +6     
- Partials       117     120      +3     

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

server/state.go Outdated Show resolved Hide resolved
Co-authored-by: Matthias Fasching <5011972+fasmat@users.noreply.github.com>
@poszu poszu added this pull request to the merge queue Nov 27, 2023
Merged via the queue into develop with commit 699f174 Nov 27, 2023
10 of 11 checks passed
spacemesh-bors bot pushed a commit to spacemeshos/go-spacemesh that referenced this pull request Jan 5, 2024
## Motivation
Change Poet services configuration to pass:
- address
- public key

The public key is no longer fetched from the poet.

Breaking changes:
- `--poet-server` CLI argument was deprecated
- new `--poet-servers` CLI argument was added. It takes a JSON-encoded list of poet servers (address and pubkey) - useful in systests
- `poet-server` config field was deprecated
- new config field `poet-servers` was added, which is now a struct with address and pubkey


:warning: The default config was updated with poets' public keys. 
:warning: The config hosted for smapp needs an update for the next go-sm release  cc @pigmej , @brusherru  
⚠️ The node will refuse the old configuration by quitting with an error message pointing the user to the upgrade information.   

System tests were updated to:
1. generate poet private keys
2. pass pubkey to node via `--poet-servers`
3. pass private key to poet via `POET_PRIVATE_KEY` env

The system tests rely on changes in poet: spacemeshos/poet#435 (v0.10.1)
@fasmat fasmat deleted the accept-key-from-env branch May 14, 2024 08:31
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.

2 participants