Place beans in a large pot oven safe pot and pour in enough water to cover by about 2". Cover the pot and let the beans soak for 1 to 2 hours. Enameled cast iron works great.
Drain the beans and cover with the same amount of fresh water. Bring to a boil, then reduce heat to low, cover the pot, and let simmer for 1 hour. Drain the beans and save the liquid.
In a large oven safe pot or Dutch oven, combine soaked beans, 2 cups of the reserved cooking liquid, onion, ketchup, brown sugar, molasses, salt, mustard, mesquite powder, pepper, bay leaf, and bacon. Mix well. It may seem very loose but don’t worry. Cover and bake at 300 degrees for 5 hours or until the sauce has thickened to desired consistency. Stir occasionally and add more of the reserved cooking liquid if needed during cooking time.
At end of cooking time remove and discard bay leaves. Taste beans and season with additional salt and pepper, if needed.