2

The return values of the commands web3.version.network and web3.version.ethereum are:

web3.version.network = "The network protocol version"

web3.version.ethereum = "The etherum protocol version." 

I would like to know the difference between network protocol version and ethereum protocol version and what situations I use in practice.

0

Since the initial launch, Ethereum has undergone several planned protocol upgrades, which are important changes affecting the underlying functionality and/or incentive structures of the platform.

So, web3.version.ethereum returns the current Ethereum protocol version. At present it returns 0x3f which means 63. So you can know the details of these protocol here.

On other hand, web3.version.network returns the current network id which 1 for Mainnet, 3 for Ropsten, 4 for Rinkeby and 42 for Kovan network.

I hope you got the difference between them and can use them as per your usecase.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.