idgen only runs if sharedstate does