{ "description": "Transform an Apalache counterexample into a Tendermint LightClient test", "use": [ "unix.json", "apalache-tendermint.json" ], "input": [ { "name": "block_to_initial_block", "description": "transforms a block from Apalache CE into a JSON-encoded Tendermint initial light block", "kind": "INLINE", "source": { "signed_header": "$ | block_to_signed_header", "next_validator_set": "$ | block_next_validators | ids_to_validator_set", "trusting_period": "1400000000000", "now": "$utc_timestamp" } }, { "name": "state_to_lite_block_verdict", "description": "transforms a block from Apalache CE into a JSON-encoded Tendermint light block", "kind": "INLINE", "let": { "block": "$..[?(@.key.str == 'current')].value" }, "source": { "block": { "signed_header": "$block | block_to_signed_header", "validator_set": "$block | block_validators | ids_to_validator_set", "next_validator_set": "$block | block_next_validators | ids_to_validator_set" }, "testgen_block": { "header": "$block | block_to_header", "commit": "$block | block_to_commit", "validators": "$block | block_validators | ids_to_testgen_validators", "next_validators": "$block | block_next_validators | ids_to_testgen_validators" }, "now": "$..[?(@.key.str == 'now')].value | unwrap | tendermint_time", "verdict": "$..[?(@.key.str == 'verdict')].value.str | unwrap" } } ], "output": { "description": "auto-generated from Apalache counterexample", "initial": "$history[0]..[?(@.key.str == 'current')].value | block_to_initial_block", "input": "$history[1:] | map(state_to_lite_block_verdict)" } }