In a dry wok or pan, fry the coriander seeds, fennel seeds and cumin separately, until aromatic. Grind all the seeds together until powdery. Set aside.
Blend the spice paste ingredients finely.
Heat the oil in a wok over low heat. Fry the cinnamon, star anise and cloves until fragrant. Add the spice paste, peppercorns and the ground coriander seeds, fennel seeds and cumin. Cook, stirring, until fragrant - about 5-10 minutes.
Add the beef, coconut milk and crushed lemongrass. Cook over medium heat, stirring occasionally, until gravy is thick and beef is tender. Season to taste with sugar and salt. Add the kerisik, toasted coconut shavings and turmeric leaves. Lower heat and cook, stirring continuously, until rendang is dry and oil appears.