0

I'm running some tests on tezos sandbox mode and in one of the commands for baking a new block, sometimes I get the following error: Unexpected seed's nonce commitment in block header. The error doesn't happen every time, most of the time it works.

What is causing the error and is there a fix for it?

Below is the full output of the error.

# /Users/dariuscognac/Documents/GitHub/tezos/tezos-client -base-dir /var/folders/r5/yk8yg2xs1gs8xzkn5l8vr72w0000gn/T/tezos-client.i0_pintr -endpoint http://localhost:18730 bake for baker5 --minimal-timestamp
Oct  7 00:22:27.130 - alpha.baking.forge: found 0 valid operations (1 refused) for timestamp 2020-10-06T23:22:29-00:00 (fitness 01::0000000000000008)
Oct  7 00:22:27.138 - alpha.baking.forge: Error while injecting block
Oct  7 00:22:27.138 - alpha.baking.forge:     Included operations : 
Oct  7 00:22:27.138 - alpha.baking.forge:     Error:
Oct  7 00:22:27.138 - alpha.baking.forge:       Invalid block BKpFmqYcEBsi
Oct  7 00:22:27.138 - alpha.baking.forge:         Failed to validate the economic-protocol content of the block: 
Oct  7 00:22:27.138 - alpha.baking.forge:         Error:
Oct  7 00:22:27.138 - alpha.baking.forge:           Unexpected seed's nonce commitment in block header.
Oct  7 00:22:27.138 - alpha.baking.forge: .
Oct  7 00:22:27.138 - alpha.baking.forge: 
Error:
  Invalid block BKpFmqYcEBsi
    Failed to validate the economic-protocol content of the block: Error:
                                                                    Unexpected seed's nonce commitment in block header.
.

Traceback (most recent call last):
  File "test_zkch_dummy_contract_call.py", line 432, in <module>
    scenario_mutual_close() 
  File "test_zkch_dummy_contract_call.py", line 298, in scenario_mutual_close
    sandbox.client(0).bake('baker5', BAKE_ARGS)
  File "/Users/dariuscognac/Documents/GitHub/tezos/tests_python/client/client.py", line 323, in bake
    return client_output.BakeForResult(self.run(cmd))
  File "/Users/dariuscognac/Documents/GitHub/tezos/tests_python/client/client.py", line 164, in run
    (stdout, _, _) = self.run_generic(params, admin, check, trace)
  File "/Users/dariuscognac/Documents/GitHub/tezos/tests_python/client/client.py", line 153, in run_generic
    completed_process.check_returncode()
  File "/Users/dariuscognac/anaconda3/lib/python3.7/subprocess.py", line 409, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/Users/dariuscognac/Documents/GitHub/tezos/tezos-client', '-base-dir', '/var/folders/r5/yk8yg2xs1gs8xzkn5l8vr72w0000gn/T/tezos-client.i0_pintr', '-endpoint', 'http://localhost:18730', 'bake', 'for', 'baker5', '--minimal-timestamp']' returned non-zero exit status 1.
(venv) $ 

1 Answer 1

1

The error means that a nonce commitment should have been included in the block, but it was not (or the other way around, it was included, but it was not expected to be included). See here for details: http://tezos.gitlab.io/whitedoc/proof_of_stake.html#random-seed.

In sandbox mode, a nonce commitment should be included every 4 blocks, as far as I understand.

For a level (corresponding to an existing block) you can see whether it was expecting a commitment as follows: tezos-client rpc get /chains/main/blocks/<level>/metadata | jq .level.expected_commitment

Anyway, this should not normally happen, so maybe you could give more details about when it does happen. You could also file an issue at https://gitlab.com/tezos/tezos/-/issues.

1
  • Thanks! Okay yes the next time it happens I’ll file an issue
    – Darius
    Oct 7, 2020 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.