Remove the stems from the guajillo and ancho peppers and remove the seeds. You may need to cut into the peppers for this, which is fine.
Heat a large pan to medium-high heat and dry toast the dried peppers a couple minutes per side. They will become more pliable and slightly puff up. This helps to release the oils for more flavor.
Place the dried pods in a large bowl and cover with hot water. Soak them for 15 minutes, or until they become very soft and rehydrate. Transfer the softened peppers to a food processor, but reserve the soaking liquid.
While the peppers are softening, heat olive oil in a medium pan and add the onion. Cook it down for 4-5 minutes to soften.
Add the garlic and cook another 30 seconds to 1 minute, until you it becomes fragrant.
Add the tomato paste, cinnamon, cumin, oregano, sugar and salt. Cook for 1 minute, stirring.
Stir in 1/2 cup chicken stock. Reduce heat and simmer for 5 minutes.
Add the mixture to the food processor along with the softened peppers, vinegar, and 1/4 to 1/2 cup of fresh water, or you can use the dark liquid from soaking the peppers. Process until smooth.
Adjust with salt and sugar to taste, and with a bit more water until you achieve your desired consistency. Strain if you’d like a thinner sauce, or use as-is.