Skip to content
This repository was archived by the owner on Jun 3, 2022. It is now read-only.

Add net_id to provide the current network id #6

Open
frozeman opened this issue Oct 24, 2016 · 5 comments
Open

Add net_id to provide the current network id #6

frozeman opened this issue Oct 24, 2016 · 5 comments

Comments

@frozeman
Copy link

Making the network id accessible on the RPC will allow dapps to know on which network they are right now.

We would need that in mist to know the difference between networks and store accounts accordingly.

@bas-vk @debris @chriseth

@debris
Copy link

debris commented Oct 24, 2016

cc @tomusdrw @jacogr

@bas-vk
Copy link
Member

bas-vk commented Oct 24, 2016

It looks like parity and geth are not following the spec and both return the network id instead of the network protocol version.

I would suggest:

  1. fix net_version and return the network protocol version as HEXNUM instead of a string. Maybe instead of a single version a min and max supported version.
  2. Introduce a new method net_id that returns the network id as HEXNUM

@tomusdrw
Copy link

I guess the reason for this is that there is already eth_protocolVersion that returns current protocol version. This is why I suggested to rename the method (or update spec).

If we are going to update this method I suggest it should return id and also latest fork block hash (or at least number) to distinguish possible forks (ETH vs ETC).

@danfinlay
Copy link

I'd prefer a non breaking migration path. If we change net_version to net_id, add the new method some period of time before deprecating the old method.

Otherwise, I think updating the spec is a decent immediate step.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants