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: add NodeId(id) to every log entry for integration-tests #121

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

ChaoticTempest
Copy link
Contributor

Makes debugging what is going wrong with a specific node by introducing the NodeId(id) appended to every logline in integration tests. These will not appear on the actual prod environments.

For example:

NodeId(1) 2025-01-17T21:54:40.653693Z  INFO mpc_node::protocol::consensus: started(initializing): starting key generation as a part of the participant set

Copy link
Contributor

@volovyks volovyks left a comment

Choose a reason for hiding this comment

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

Not sure if it's a good idea ti introduce one more node identifier. We already have accounId and node index from cait-sith library. Should we use one of them instead? Probably accountId, It should be easier to use with tracing since it's available from the start.

@ChaoticTempest
Copy link
Contributor Author

the issue with using account-ids is that we're creating dev accounts (dev-{long-timestamp}.near). in our integration tests. It's really hard to tell a part which node is which just based on them. The node id is effectively the index from cait-sith as long as there are no weird edge cases when it comes to adding new participants

@volovyks
Copy link
Contributor

Yes, in a cryptographic context, it is. I do not mind using it. I am just not sure if there is a convenient way to set it as a parameter in tracing.

@ChaoticTempest
Copy link
Contributor Author

Yes, in a cryptographic context, it is. I do not mind using it. I am just not sure if there is a convenient way to set it as a parameter in tracing.

hmm, what do you mean? it already gets set by default with this PR in our integration tests. No need for you to write it manually each time

@volovyks
Copy link
Contributor

I see. I have not noticed it is optional and can be limited in production. Ok.

@ChaoticTempest ChaoticTempest merged commit f299850 into develop Jan 22, 2025
2 of 3 checks passed
@ChaoticTempest ChaoticTempest deleted the phuong/feat/log-node-id branch January 22, 2025 00:50
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