You will need two 8 inch (20 cm) cake tins, 11/2 inches (4 cm) deep, lightly greased, and the bases lined with baking parchment, lightly greased.
Cream the butter and sugar together, beating thoroughly for 3 or 4 minutes until pale and fluffy. Now gradually beat in the eggs, a little at a time, beating well between each addition.
Next, sift the flour, baking powder and bicarbonate of soda on to a sheet of baking parchment.
Measure the cocoa and put it in a separate bowl, gradually stirring the stout into it. Carefully and lightly fold into the egg mixture small quantities of the sifted flour alternately with the cocoa-stout liquid. Then, when both have been added, divide the cake mixture equally between the 2 tins and level it out.
Bake the cake in the center of the oven for 30-35 minutes. The cakes should be flat on top and feel springy and will have shrunk slightly from the side of the tin. Leave them to cool in the tins for 5 minutes before turning out on to a wire rack to cool further, carefully stripping off the base papers.
To make the icing, beat the icing sugar and butter together until blended, then gradually add the stout, making sure it is thoroughly mixed in after each addition.
Melt the chocolate in a bowl set over hot water, making sure the bottom of the bowl doesn't touch the water. Then, when it's melted, remove the bowl from the water, and carefully fold the chocolate into the icing mixture.
Remove a third of the icing to a separate bowl and stir in the chopped walnuts. After all the icing has cooled to a spreadable consistency, sandwich the cake with the walnut icing. Then spread the remaining two-thirds of the icing on top of the cake, using a palette knife. Next, dust the walnut halves with cocoa powder and arrange on top of the cake.
Now try to be patient and allow the icing to become firm before eating!