Sift together flour, baking soda, baking powder and salt. Set aside.
Cream peanut butter and butter. Add sugars and continue beating.
Add eggs one at a time, beating after each addition.
Add vanilla and beat until very smooth.
Add flour mixture in three portions, mixing well after each.
Put in covered container and refrigerate overnight.
Preheat oven to 350°.
Roll dough into 1-inch balls and roll in sugar, if desired; put on cookie sheet lined with parchment paper. Flatten cookies with a fork dipped in sugar, if desired.
Bake 10-12 minutes.
Cool slightly and move to racks to cool.