Preheat the oven to 350 degrees F (175 degrees C). Grease an 18x13x1-inch baking pan with cooking spray.
Combine butter, water, and cocoa powder in a saucepan over medium heat. Stir together and bring to a boil. Remove from heat and mix in sugar and vanilla extract. Set aside and allow to cool, about 15 minutes.
Whisk together buttermilk and eggs in a small bowl. Combine gluten-free flour, baking soda, and salt in a large bowl, mixing well. Add buttermilk-egg mixture, followed by cocoa mixture. Stir batter well until no lumps remain. Pour into the prepared baking pan.
Bake in the preheated oven until a toothpick inserted comes out clean and the cake is starting to pull from the sides of the pan, 25 to 35 minutes. Allow to cool for 15 minutes before frosting.
Combine butter, cocoa powder, and milk in a saucepan over medium heat to make the frosting. Bring to a boil. Remove from heat once milk is boiling and whisk in confectioners’ sugar and vanilla. Pour frosting over the warm cake and spread evenly over the tops and the sides with a spatula. Sprinkle with chopped pecans.
Allow cake and frosting to cool completely before serving, about 30 minutes.
You can substitute soured milk for the buttermilk.
Source: Read Full Article