War, Trade, and State Formation