Thinly slice the shallots into even-sized pieces. Lay them out on a paper towel and sprinkle with some salt. This helps extract moisture. After 10 minutes, gently pat the shallots with another paper towel to remove excess moisture. Then, heat up oil in a pan, and fry the shallots until golden and crispy. Place them on a paper towel to let excess oil drain. We’ll fry the chicken in that same oil to infuse it with shallot flavor.
Toast cumin seeds, coriander seeds, and black peppercorns until fragrant or 20 seconds. Use a stone mortar and pestle to pound garlic, coriander seeds, coriander root, cumin seeds, and black peppercorns.
Transfer the spice mixture to a large mixing bowl. Add palm sugar, fish sauce, and salt. Tip: Use a mixing glove to blend the ingredients. Add tempura flour into the bowl, and slowly add ice-cold water while constantly kneading with your hand until you reach a sauce.
If you use chicken legs, make two slices around the bone. Add the chicken to the marinade and thoroughly coat each piece with the marinade sauce. Transfer to your refrigerator for at least 4 hours, or ideally overnight.
Deep-fry the chicken in the same oil as the shallots until golden brown and cooked through, flipping as needed. Heat your oil to 350°F to 375°F (175°C to 190°C). Flip occasionally. Check doneness with a thermometer; then drain on a rack or paper towels and let rest before serving.