In a large bowl, whisk together 2 cups all-purpose flour, 2 cups granulated sugar, 1 teaspoon baking soda, and ½ teaspoon salt.
Place 1 cup (2 sticks) unsalted butter, ¼ cup cocoa powder, and 1 cup water in a large saucepan over medium heat. Bring to a boil.
Remove from the heat and pour the butter mixture over the flour mixture. Stir to combine.
Stir in ½ cup buttermilk, 2 eggs, and 1 teaspoon vanilla extract.
Pour into the prepared pan and bake for 20 minutes, or until a toothpick inserted into the center comes out clean.
For the icing:
About 5 minutes before the cake is done baking, place ½ cup (1 stick) unsalted butter and ¼ cup cocoa powder in a large saucepan over medium heat. Bring to a boil.
Remove from the heat and add ⅓ cup buttermilk, 3½ cups powdered sugar, and 1 teaspoon vanilla extract. Whisk until smooth.
Spread the icing on the cake while it’s still hot.
Let cool completely before slicing.
Notes
I always recommend using store-bought buttermilk if you can. It's thicker than the homemade version, and I think it tastes tangier. That said, if you don't have buttermilk, make your own by pouring one tablespoon of lemon juice or vinegar into a 1-cup measuring cup. Fill the rest of the way with milk to the 1-cup line. Stir gently, and use this for both the cake and frosting. Want to add pecans? Stir 1 cup of finely chopped pecans into the frosting after adding the powdered sugar. Pour over the cake as directed.To make cupcakes: the batter is enough for 24 regular-sized cupcakes. Bake at 350°F for 20 minutes. Dip the cooled cupcakes upside down in the frosting, and let them sit until it solidifies. Store any leftover cake either at room temperature or in the fridge for 4–5 days. It also freezes nicely for up to a month or two.Make it ahead: you can easily make the cake 1–2 days in advance of serving it (it stays moist!). Cover tightly and store either at room temperature or in the fridge.