Preheat your oven to 350°F (175°C). Grease and flour a 9×13-inch baking dish.
Make the Cake Batter:
In a medium saucepan, melt the butter over medium heat. Stir in the cocoa powder until smooth.
Remove from heat and stir in the granulated sugar. Add the eggs one at a time, beating well after each addition.
Add the flour and salt, mixing until just combined. Stir in the vanilla extract and chopped pecans (if using).
Bake the Cake:
Pour the batter into the prepared baking dish and spread it evenly. Bake in the preheated oven for 25-30 minutes, or until a toothpick inserted into the center comes out clean.
Add Marshmallows:
Remove the cake from the oven and immediately sprinkle the mini marshmallows evenly over the top. Return the cake to the oven for 3-5 minutes, or until the marshmallows are puffed and just beginning to melt. Remove from the oven and let it cool slightly while you prepare the frosting.
Prepare the Frosting:
Make the Frosting:
In a medium saucepan, melt the butter over medium heat. Stir in the cocoa powder and milk, mixing until smooth.
Remove from heat and stir in the vanilla extract. Gradually whisk in the powdered sugar until the frosting is smooth and spreadable.
Frost the Cake:
Pour the warm frosting over the marshmallow-topped cake, spreading it evenly with a spatula.
Chill and Serve:
Allow the cake to cool and the frosting to set, about 20 minutes. Cut into squares and serve.