Peel and cube the sweet potatoes, then boil until fork-tender, about 15–20 minutes. Drain, mash until smooth, and let cool slightly.
Set the oven to 325°F (163°C). Grease and flour your baking pan or line it with parchment paper.
In a large bowl, beat softened butter and sugar for 3–5 minutes until pale and fluffy.
Beat in eggs one at a time, scraping the bowl between each. Add mashed sweet potatoes and mix until smooth.
In a separate bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
Add the dry ingredients to the batter in three parts, alternating with buttermilk. Begin and end with the dry mix. Stir in vanilla and mix just until combined.
Pour the batter into the pan and bake for 60–75 minutes. Check doneness with a toothpick—it should come out clean or with moist crumbs.
Let the cake sit in the pan for 10–15 minutes, then turn it out onto a wire rack to cool. Finish with powdered sugar or glaze before serving.