During Japan's Edo period between the 12th and 17th centuries, the conditions were set for Japan's later economic success. The ruling bakufu government had absolute political power but lacked a consistent economic policy, so local governments called han were able to decide policies for taxation, administration, industry and currency. Most peasants worked on farms and paid taxes in rice, though many relocated to escape high taxes, leading to unrest. The economy grew through rice taxes, mining monopolies, trade monopolies and financial contributions from merchants seeking rights, though this required currency inflation that further increased taxes. By the late Edo period, foreign trade was banned, isolating Japan prior to reopening in the 1850s.