Repository navigation
new chain_config param: action return value limit - #9451
Conversation
| * - forwards compatible with versions 2 and 3 | ||
| * - kv database | ||
| * - Configurable wasm limits | ||
| * 5: Updated for v4.0.0 protocol features: |
There was a problem hiding this comment.
I think these are supposed to reference the eosio release number, so this (and the comment above it) is not accurate. These would be v2.1.0 features.
| #define MAX_NUM_ARRAY_ELEMENTS (1024*1024) | ||
| #define MAX_SIZE_OF_BYTE_ARRAYS (20*1024*1024) | ||
|
|
||
| static_assert(MAX_SIZE_OF_BYTE_ARRAYS == 20*1024*1024, "Changing MAX_SIZE_OF_BYTE_ARRAYS breaks consensus. Make sure this is expected"); |
There was a problem hiding this comment.
This will need to be ported to the fc repo as well
There was a problem hiding this comment.
I don't think this belongs in fc when fc is a separate repo. Someone might be using fc for something completely different. I think we should move this static_assert into libraries/chain/include/eosio/chain/config.hpp
| //initial requirements were to skip packing field if it is not activated. | ||
| //this approach allows to spam this function with big buffer so changing this behavior |
There was a problem hiding this comment.
Actually, skipping entries was wrong
- The contract has no way to know that the value was skipped and is likely to behave incorrectly.
- When the protocol feature is not activated, the old version of nodeos that doesn't know about the entry MUST behave the same as the new version of nodeos that does. Skipping known but unactivated entries violates this.
There was a problem hiding this comment.
@swatanabe-b1 do you propose to remove the requirement for skipping/throwing exception in get_parameters_packed ? so inactive config should be presented regardless activation status
There was a problem hiding this comment.
I'm not suggesting any functional changes. The comment indicates that this change is an optimization. I'm saying that it's also necessary for correctness. I think throwing an exception is the correct behavior for inactive config entries.
There was a problem hiding this comment.
Is this used anywhere? If it's defined here it won't be instantiated if it's used in another translation unit.
There was a problem hiding this comment.
Add an additional comment: do not add more to this list; doing so will break chain_config_v1
There was a problem hiding this comment.
Never mind. It's already implied by the v0/v1 inheritance.
|
ship changes and rodeos changes look correct |
f506660 to
8328fb9
Compare
8328fb9 to
c17ed2e
Compare
Change Description
Consensus change.
Currently action return values are limited only by CPU and max wasm memory which is 20MB.
We need to provide node operators a way to prevent users from filling their SHiP logs with noise.
This change includes following changes:
max_action_return_value_sizetochain_config. default value is 256 bytes.this config value is used in
set_action_return_valuehost function:wql-max-action-return-valuecommand line option to rodeos with default value of 20MB.it is used in
set_action_return_valuefromrodeos/callbacks/action.hppChange Type
Select ONE
Consensus Changes
API Changes
Documentation Additions