Preheat oven to 350°F (175°C). Line 8×8 inch baking pan with parchment paper, leaving overhang on two sides.
In large bowl, whisk melted butter with both sugars until smooth and glossy, about 2 minutes.
Add eggs one at a time, beating well after each addition until batter is shiny and pulls away from bowl sides.
Stir in vanilla extract and sourdough discard until fully incorporated.
In separate bowl, sift together cocoa powder, salt, and flour to eliminate lumps.
Gently fold dry ingredients into wet mixture using rubber spatula until no flour streaks remain. Do not overmix.
Fold in half the chocolate chips, reserving rest for topping. Pour batter into prepared pan and spread evenly.
Sprinkle remaining chocolate chips over surface and add pinch of flaky salt if desired.
Bake 28-32 minutes until edges are set but center still jiggles slightly. Toothpick should come out with moist crumbs.
Cool completely in pan before lifting out using parchment overhang and cutting into 16 squares.