This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
Consensus upgrade to objectively limit nested structures in WASM #6104
Labels
CONSENSUS
Introduces a change that may modify consensus protocol rules on an existing blockchain.
Background
PR #4036 introduced a subjective mitigation which modified WASM validation code to restrict the depth of nested structures to 1024. However, this restriction is only enforced during block production.
Consensus upgrade feature
The goal of this consensus upgrade feature is to make the subjective change of #4036 objective.
A new consensus protocol upgrade feature will be added to trigger the changes described in this consensus upgrade proposal. The actual digest for the feature understood at the blockchain level is to be determined. For the purposes of this proposal the codename
WASM_NESTED_STRUCTURES
will be use to stand-in for whatever the feature identifier will actually end up being.The only change required is to modify the constructor of
eosio::chain::wasm_validations::wasm_binary_validation
to ensurenested_validator::init
is called with thefalse
boolean afterWASM_NESTED_STRUCTURES
is activated.So prior to
WASM_NESTED_STRUCTURES
activation, the constructor maintains its current behavior of callingnested_validator::init
withfalse
when producing a block andtrue
when not producing a block so that the subjective mitigation remains in place all the way up toWASM_NESTED_STRUCTURES
activation.After
WASM_NESTED_STRUCTURES
activation, the constructor always callsnested_validator::init
withfalse
.The text was updated successfully, but these errors were encountered: