Grind together the green chillies, dry coconut pieces, garlic cloves, chopped ginger, and coriander leaves (with stems) without adding any water. Set aside.
Heat oil in a pressure cooker. Once hot, add cumin seeds and mustard seeds. When they splutter, add bay leaves, black cardamom, cinnamon, star anise, green cardamoms, cloves, and black pepper.
Add curry leaves and the chopped onion. saute until the onion turns golden brown. Add asafoetida. Add the prepared spice paste and saute for 2 minutes. Add the chopped tomato and cook for another 2-3 minutes until it softens.
Add turmeric powder and mix well. Add the raw peanuts and mix well. Add coriander powder and garam masala powder and mix well.
Add the fresh peas and sauté for about a minute. Add salt to taste. Add the washed rice, mix gently, and sauté for another minute.
Add the water (typically double the amount of rice, so 6 cups for 2 cups of rice) and stir everything together. Bring the water to a boil.
Optionally, add a tablespoon of ghee for extra flavour.
Close the lid of the pressure cooker. Cook for 4 whistles: 2 on medium heat, then reduce the heat and cook for 2 more whistles on low heat.
Allow the pressure to release naturally. Once released, open the cooker, gently fluff the rice, and serve the Masale Bhat hot.