Rinse dry beans several times, place them in a Dutch oven or lidded pot, cover with a few inches of water, and bring to a boil for 3 minutes. Remove and discard any foam on top. Let sit for 1 hour.
Rinse the beans and cover them again with fresh water. Bring the beans to a boil for 2 to 3 minutes. Turn down the heat. Cover and simmer until soft, about 1 hour. Add extra water as needed. Skim off and discard any foam that rises to the top.
Add the tomatoes and bay leaves, and simmer covered for another 30 minutes.
In a large cast-iron skillet or frying pan, heat the olive oil, and sauté onions, garlic, and carrots and cook until the onions are soft and starting to brown. Stir in the chili powder, salt, and optional smoked paprika and cayenne. Cook for 2 to 3 minutes more while stirring occasionally, and then add to the beans.
Simmer for 20 to 30 minutes more uncovered. Stir occasionally. Add more liquid if needed. Add more salt to your taste.
Serve with minced onion, grated cheese, and sour cream.