In a heavy bottomed pot over low heat, cook sliced garlic and ginger along with the whole spices.
Once the oil is sufficiently hot, strain it to remove the spices.
Process the chilies and the peppercorns in a food process until they're slightly coarse, like this.
Transfer them to a bowl along with a bit of salt.
Pour the hot oil over these crushed chilies and give it a quick mix.
Allow it to cool down a bit and store for later or use it whenever you want to!
Notes
Make sure you use a neutral flavored oil like canola oil for this recipe. You'll want the flavors of the spices and garlic to shine through. And of course, if you have sesame oil, feel free to use it to lend this chili oil that authentic Asian flavor.
The key to getting the perfect balance of flavors and textures is to get the temperature of the oil hot enough that it lightly toasts the ground chili peppers, but not too hot that it causes them to burn.
To deepen the flavor, I also like to add a dash of dark soy sauce to the oil after it has cooled down a little bit.
You can also add some sesame seeds along with the chili flakes before you pour the hot oil over them to bring a layer of nutty deliciousness to the Sichuan oil.