starkware-libs / starknet-specs

91 stars 74 forks source link

Supporting starknet_protocolVersion #132

Open nirtayeb opened 1 year ago

nirtayeb commented 1 year ago

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?

joshklop commented 1 year ago

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.

Mirko-von-Leipzig commented 1 year ago

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

nirtayeb commented 1 year ago

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

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

joshklop commented 1 year ago

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).

odednaor commented 1 year ago

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

joshklop commented 1 year ago

@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?