Inconsistent answer between /script and /script/normalized for non-existent KT1
For a KT1 that does not exist, /script
does 404, whereas /script/normalized
200s with null
$ curl --show-error -v http://localhost:20004/chains/main/blocks/head/context/contracts/KT1RHSiA9vt9A7B9DupLKQw2Re8SH3QdsLmN/script
* Trying ::1:20004...
* TCP_NODELAY set
* connect to ::1 port 20004 failed: Connection refused
* Trying 127.0.0.1:20004...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 20004 (#0)
> GET /chains/main/blocks/head/context/contracts/KT1RHSiA9vt9A7B9DupLKQw2Re8SH3QdsLmN/script HTTP/1.1
> Host: localhost:20004
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< content-length: 0
< content-type: application/json
<
* Connection #0 to host localhost left intact
Vs
$ curl --data '{"unparsing_mode":"Optimized_legacy"}' --show-error -v --header 'Content-Type: application/json' http://localhost:20004/chains/main/blocks/head/context/contracts/KT1RHSiA9vt9A7B9DupLKQw2Re8SH3QdsLmN/script/normalized
* Trying ::1:20004...
* TCP_NODELAY set
* connect to ::1 port 20004 failed: Connection refused
* Trying 127.0.0.1:20004...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 20004 (#0)
> POST /chains/main/blocks/head/context/contracts/KT1RHSiA9vt9A7B9DupLKQw2Re8SH3QdsLmN/script/normalized HTTP/1.1
> Host: localhost:20004
> User-Agent: curl/7.68.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 37
>
* upload completely sent off: 37 out of 37 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< content-type: application/json
< transfer-encoding: chunked
<
null
* Connection #0 to host localhost left intact
More info:
$ curl --silent http://localhost:20004/version | jq .
{
"version": {
"major": 9,
"minor": 1,
"additional_info": "release"
},
"network_version": {
"chain_name": "SANDBOXED_TEZOS_MAINNET",
"distributed_db_version": 1,
"p2p_version": 1
},
"commit_info": {
"commit_hash": "31e6641db444bdb5d3fb9f232282b429b8c3ea7a",
"commit_date": "2021-04-30 16:58:29 +0200"
}
}
$ curl --silent http://localhost:20004/chains/main/blocks/head/metadata | jq .protocol
"PsFLorenaUUuikDWvMDr6fGBRG8kt3e3D3fHoXK1j1BFRxeSH4i"