Preheat oven to 350 degrees. Butter round or square cake pans, and line bottoms with parchment; butter parchment, and dust with cocoa.
Into the bowl of an electric mixer fitted with the paddle attachment, sift cocoa, flour, sugar, baking soda, baking powder, and salt. With the mixer on low, stir in eggs, 1 1/2 cups warm water, buttermilk, vegetable oil, and vanilla until smooth, about 3 minutes.
Divide batter among prepared pans. Bake, rotating once, until tester inserted in center comes out clean, 35 to 45 minutes for 8-inch layers, depending on amount of batter.
Let cakes cool in pans on a wire rack for 20 minutes, then remove from pans and cool completely, right side up on rack.
Cake can be made in advance and stored up to 1 day in refrigerator.