matter-labs / zksync-era

zkSync era
Apache License 2.0
3.08k stars 2.06k forks source link

web3_clientVersion of external-node does not return a meaningful value #1503

Open pc-quiknode opened 5 months ago

pc-quiknode commented 5 months ago

🐛 Bug Report

📝 Description

web3_clientVersion is expected to return the current client version of zkSync external node. The value is currently hardcoded as zkSync/v2.0 at https://github.com/matter-labs/zksync-era/blob/e26091a18ad7893f78511bf6ce47e8e85b54167e/core/lib/zksync_core/src/api_server/web3/namespaces/web3.rs#L7

🔄 Reproduction Steps

Call JSON-RPC web3_clientVersion

{"jsonrpc":"2.0","id":1,"method":"web3_clientVersion","params":[]}

will emit a response of

{"jsonrpc":"2.0","result":"zkSync/v2.0","id":1}

🤔 Expected Behavior

It should return the current client version

😯 Current Behavior

It always returns "zkSync/v2.0"

EmilLuta commented 5 months ago

cc: @popzxc

popzxc commented 5 months ago

@EmilLuta feel free to create an internal task to work on it, it indeed would be better to indicate the version of the client (though we need to discuss internally which versioning scheme do we want to use).

EmilLuta commented 5 months ago

@pc-quiknode We've created an internal task for this, but it may take quite a while until it gets prioritized. External contributions are welcome as well (given our time-frame won't be enough). Thanks for raising the issue!

achiko commented 3 months ago

Are there any updates on this issue? I checked and still get the same response: {"jsonrpc":"2.0","result":"zkSync/v2.0","id":1}.

I want to know which core version I am currently running. How can I find this information?

Thanks!

popzxc commented 3 months ago

cc @RomanBrodetski (I think it should be fairly straightforward to reuse EN functionality which already does similar thing)