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

configuration to load multiple smeshers from disk #5089

Closed
1 task
Tracked by #261 ...
dshulyak opened this issue Sep 26, 2023 · 5 comments
Closed
1 task
Tracked by #261 ...

configuration to load multiple smeshers from disk #5089

dshulyak opened this issue Sep 26, 2023 · 5 comments

Comments

@dshulyak
Copy link
Contributor

please see #5085 for interface that must be implemented by every protocol that requires access to signing key.

storing keys

store keys in separately configurable directory, defaults to {datadir}/keys/. each smesher is stored in a file with public key in hexary encoding. on startup we have to read all public keys and calll Register method on every protocol that supports it.

refactoring / migration from old

right now "node_id" is added to every log line, we want to drop that. instead print info log with public key that was loaded from disk.

  • save way to migrate key.bin to keys directory

generating key

node itself can generate only one key when smeshing starts. other keys are either generated manually by user, or using dynamic configuration as will be discussed in a follow up.

@fasmat
Copy link
Member

fasmat commented Sep 26, 2023

right now "node_id" is added to every log line, we want to drop that. instead print info log with public key that was loaded from disk.

Aren't NodeID and public key the same? I still think we should add NodeID to logs where it makes sense; e.g. if a certain identity published an ATX or voted in a specific way. I agree for general logs that are not tied to an identity we can drop NodeID in the logs.

@dshulyak dshulyak moved this from 📋 Backlog to 🔖 Next in Dev team kanban Sep 27, 2023
@poszu
Copy link
Contributor

poszu commented Sep 29, 2023

right now "node_id" is added to every log line, we want to drop that. instead print info log with public key that was loaded from disk.

Aren't NodeID and public key the same? I still think we should add NodeID to logs where it makes sense; e.g. if a certain identity published an ATX or voted in a specific way. I agree for general logs that are not tied to an identity we can drop NodeID in the logs.

NodeID is already present in each logger name, for example:

INFO    8cbde.sync      all syncer goroutines finished

We could keep it similar if each identity had its dedicated logger for a given protocol.

@fasmat
Copy link
Member

fasmat commented Oct 5, 2023

I'm not a big fan of putting the node id into the logger name. It will get lost if one creates a sub-logger with WithName (go-spacemesh/log) or Named (zap). Instead I would pass e.g. a logger named atxBuilder with the node_id field of the node that uses that component to an instance of atxBuilder.

@poszu
Copy link
Contributor

poszu commented Oct 5, 2023

It will get lost if one creates a sub-logger with WithName (go-spacemesh/log) or Named (zap).

AFAIK, both append postfix to the existing name.

@fasmat
Copy link
Member

fasmat commented Mar 25, 2024

This has been completed with #5592

@fasmat fasmat closed this as completed Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants