we're actually using int64_t (almost) all over the place so that -1 can represent an invalid pool (in return values, etc.).