I managed to manually set up a testnet consisting of 2 nodes on different hosts. The nodes connect, and using tezos-client I can successfully import secret keys (import secret key bootstrap1 ${BOOTSTRAP1_SECRET}) and query the node (rpc get /chains/main/blocks/head/metadata).

However, when I want to activate protocols (I tested Pt24m4xiPbLDhVgVfABUjirbmda3yohdN82Sp9FeuAXJ4eV9otd and ProtoDemoNoopsDemoNoopsDemoNoopsDemoNoopsDemo6XBoYp), I get an error and my node crashes, stating

Invalid_argument: "Json_encoding.construct: consequence of bad union".


enter image description here

enter image description here

I am working on alphanet because I could not inject the required protocol on carthage.

My node's config is as follows:

enter image description here

*** Update: In the meantime, I was able to inject the protocol on a node when I run it with parameter --sandbox=<<path to json containing the genesis_pubkey>>. However, in this case, the --sandbox parameter implies that I cannot connect to another node on another host. Running the node without the --sandbox parameter gives the above-described error when injecting the protocol. I also tried to first start the node with the --sandbox command, inject the protocol, and restart it without the --sandbox command. This again works fine for the first node. When I start the second node without --sandbox, it synchronizes with the first node but crashes as soon as I inject the protocol there, again with the Json_encoding error from above. When I start the second node with --sandbox (and therefore separately from node 1), inject the protocol and restart it without --sandbox, it will synchronize with the first node for a few seconds but then hang without any further error message. In case I run a baker on the second node, it will stop saying

baker waiting for more endorsements in the mempool

I have no idea what is going on there...

1 Answer 1


The error message is meaningless for a tricky reason (a fixpoint is badly computed leading the error reporting mechanism to raises an error itself: https://gitlab.com/tezos/tezos/-/merge_requests/1376 )

Anyway, the root of your problem is probably that you don't have the right activator key. The public key of the activator is defined line 105 of src/proto_genesis/lib_protocol/data.ml. Be sure it corresponds (on all your nodes) to the key you're using.

  • Thank you very much for your suggestion. I localized the public key of the activator in src/proto_genesis/lib_protocol/data.ml and replaced it by the public key associated with the private key activator. I also understand why this has to be done because in the same file it is specified that if the --sandbox argument is given, the public key will be adjusted accordingly. Unfortunately, I still get the same error (which, however, according to your hint does not necessarily mean that the reason is still the same). Could there be another place where the public key has to be replaced? Commented Mar 27, 2020 at 22:51
  • Could the reason be that next_protocol - which I can query via tezos-client rpc get /chains/main/blocks/head/metadata - must coincide with the protocol I wish to activate? Commented Mar 27, 2020 at 23:46
  • The next common problem when activating a protocol from genesis is that the ~/tezos/sandbox-parameters.json is incorrect (often because this is not parameters for the protocol you're trying to activate) Have you checked that? (That's my last idea, if that does not work, you'll have to cherry-pick the patch in order to get the real error back.) Commented Mar 28, 2020 at 18:12
  • Thanks a lot! I actually tried things on alphanet with your hint of changing the public key of the activator, and there it works like a charm. However, for carthagenet I still do not succeed. For the time being, I am happy to work on alphanet but I will try to resolve the issue for carthagenet in parallel. Since my original question was for alphanet, I will mark the question as answered. Commented Mar 28, 2020 at 22:04
  • It actually also works for carthagenet - I have no idea what I changed compared to the first attempts, but now I can reliably inject the Carthage protocol. Thanks again! Commented Mar 29, 2020 at 20:34

Your Answer

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

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