1) Heat oil in a medium saucepan over medium heat until shimmering. Add in the onion and cook, stirring occasionally, until softened but not browned, 5 to 8 minutes. Add the mushrooms and saute until wilted. Add in the garlic and stir until fragrant, about 30 seconds.
2) Add the spices and salt and saute with the onions until fragrant.
3) Stir in the walnuts.
4) Add the fish sauce to deglaze the pan.
5) Add the palm sugar and vinegar and stir until the sugar has dissolved.
6) Add the tomato puree, bring to a boil, then reduce the heat and simmer the ketchup until thickened, about 45-60 minutes.
7) Place ketchup in a blender and purée until completely smooth.
8) Pour ketchup into a glass jar and keep it in your fridge for up to one month