In a small saucepan, melt the butter with the Guinness over medium heat; remove from heat, pour into a bowl and whisk in sugar and cocoa. Whisk in the sour cream, eggs and vanilla. Stir in the flour, baking soda and salt just until blended. Divide the batter between paper-lined cupcake tins and bake in a preheated 350°F oven for 20-25 minutes, until tops are springy to the touch.
To make the frosting, beat the butter, confectioners’ sugar and Guinness until you have a spreadable frosting.
Wait until the cupcakes have cooled completely before frosting.