Backport !4911 - Normalize types and code of views in RPCs and client commands
Context
!4911 (merged) would be good to include Protocol J. Cherry-picked all commits using the following commands.
$ git checkout -b proto-j-backport-4911
$ git cherry-pick 64092493a97b69143da3e8aedacdfed2edc72a18^..b3fa5a59ad8f44b88aab6750f51d244248d85fc7
Manually testing the MR
Check CI.