Blend red chilies, dried chilies, galangal, ginger, shallots, garlic, and candlenuts in a blender with ¼ cup (60ml) water. Transfer to a bowl. Add ground coriander, cumin, and fennel. Mix into a paste.
Heat vegetable oil in a medium sized pot. Stir fry cinnamon sticks, star anise, cardamom pods, cloves, lemongrass, and spice paste over medium heat until fragrant, about 4 to 5 minutes.
Add beef and give it a good stir to coat with spices. Then pour in ½ cup (120ml) water and coconut milk. Cover and bring to a boil. Reduce heat and simmer for 1 hour or until beef is tender. Do give it a stir occasionally.
In the meantime, toast (without oil) grated coconut in a frying pan, stirring constantly over low heat for about 8 to 10 minutes or until golden brown. Transfer to a mortar and pound toasted coconut into a paste to release the oil and fragrance. Set aside.
Add sugar, salt, kerisik (fried coconut paste), kaffir lime leaves, and turmeric leaf (if using). Continue to cook for 30 minutes until meat is very tender and only a little gravy remains.
Serve with roti jala, nasi briyani, or white basmati rice.