For the Cake:
Preheat the oven to 350°F, and place a rack in the center of the oven.
Butter two 9-inch round cake pans. Lightly dust the sides of the pans with flour, tapping out the excess and line the bottom with circles of parchment or waxed paper.
In a medium saucepan, cook the chile powder in 1 cup of the water over medium heat until simmering. Remove the pan from the heat, stir in the vanilla, and set aside.
Using a mixer with a wire whip attachment for best results, combine the flours, sugar, baking soda, salt, and cocoa and beat on low speed until well mixed. Add the softened butter to the dry mixture and beat thoroughly on medium-low speed. The mixture should be a uniform, grainy texture.
Raise the speed to medium and gradually add the remaining 1 cup of water and the buttermilk. Add the eggs, one at a time, beating well after each addition.
Slowly add the hot water/chile mixture and continue to beat just until well combined; be sure not to overbeat. Pour the mixture equally into the pans and bake for 35 to 40 minutes, or until a toothpick inserted in the center of each layer comes out clean.
To cool, set the pans on a wire rack for 15 minutes. Then turn the cakes out onto the rack, remove the paper from the bottom, and immediately invert so that the risen tops don’t flatten. Let the layers cool completely before frosting.
For the Frosting:
Combine the butter and cocoa in a large saucepan and melt over medium heat. Stir in the buttermilk. Add the confectioners’ sugar, a little at a time, stirring with a wire whisk between additions.
Stir in the bourbon and vanilla and continue to whisk until the frosting is smooth and glossy. The frosting should stiffen as it cools. (In warm weather you may need to refrigerate it.) When it is still warm, but has reached a spreadable consistency, you can assemble the cake.
If necessary, trim the tops of the cakes so that they are level. Place one of the cake layers on a 9-inch round cardboard cake circle. Spread 1 cup of the frosting over the layer. Sprinkle 1 cup of the chopped walnuts, if using, evenly over the frosting. Place the second layer of cake on the frosted base.
Use the remaining frosting to cover the top and sides of the cake. Finish the top of the cake by holding the spatula at a slight angle and making several strokes to smooth the top. To decorate the cake, press the remaining walnuts onto the lower half of the sides and on top of the cake.
This cake is best when made 1 to 2 days before serving as it gives the flavors time to blend.