starknet-specs icon indicating copy to clipboard operation
starknet-specs copied to clipboard

Supporting starknet_protocolVersion

Open nirtayeb opened this issue 2 years ago • 6 comments

On one of the API documentation pages you mentioned that starknet_protocolVersion is the equivalent of eth_protocolVersion.

Pathfinder appears to have removed it, but Nethermind Juno for example does not.

This method is necessary at Lava Network in order to verify that our 3rd party providers are running the same protocol version (after updates).

What do you suggest we do? is it possible to rollback the removal from pathfinder?

nirtayeb avatar Sep 11 '23 11:09 nirtayeb

starknet_protocolVersion is not part of the current spec, but there will be a starknet_version field in block headers starting in the v0.5 spec, which is currently in a PR.

joshklop avatar Sep 11 '23 16:09 joshklop

I think @nirtayeb wants a method to query the RPC version?

Mirko-von-Leipzig avatar Sep 12 '23 07:09 Mirko-von-Leipzig

in lava we need to make sure that all rpc providers are:

  • Running the same api method set
  • Each method receives the same signature
  • Each method has the same effect

what is the right version query for that? rpc/starknet/protocol?

nirtayeb avatar Sep 12 '23 11:09 nirtayeb

I see. There isn't an endpoint for querying the RPC spec version, which is distinct from the Starknet protocol version.

Running the same api method set Each method receives the same signature Each method has the same effect

Does this need to be done automatically @nirtayeb? It should be possible to see what RPC versions a node supports by looking at the release notes or README (Juno supports v0.4, FWIW).

joshklop avatar Sep 12 '23 15:09 joshklop

There's a new endpoint starknet_specVersion as part of v0.5.0.

odednaor avatar Sep 15 '23 11:09 odednaor

@odednaor Only v0.5 providers are technically required to implement this method. After a few more spec releases this shouldn't be a problem, but while v0.5 is new it could be very confusing.

Do you think the method should be moved to a "meta" API that is not versioned, requiring all providers to implement it?

joshklop avatar Sep 15 '23 11:09 joshklop