maybe we wanna use `-1` for `all available nodes` in the future and make this a `writeInt` instead?