The invention discloses a highly-available contract executing method, which includes steps of (1), compiling an intelligent contract code according to contract information, wherein the intelligent contract code comprises more than maximum stack depth number of local variables, parameters or structure bodies; (2), performing grammar semantic parsing on the intelligent contract code, and generatinga corresponding abstract grammar tree; (3), converting the abstract grammar tree data structure to be a binary byte assembly code sequence and an related order; (4), explaining and executing the byteassembly code sequence by a contract virtual machine. Specific to the problems that the stack is easy to overflow and a stack element cannot be visited at random, the original intelligent contract design adopts an avoiding plan of small stack depth and exchangeable different storage spaces ordinarily; through the plan of realizing the order visit at random by the contract encoder and the virtual machine, the stack overflow is prevented and the random visit of the stack element can be realized. More complex available intelligent contract can be operated on the system; the cost for contract writing, compilation, and execution is lower.