-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wasm Serialization check seems to use hardcoded default instead of configurable value #1660
Comments
Did you activate |
Ah, that would explain it then. After activating the feature, I was able to deploy the contract, presumably because the max section elements is now effectively 8192 as reported via the get consensus_parameters API. Thanks! |
Since this protocol feature is activated on most chains, this one mostly affects folks spinning up test chains. The most direct path is probably to simply not include |
[4.0] Only return wasm config settings if configurable wasm limits enabled
[4.0 -> 5.0] Only return wasm config settings if configurable wasm limits enabled
[5.0 -> main] Only return wasm config settings if configurable wasm limits enabled
As I was attempting to deploy a (rather) large contract with several include headers statements, I received the "Too many function defs" error message.
Here is where this check is evaluated from what I can tell :
leap/libraries/wasm-jit/Source/WASM/WASMSerialization.cpp
Line 615 in 01b128e
And this points to a constexpr set to 1024 :
leap/libraries/chain/include/eosio/chain/wasm_eosio_constraints.hpp
Line 14 in 01b128e
However, the wasm_parameters struct and the "cleos get consensus_parameters" indicate "max_section_elements": 8192.
I wonder if this is a leftover artefact due to an oversight, and should indeed be checking the wasm_parameters config instead of the hardcoded limit.
The text was updated successfully, but these errors were encountered: