Preheat your oven to 350°F (175°C). Grease a baking sheet.
In a mixing bowl, combine flour and sugar. Set aside.
In a saucepan, melt butter, add water and cocoa powder. Bring to a boil, then remove from heat.
Pour the cocoa mixture over the flour mixture and stir to combine.
Add buttermilk, beaten eggs, baking soda, vanilla extract, and salt. Mix until smooth.
Pour the batter into the prepared baking sheet and bake for 20 minutes.
While the cake is baking, prepare the frosting. In a saucepan, melt butter, add cocoa powder and milk. Bring to a boil, then remove from heat.
Stir in powdered sugar and vanilla extract until smooth. Add pecans if using.
Pour the frosting over the warm cake and spread evenly.
Let the cake cool before serving.