-
Notifications
You must be signed in to change notification settings - Fork 55
feat(l1): properly format client version #2564
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
Conversation
Lines of code reportTotal lines added: Detailed view
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we also update this in the p2p HelloMessage
exchange, see here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but Im not convinced we should add this to the common
crate. I think it should be in the p2p crate probably, and there should be a way for the rpc crate to ask this info from the p2p crate. This requires a bigger refactor which is out of scope of this PR. Let's think about it for a minute and then we can go back to this.
…daclass/ethrex into feat/properly-format-client-version
…daclass/ethrex into feat/properly-format-client-version
…daclass/ethrex into feat/properly-format-client-version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far, left some comments
Motivation
The client version was hardcoded in the rpc crate
It was used in the client RPC msg, in the admin_info RPC msg and in the helloMsg in P2P
Description
Added vergen crate to include more environment variables at build time in the ethrex main package.
It can be tested using the following cast commands
Modified the
P2PContext
struct to include the client_infoAlso added it in the struct
RLPxConnection
to pass it to the helloMessage struct when doing the handshakeModified the test to use the functions with a dummy client_info
The version can now be retrieved by using ethrex --version
Closes #2548