1. Preheat the oven to 350°F. Grease and flour three 8" or two 9" cake pans, and line them with parchment paper circles. Be sure your 9" pans are at least 2" deep.
2. For the cake: Place the stout and butter in a large, heavy saucepan, and heat until the butter melts. Remove the pan from the heat, and add the cocoa powder.
3. Whisk until the mixture is smooth. Set aside to cool to room temperature.
4. Whisk together the flour, sugar, baking powder, and salt in a large bowl; set aside.
5. In a large mixing bowl, beat together the eggs and sour cream.
6. Add the stout-cocoa mixture, mixing to combine.
7. Add the flour mixture and mix together at slow speed. Scrape the sides and bottom of the bowl, and mix again for 1 minute.
8. Divide the batter equally among the prepared pans. (See tips section for hints on weighing out the batter if you have a kitchen scale.)
9. Bake the layers for 35 minutes for 8" pans, or 45 to 50 minutes for 9" pans, until a cake tester inserted into the center comes out clean. Remove the cakes from the oven and cool on a rack for 10 minutes before turning the cakes out of their pans and returning to the rack to finish cooling completely before frosting.
10. For the frosting: Place the chopped chocolate in a large heatproof bowl. Bring the cream to a simmer in a heavy, medium-sized saucepan.
11. Pour the hot cream over the chocolate and stir until the mixture is completely smooth.
12. Stir in the vanilla. Refrigerate until the icing is spreadable, stirring occasionally, about 2 hours.
13. To assemble: Trim one cake layer to have a flat top, if necessary (otherwise the layer will crack when you place it upside down on your cake plate).
14. Line the edges of a serving plate with parchment or waxed paper to keep it clean, and then place the layer upside down on top. Spread 2/3 cup of the icing over just the top of the layer.
15. Top with another cake layer, top side down, and repeat the process. If you baked three layers, add that one also.
16. Use the remaining frosting to cover the top and sides of the cake. Remove the parchment or waxed paper. Sprinkle with shamrock sugar decorations, if you have them.