Skip to content
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

Closed
arhag opened this issue Oct 22, 2018 · 2 comments
Closed

Consensus upgrade to objectively limit nested structures in WASM #6104

arhag opened this issue Oct 22, 2018 · 2 comments
Labels
CONSENSUS Introduces a change that may modify consensus protocol rules on an existing blockchain.

Comments

@arhag
Copy link
Contributor

arhag commented Oct 22, 2018

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 ensure nested_validator::init is called with the false boolean after WASM_NESTED_STRUCTURES is activated.

So prior to WASM_NESTED_STRUCTURES activation, the constructor maintains its current behavior of calling nested_validator::init with false when producing a block and true when not producing a block so that the subjective mitigation remains in place all the way up to WASM_NESTED_STRUCTURES activation.

After WASM_NESTED_STRUCTURES activation, the constructor always calls nested_validator::init with false.

@arhag
Copy link
Contributor Author

arhag commented Dec 7, 2018

This issue depends on #6429. It will also be setup by default to be a protocol feature requiring pre-activation, thus it also depends on #6431.

@arhag arhag added CONSENSUS Introduces a change that may modify consensus protocol rules on an existing blockchain. and removed HARDFORK labels Mar 22, 2019
@aclark-b1
Copy link

In order to focus our efforts on issues that are currently creating difficulty for the community we are closing tickets that were created prior to the EOSIO 2.0 release. If you believe this issue is still relevant please feel free to reopen it or create a new one. Thank you for your continued support of EOSIO!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CONSENSUS Introduces a change that may modify consensus protocol rules on an existing blockchain.
Projects
None yet
Development

No branches or pull requests

2 participants