As discussed in #10143.
Explicitly define NodeId's size as an int64_t. This keeps the range uniform so that it may be exposed to external APIs. Signed ints are allowed in order to represent special values.
Edit: as per the discussion below, only the int64_t change is needed.