ethereum / staking-launchpad

The deposit launchpad for staking on Ethereum 🦏
Creative Commons Zero v1.0 Universal
278 stars 197 forks source link

This JSON file isn't for the right network. Upload a file generated for your current network: Mainnet. #532

Open inolen opened 2 years ago

inolen commented 2 years ago

I'm trying to fund an additional validator for the mainnet, and when uploading the deposit data I am presented with the error -

This JSON file isn't for the right network. Upload a file generated for your current network: Mainnet.

From digging into the code, it seems this error can be presented due to numerous actual issues. Given I'm using the same deposit binary that I used to generate my initial deposit, I'm wondering what MIN_DEPOSIT_CLI_VERSION is for the production launchpad site? I'm still running 2.0.0, and I'm wondering if that's failing the check at -

https://github.com/ethereum/staking-launchpad/blob/d25870fabccdc9b896fa6d061bdfbc2f87990ec1/src/pages/UploadValidator/validateDepositKey.ts#L73

inolen commented 2 years ago

Updated to the latest CLI deposit tool, regenerated the keys and the frontend accepts the latest deposit json. Diffed the new json vs the old json, the only difference is the deposit_cli_version field containing 2.3.0 rather than 2.0.0.

winksaville commented 2 years ago

I ran into this same problem and as you discovered by simply changing deposit_cli_version field to 2.3.0 it now is accepted. I searched the source code and found there is the notion of a MIN_DEPOSIT_CLI_VERSION:

wink@3900x 22-08-07T17:19:52.060Z:~/prgs/ethereum/clones/staking-launchpad (dev)
$ rg "MIN_DEPOSIT_CLI_VERSION"
src/pages/UploadValidator/validateDepositKey.ts
18:  MIN_DEPOSIT_CLI_VERSION,
76:      MIN_DEPOSIT_CLI_VERSION,

src/utils/envVars.ts
19:export const MIN_DEPOSIT_CLI_VERSION    = process.env.REACT_APP_MIN_DEPOSIT_CLI_VERSION  || '1.0.0';

And it seems process.env.REACT_APP_MIN_DEPOSIT_CLI_VERSION is now set to something > 2.0.0, although I don't see where it it set. I would have expected it to be one of the .env* files:

wink@3900x 22-08-07T17:12:32.495Z:~/prgs/ethereum/clones/staking-launchpad (dev)
$ ls .env* -l
-rw-r--r-- 1 wink users  366 Aug  7 09:50 .env.goerli
-rw-r--r-- 1 wink users  246 Aug  7 09:50 .env.mainnet
-rw-r--r-- 1 wink users  461 Aug  7 09:50 .env.ropsten
-rw-r--r-- 1 wink users 1287 Aug  7 09:50 .env.template

But that isn't the case:

wink@3900x 22-08-07T17:13:21.924Z:~/prgs/ethereum/clones/staking-launchpad (dev)
$ rg -g '*' REACT_APP_MIN_DEPOSIT_CLI_VERSION
.env.template
23:REACT_APP_MIN_DEPOSIT_CLI_VERSION=1.0.0

src/utils/envVars.ts
19:export const MIN_DEPOSIT_CLI_VERSION    = process.env.REACT_APP_MIN_DEPOSIT_CLI_VERSION  || '1.0.0';

It would be nice if the error was more explicit or the docs were better, which leads me a couple questions:

alex-miller-0 commented 2 years ago

I ran into this as well. Is there some reason CLI 2.0.0 is no longer allowed?

Armaver commented 2 years ago

Still had this same problem yesterday. Quite alarming. This error message is plain wrong. And if anything it should perhaps be a warning. But why block the user at all, if the format didn't change?

I changed the deposit_cli_version from 2.2.0 to 2.3.0 (after confirming with pros that nothing about the deposit JSON format actually changed since before the Merge) and the deposit worked fine.

BigPapa0 commented 1 year ago

Does anyone know if anything changed since version 1.1.0? That's the current version I have and just want to make sure I can just edit the version number and it will be fine?

tomx-eth commented 1 year ago

Does anyone know if anything changed since version 1.1.0? That's the current version I have and just want to make sure I can just edit the version number and it will be fine?

Also wondering this. Did it end up working?