Rewrite state_get_runtime_version
to use shared code
#2736
Merged
state_get_runtime_version
to use shared code
#2736