Preheat the oven to 375 degrees. In a small bowl, mix together the flour, baking soda, salt, and baking powder. Set that aside.
In the bowl of a stand mixer, add the melted butter, brown sugar, and white sugar. With the stand mixer fitted with the paddle attachment, cream the butter and sugar until well mixed and light in color.
Add the eggs and vanilla extract to the bowl. Mix again.
Add the sourdough discard and peanut butter to the bowl. Mix again.
Carefully add the flour mixture to the stand mixer and mix until combined. Cover the bowl with plastic wrap.
Let the dough rest in the refrigerator for at least one hour.
Add 1 cup of sugar to a bowl. With an ice cream scoop, scoop out the dough into the bowl of sugar. Roll the dough in the sugar and place the dough on a parchment lined baking sheet.
Press a fork into the cookie dough to flatten the dough. Cross hatch the dough with another fork imprint.
Bake the cookies for 12 minutes and then take them off the baking sheet and cool on a wire rack.