Skip to content

Problem: priv_validator_state.json may get corrupted #202

@tomtau

Description

@tomtau

@borischeuk-crypto came across an issue where priv_validator_state.json was empty and the nitro helper would crash with:

failed to get a state syncing helper: Error(Context { kind: SyncError, source: Some(Message("error parsing .../.tmkms/state/priv_validator_state.json: EOF while parsing a value at line 1 column 0")), backtrace: Some(   0: tmkms_nitro_helper::command::start

There are probably a few ways how this can be improved:

  1. check the state syncing helper code whether atomic writing via tempfile can be improved (also not sure if the helper @borischeuk-crypto used had https://github.com/crypto-com/tmkms-light/pull/115/files )
  2. improve the error message to e.g. give some troubleshooting suggestion (re-initialize the file with the latest block height?)
  3. add a different option for storing/retrieving priv_validator_state.json... e.g. with DynamoDB instead of a local file

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions