Preheat oven to 350 degrees.
To a small bowl, add the flour, cornstarch, baking soda, salt and baking powder. Fluff together with a fork. Set aside.
Using a stand mixer or a handheld mixer, mix together the softened butter and granulated sugar until light and creamy.
Add the egg, egg yolk and vanilla. Mix again, scraping the sides and bottom as needed until fully incorporated, light and fluffy.
Pour ¾ cup sourdough discard (direct from the fridge or use ripe sourdough starter) and add to the bowl. Mix together.
Add the flour mixture and mix until just incorporated. Pour in the buttermilk and mix until smooth.
Add 2 cups of fresh blueberries (reserving ½ cup for topping) to the batter and stir lightly to combine. See recipe note if using fresh blueberries.
Line an 8 by 8 pan (my favorite, affiliate link) with parchment paper. Pour blueberry cake mixture into the pan and spread evenly. Sprinkle the crumb mixture on top of the cake, spreading it evenly and breaking up clumps with your fingers as you go. Dot the top with the reserved ½ cup of blueberries.
Bake the cake for 60-75 minutes until baked through. Once the cake has stopped jiggling in the middle, take a sharp knife and stick it straight in the middle of the cake. If it has batter on it, continue baking a few more minutes. If it comes out clean, the cake is finished baking.
Cool and slice to serve. The cake stores well at room temperature for a day or two or can be frozen for longer storage.