question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignore launchpad deposit_data json file when loading keystores

See original GitHub issue

Description

Users commonly copy all the files generated by the deposit-cli into their teku keys directory, including the deposit_data json file. Since it’s a .json file, Teku tries to load it as a keystore and fails to find a password file matching it resulting in confusing errors.

We should just ignore the deposit_data json file.

Sample content of deposit_data-1620858087.json:

[{"pubkey": "b93de474b36c68f1323b80d529220cbe868d876bf6be45259a2005159585f5154f8b24209dbbbf049ddadb9947a5e490", "withdrawal_credentials": "002c7560879a767d9d4447fda04b7a497af19cc80994d614557f7836fad6867b", "amount": 32000000000, "signature": "b552c4e2982d49cc626f284172ebf500478392980a0aa96b11e6a5c9f081cbd31bbf6cba503d1a3564dc5be9243311b203262f2863390eb483fb58b474527d91bbe5193e3c6e0d9f863c53c8ad0331e70f1180d1e730d4f46bbbfdaede0aa6a5", "deposit_message_root": "09b32e44c341c2977d8528af610e1adbbb249ce293133ae4a8b7c2a7d7afcfa0", "deposit_data_root": "9f88c0dedc95efa6be9048effa9a4376873078227f1ef9292f28683adc650b49", "fork_version": "00000121", "eth2_network_name": "altona", "deposit_cli_version": "1.1.0"}]%

We probably should check the content is at least vaguely like a deposit data file or at least not a keystore file before ignoring the file rather than just ignoring all deposit_data-*.json files.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ajsuttoncommented, Jun 9, 2021

@ajsutton - I was thinking of giving it a try. keystore json has crypto, kdf and cypher, If the current pair doesn’t have those keys in json, then probably ignore that json? Would that be a good check?

I’m inclined to go the other way and pick a few fields that do appear in the deposit file and ignore it specifically. We don’t want to silently ignore a file that the user added to the directory thinking it was a valid keystore, so generally better to fail. The deposit file just happens to be a very commonly added file which definitely shouldn’t be loaded so we want to explicitly filter it out.

But the basic idea of just checking if a couple of fields are present as part of the check is right. It doesn’t have to be a perfect check, just enough to avoid accidentally ignoring files we shouldn’t.

0reactions
ajsuttoncommented, Jun 15, 2021

Fixed by #4085

Read more comments on GitHub >

github_iconTop Results From Across the Web

ethereum/staking-deposit-cli - GitHub
deposit-cli is a tool for creating EIP-2335 format BLS12-381 keystores and a corresponding deposit_data*.json file for Ethereum Staking Launchpad.
Read more >
Step-by-step Self-Staking Guide for DAppNode Users - Medium
Generating mnemonic and validator keystores with the official Ethereum Launchpad to validate Ethereum 2 on DAppNode.
Read more >
How to setup a validator for Ethereum staking on testnet GOERLI
This password encrypts your keystore files. Write down your mnemonic ... You can return later to launchpad with your deposit-data to finish the...
Read more >
SAP Fioir Application Json model data is not loading in ...
Hi All, I have created a mock json data model in SAPUI5 application webide. It is working fine in webide. But after deployed...
Read more >
how to parse a huge JSON file without loading it in memory
JsonIgnoreProperties ; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.File; import java.math.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found