I think you need to read the well-researched and documented paper I provided. Perhaps the link did not come through cleanly. But yes, eunuchs were castrated in the palace by the Sultan’s surgeon. Some were imported, and some were domestically produced. This is WELL documented.