max_operation_data_length: local limit used instead of the one set onchain
The origination of a (Love) contract on mainnet with dune-client fails with an error:
<<<<14: 500 Internal Server Error
[ { "kind": "permanent", "id": "node.prevalidation.oversized_operation",
"size": 36973, "max_size": 16384 } ]
Oversized operation (size: 36973, max: 16384)
However, DunScan (https://dunscan.io/constants?level=335873) indicates that the value of the max_operation_data_length
constant is 49152
. The limit before the latest minor upgrade was indeed 16384 (https://dunscan.io/constants?level=217089).
This new limit has been set via a Dune manager operation: https://dunscan.io/oo9CRLWm84qviaoQAh69Y9nQ1f1pLjLBbGCpfwKHbB2U5U2RXCB ({"max_operation_data_length":49152,"protocol_revision":4}
)
However, in the src/lib_config/set_config_mainnet.ml
file, the limit is still set to 16384
, which explains my error above:
Solutions:
- update the constant in the file above, or
- modify the client/node so that the constants defined by the protocol override the ones defined in the config file
In both cases, a protocol/network upgrade may be needed