Prepare the Cake Batter. Preheat your oven to 350°F. Grease a 9x13-inch sheet pan or line it with parchment paper. In a large mixing bowl, whisk together the flour, sugar, baking soda, and salt. In a saucepan, melt the butter, then stir in cocoa powder and water. Bring to a gentle boil, then pour over the dry ingredients, mixing until combined. Add the buttermilk, eggs, and vanilla extract, mixing until smooth.
Bake the Cake. Pour the batter into the prepared sheet pan, spreading it evenly. Bake for 20-25 minutes or until a toothpick inserted into the center comes out clean.
Prepare the Frosting. While the cake bakes, melt the butter in a saucepan over medium heat. Stir in cocoa powder and milk, then bring to a gentle simmer. Remove from heat and whisk in powdered sugar and vanilla extract until smooth.
Frost the Cake. Pour the warm frosting over the hot cake, spreading it quickly and evenly. Sprinkle with chopped pecans if desired.
Cool and Serve. Allow the cake to cool at room temperature until the frosting sets. Slice into squares and enjoy!