0

I was trying to originate a smart contract from legacy smartpy CLI.

I got this error:

[INFO] - Using RPC https://ghostnet.ecadinfra.com...
{
    "message": "Http error response: (500) [{\"kind\":\"temporary\",\"id\":\"failure\",\"msg\":\"Invalid operation oohqYgAvVmHJP4No2qPJyUUddmMzEaZkQ7c1VRYa2smEshnp6PQ: \\nError:\\n  Oversized operation (size: 36684, max: 32768)\\n.\"}]\n",
    "status": 500,
    "statusText": "Internal Server Error",
    "body": "[{\"kind\":\"temporary\",\"id\":\"failure\",\"msg\":\"Invalid operation oohqYgAvVmHJP4No2qPJyUUddmMzEaZkQ7c1VRYa2smEshnp6PQ: \\nError:\\n  Oversized operation (size: 36684, max: 32768)\\n.\"}]\n",
    "url": "https://ghostnet.ecadinfra.com/injection/operation",
    "name": "HttpResponse"
}

How can I handle this?

1 Answer 1

1

If the operation is packed (eg. it's alongside a public key revelation), try to inject the revelation is a separate operation.

If you only injected the origination operation, the solution might be more tricky. Here are some hints:

  • Try compiling with different SmartPy options if available to aggressively simplify the (size of the) generated code;
  • If some parts of the SmartPy code could be simplified (eg. is dead code) or refactored, it should be done to reduce the size of the originated Michelson code;
  • Register some portions of the code as global constants and use those constants in the code
  • Register some portions of the code in a bigmap, and provide them later once the origination operation is included in the blockchain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.