Cover the navy beans with 6 cups of the water and soak them for 8 to 12 hours, then drain and rinse.
Place the beans, ham hocks, remaining 4 cups water, onion, carrots, celery, bay leaves and pepper in a heavy pot.
Add enough fresh water to cover the beans by 1 inch, bring to a boil, then lower the heat and simmer partly covered for 2 to 2 1/2 hours until the beans are tender.
Lift out the ham hocks, discard the skin and bones, chop the meat, and return it to the soup.
Mash 1 cup of beans against the pot, stir in the vinegar, and add only as much of the salt as the smoky broth needs.
Simmer for 10 minutes until the ham reaches 165°F and the broth looks lightly creamy.