The invention relates to a blockchain code block independent upgrading method, a block on a blockchain comprises a code block and a data block, and the method comprises the following steps: writing adownloaded provenance block code into a local computing device, executing the provenance block code, and adding the provenance block code into a blockchain network; linking the new version code blockcontaining the upgrade code after a consensus process; and if the new version code block takes effect, executing the block chain protocol according to the new code logic to complete the upgrading of the block chain protocol. The invention further provides a block chain code block independent upgrading device, the code blocks with relatively independent functions on the block chain are independently upgraded, and development and upgrading of the block chain technology are facilitated; the upgrading process of the protocol is carried out on the chain, the voting process is public and transparent, and each user obtains the voting right with the equal proportion of rights and interests held by the user and is very fair for each user; the new version code does not need to consider and process the old version code logic, the design is simple, the logic is clear, maintenance is convenient, and testing is convenient.