Datalayer - Pending root error

Hello all. Trying to make a simple datalayer of Bitcoin block numbers and block hashes for “fun” and stuck with getting DL to function at all. I heard it works for others, so thought I’d ask here.

Anybody else getting this error?
chia data update_data_store --id=3f54c854a35338d8e2964fa5f5ec532215ac1b318b369973dd072f9f8ec8e36c -d '[{"action":"insert", "key":"0003", "value":"abc123"}]'
**Already have a pending root waiting for confirmation**
Went through all the steps DataLayer User Guide | Chia Dev Guides

The only one that seemed out of the ordinary was configuring my router for the port forwarding. I couldn’t figure out how to pass the port to a specific internal IP. I don’t that would cause this issue though.

Also, the following command:
$ chia data get_root --id 3f54c854a35338d8e2964fa5f5ec532215ac1b318b369973dd072f9f8ec8e36c

returns:
{‘confirmed’: True, ‘hash’: ‘0x0000000000000000000000000000000000000000000000000000000000000000’, ‘success’: True, ‘timestamp’: 1665268745}

The dreaded zero hash which confirms the pending root confirmation… I guess. The documentation says to expect the zero hash at first and after a short wait it will convert to real hash. It’s been nearly a week, multiple node restarts, and one full system reboot. Also, I can confirm data and data_layer_http service are started, restarted several times, and currently running.

Thanks!

Does anybody have DL working?

If so, can you please reply with your:

  1. Chain (mine is both testnet10 and mainnet)
  2. Branch (mine is “main”
  3. OS (mine is Linux)

Thanks!
Gerald

Hi there Gerald,

I apologize for the delay - I am looking into why it stayed unanswered for so long.

The documentation has this slightly wrong. The 0 hash is expected for a confirmed but empty datastore. So 0 hash is expected, and you want to use the confirmed flag for checking if it has been confirmed on chain or not.

Note, port forwarded may not be needed if you have some other machines on your local subnet you can use for basic testing.

The number one cause of Already have a pending root waiting for confirmation is that a previous change got into datalayer, but got rejected or some other error from the wallet or mempool. We don’t handle these class of errors particularly well. To detect this you really need to put your logs into INFO mode and watch them.

If you want to , you can DM me on keybase (emlowe) or here and we can have a chat on how to setup and get running.

1 Like