0

Attempted to inject this block but got error:

Invalid_argument "Json_encoding.construct: consequence of bad union"

What does this error actually mean? The contents of the block look fine; it is proper JSON syntax. What is this "union"?

{"data":"000c3b8002431a01fc20f695e9c8c51c373161d8d6915a995ffd8466bd45bb8496f9a2e4fe000000005f8617390424c6cb554cf62c5c959809ce034fa25f0f0786d5355d0d2e9f9419a49b2181f40000001100000001010000000800000000000c3b7f6f3dd4591aab1ba2c386e2710fc108a42dd058484c4f966530fae5296c10e226000000bc03030000a15700102df1ec8c037d6756afa4b314c2d0dcaae304348877afadcd1dbb54e3dfffbce1f3786590206309f1c088daa8b78c567624f3f1846507763963a5c5a5c42f0b","operations":[[{"branch":"BLDqMax2WNWHEhEUFrixJmP7NyrcUW8AzKDqCoBksvynaA6jucj","data":"00000c3b7fb684845331794aef918b36db9f4eaee236358bff029a02898c44207cafe2610dba6f2c06fd339c001a1863b6e03adae8669ae187c0218cdbd02e6d8ba9d8290d"},{"branch":"BLDqMax2WNWHEhEUFrixJmP7NyrcUW8AzKDqCoBksvynaA6jucj","data":"00000c3b7fcffa3cef122bf73d1a6bfd0860a578a8b6b08b2664c08c0d891e736917cd881e0b1ac5c7d890ad51300a60ed45ec509728e07c5e59c2e4e13b31a759b2763105"},{"branch":"BLDqMax2WNWHEhEUFrixJmP7NyrcUW8AzKDqCoBksvynaA6jucj","data":"00000c3b7f4edc0c44f3f27bb41aacb8af95b2c38604e62bbb157c15f91736ac5cb249d363a341dfa6ae8f69167993c7beb987343a494b2201c5f252d118e91d28ee9da10a"},{"branch":"BLDqMax2WNWHEhEUFrixJmP7NyrcUW8AzKDqCoBksvynaA6jucj","data":"00000c3b7fbee84421bd36ac8e5bc8dbf4e3a447cf21110bc5e32d29c195440818a448cee810a4aba31f3c8906bbe12071c0329d3ac17eb2202e63b03db29c4c29a266d904"},{"branch":"BLDqMax2WNWHEhEUFrixJmP7NyrcUW8AzKDqCoBksvynaA6jucj","data":"00000c3b7f3d3bc7c130b60818334d0414ac0e891a5808cfff289cdc010ba988ccad005415a3d1ae39bbb4c8dbb3095f853d58b8c8b972ca17a186edd64199268fc883ff0b"},{"branch":"BLDqMax2WNWHEhEUFrixJmP7NyrcUW8AzKDqCoBksvynaA6jucj","data":"00000c3b7f1850aea9bac4d058edcdc8c287955cd9d9724cc38eb75a662f9af95de460f117fedd6bb183b06bb74c1be876096a59680c39db04a857d6da5e3ca7bc918a8601"},{"branch":"BLDqMax2WNWHEhEUFrixJmP7NyrcUW8AzKDqCoBksvynaA6jucj","data":"00000c3b7fa4e8596d0380e2fcdacbfe5f5f40c891da03d2f34a6fbbdd0803b1ad4c7e111f47d4e354d2558b23691d183df83d9dc3dc4cbbd83316ade99284fb36aee20c0a"},{"branch":"BLDqMax2WNWHEhEUFrixJmP7NyrcUW8AzKDqCoBksvynaA6jucj","data":"00000c3b7f097e5cc68169834bbb4a3ddf71a101cb3079f12ecb2c8d8a93a40feee7800774e051f237fe083704266fd59946a09b9970ccc5ed246069ae7e591d51b8a8a603"},{"branch":"BLDqMax2WNWHEhEUFrixJmP7NyrcUW8AzKDqCoBksvynaA6jucj","data":"00000c3b7f1a4ffbd7696f1223fd479fb0459926f5eb798f0bcb4f01f691528cb0d9ea65eca8b0f27d2bcc72d3e51b22ae236f47d28fb31e7817c3c693426ce36694aed798"},{"branch":"BLDqMax2WNWHEhEUFrixJmP7NyrcUW8AzKDqCoBksvynaA6jucj","data":"00000c3b7f0827507becf565f66f42fa95efb9fc44b1b487560178630772ec5d046d0ec2232b3822baab4d9cdaaff3efeb7a0b7876cdcb48f1256f420b533d427410ab1f00"}],[],[],[]]}

1

It means 2 things:

1/ For some reason I cannot really guess like that, the economic protocol disagreed with your block and returned an error message.

2/ There were a bug in the JSON encoding of error messages from the economic protocol (fixed in the dev version but maybe not in v7 indeed) that made it crash with this unhelpful cryptic message.

So, the faulty JSON is not yours but the one of the error returned by the node. Still, there is a problem with this block (which is difficult to infer unless you can reproduce it using the master branch or the to be released extremely soon version 8 of tezos-node)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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