4

I'm trying to typecheck a script, but sometimes get the following error:

$ tezos-client typecheck script helloTezos.tz
Error:
  Unrecognized command.
  Try using the man command to get more information.

This appears to be the case whenever my local tezos-node process is still warming up or in some other strange state.

The error message is misleading! Why is a network connection needed at all for type checking?

I built tezos according to the following instructions: http://tezos.gitlab.io/mainnet/introduction/howtoget.html#build-from-sources

6

Typechecking is done via a protocol RPC, if the node hasn't loaded the protocol, the RPC won't be available. You can also use a sandboxed node to typecheck contracts.

Why is the coupling with the node so tight? It shouldn't be, but there is one type of value that can be stored in a contract... Other contracts. The typechecker needs access to the ledger state to check the type of these contracts. Ultimately, this should be uncoupled but, today, it still is.

1
  • I too am running into this, using alphanet.sh. I can run ./alphanet.sh client rpc get /stats/gc and get back stats, so I'm assuming the rpc endpoints are good to go, but all I ever get is the Unrecognized command for type checking. I started everything with just the ./alphanet.sh start. Also, should typecheck show up in ./alphanet.sh client man? (I don't see it)
    – Justin
    Jan 15 '20 at 21:18

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.