Change the way we get network_id for ETH #470

Closed
opened 2022-11-03 12:38:42 +00:00 by vampik · 12 comments
vampik commented 2022-11-03 12:38:42 +00:00 (Migrated from gitlab.com)

Public nets (Sepolia, for example) doesn't support admin_nodeInfo.
Need to change how we get network_id without using this function.

Public nets (Sepolia, for example) doesn't support `admin_nodeInfo`. Need to change how we get `network_id` without using this function.
vampik commented 2022-11-03 12:38:42 +00:00 (Migrated from gitlab.com)

assigned to @vampik

assigned to @vampik
vampik commented 2022-11-04 05:51:33 +00:00 (Migrated from gitlab.com)

mentioned in commit a30325660d

mentioned in commit a30325660dcfefb88b694b975f8896ab5c736813
vampik commented 2022-11-04 05:52:40 +00:00 (Migrated from gitlab.com)

mentioned in merge request !173

mentioned in merge request !173
vampik commented 2022-11-04 05:53:04 +00:00 (Migrated from gitlab.com)

assigned to @serkixenos

assigned to @serkixenos
serkixenos commented 2022-11-10 11:35:08 +00:00 (Migrated from gitlab.com)

mentioned in commit d5b2b7aeda

mentioned in commit d5b2b7aeda7ba1fd39e2b1936da347f683fa2103
serkixenos commented 2022-11-10 13:13:42 +00:00 (Migrated from gitlab.com)

assigned to @prandnum

assigned to @prandnum
serkixenos commented 2022-11-10 13:13:49 +00:00 (Migrated from gitlab.com)

assigned to @wsalloum

assigned to @wsalloum
prandnum commented 2022-11-13 15:40:00 +00:00 (Migrated from gitlab.com)

@vampik please provide the test steps

@vampik please provide the test steps
vampik commented 2022-11-14 04:49:34 +00:00 (Migrated from gitlab.com)

@prandnum @wsalloum

You can check this fix with Sepolia test net.

To connect to Sepolia you need to specify in config file:

ethereum-node-rpc-url = https://rpc.sepolia.org:443

ethereum-wallet-contract-address = 0xCC806dA9DF9D634B5DaC0Aa36dca1e7780e42C60

With the default version (from develop), witness_node wouldn't start, because the error in getting chain_id and network_id for ETH.

After this change, witness_node should start successfully.

@prandnum @wsalloum You can check this fix with Sepolia test net. To connect to Sepolia you need to specify in config file: `ethereum-node-rpc-url = https://rpc.sepolia.org:443` `ethereum-wallet-contract-address = 0xCC806dA9DF9D634B5DaC0Aa36dca1e7780e42C60` With the default version (from develop), `witness_node` wouldn't start, because the error in getting `chain_id` and `network_id` for ETH. After this change, `witness_node` should start successfully.
prandnum commented 2022-11-15 16:12:29 +00:00 (Migrated from gitlab.com)

@vampik I am able to start the witness node without any change in develop branch. I can see that the network id and chain id is resolvable from logs.

{"log":"2759006ms th_a sidechain_net_handler_ethereum.cpp:165 sidechain_net_handle ] Running on Ethereum network, chain id 33, network id 33\n","stream":"stderr","time":"2022-11-15T15:45:59.006887632Z"}

@vampik I am able to start the witness node without any change in develop branch. I can see that the network id and chain id is resolvable from logs. `{"log":"2759006ms th_a sidechain_net_handler_ethereum.cpp:165 sidechain_net_handle ] Running on Ethereum network, chain id 33, network id 33\n","stream":"stderr","time":"2022-11-15T15:45:59.006887632Z"}`
vampik commented 2022-11-15 17:12:07 +00:00 (Migrated from gitlab.com)

@prandnum
chain id 33 - it is not Sepolia!

@prandnum `chain id 33` - it is not Sepolia!
prandnum commented 2022-11-18 16:20:54 +00:00 (Migrated from gitlab.com)

chain id and network id were retrieved with the above mentioned change.

1480167ms th_a sidechain_net_handler_ethereum.cpp:165 sidechain_net_handle ] Running on Ethereum network, chain id 11155111, network id 11155111

chain id and network id were retrieved with the above mentioned change. `1480167ms th_a sidechain_net_handler_ethereum.cpp:165 sidechain_net_handle ] Running on Ethereum network, chain id 11155111, network id 11155111`
prandnum (Migrated from gitlab.com) closed this issue 2022-11-18 16:20:55 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#470
No description provided.