Soak the chilies. Remove the stems from the large dried chilies, cut them in half, and soak them in water with 2 teaspoons of salt for 30 minutes. Drain well.
Make the chili paste. Pound the soaked chilies, optional small dried chilies, garlic, shallots, and shrimp paste into a smooth paste using a mortar and pestle.
Fry the paste. Heat the oil in a wok or large skillet over medium heat. Stir-fry the chili paste for about 1 minute until fragrant.
Cook the pork. Add the ground pork and cook, breaking it into small pieces, until no longer pink.
Finish the dip. Stir in the tomatoes, tamarind paste, fish sauce, palm sugar, salt, and water. Simmer for about 10 minutes, stirring occasionally, until the tomatoes break down and the dip thickens.
Serve. Taste and adjust the seasoning if needed. Serve warm with sticky rice, fresh vegetables, and crispy pork cracklings.