Heat the oven to 180°C/350°F, or 160°C fan. Grease and line three 20 cm/8-inch cake pans.
Sift the cocoa and flour together.
Beat the eggs for 30 seconds. Slowly pour in the sugar over 45 seconds, then add vanilla.
Beat for 7 minutes, until pale and tripled in volume.
Fold in the dry ingredients gently, followed by the cooled melted butter.
Divide the batter between the pans. Bake about 20 minutes, until the centers spring back. Cool completely.
Drain the cherries and reserve their juice. Simmer the juice, liqueur if using, sugar and cornflour until glossy and thick. Cool.
Whip the cream with vanilla and icing sugar to firm peaks.
Trim the sponges if needed. Brush with syrup, spread with cream, and add cherries between layers. Stack and cover with cream.
Finish with grated chocolate and cherries. Chill at least 4 hours, preferably overnight.