To make pesto: Preheat oven to 350°F. Spread peanuts on a small baking sheet and bake until toasted and fragrant, 8 to 10 minutes; cool. Place peanuts on a cutting board and set a heavy saucepan on top. Press down on pan to break peanuts into small, irregular pieces. In a small bowl, combine peanuts with remaining ingredients. Makes 1 1/4 cups.
To make soup: In a large saucepan, combine sweet potatoes and lemongrass with enough cold water to cover; bring to a boil. Reduce heat to medium; simmer until potatoes are tender, about 20 minutes. Remove lemongrass. Drain potatoes; reserve 3 cups cooking liquid.
Meanwhile, in a medium skillet over medium heat, heat olive oil. Add onion; cook, stirring occasionally, until soft, about 5 minutes. Add garlic and cook about 1 minute. Add jalapeño and ginger; cook, stirring, about 2 minutes.
In a blender or food processor, process potatoes, onion mixture, coconut milk and 1 1/2 cups reserved cooking liquid in batches until smooth.
Return soup to same saucepan and stir in remaining 1 1/2 cups reserved cooking liquid; bring to a simmer over medium heat. Stir in lime juice, salt and cayenne pepper. Serve immediately with peanut pesto or cool to room temperature and chill at least 1 hour.