-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Toggle VoteExtensions using a consensus parameter #8453
Comments
This makes sense to me. I like the idea of specifying a height instead of using a boolean value - it definitely seems clearer and more robust. |
Just so I understand fully, looking at the type ConsensusParams struct {
VoteExtensions VoteExtensionsParams
// ... existing fields
}
type VoteExtensionsParams struct {
InitialHeight int64
} If so, do you anticipate that we'd potentially add more vote extensions-related consensus parameters later? If not I'd advocate for something a little more generic, like |
Thanks @williambanfield for this proposal. It seems sound to me.
Steps 3) and 4) can be carried out in parallel. Let me know what you think |
One last thought: Should Tendermint "automatically" set |
We could certainly do that, but given some of the subtleties associated with using vote extensions my intuition is we might be better off making this an explicit opt-in even for new chains. |
Both ways seem reasonable to me. No strong opinion on either at this time. |
Either name is probably fine. I can't predict if we'll have more vote extension parameters so it's hard to say. My only qualm with the |
@sergio-mena I'm happy to take on the steps outlined above, although I would strongly prefer to wait until the work is completed in those PRs. I find it confusing to review PRs that expand in scope and change while they are open since you need to simultaneously track what all of the changes the PR are trying to do and what the changes are that match that, usually with some cleanups sprinkled in. For me, that usually becomes too expansive to fit into my head, so I'd prefer to make the changes in serial. |
I was thinking more of it as ABCI(++)-related consensus params, since they'd be embedded in the |
So in this regard, what if application developers want to roll back enabling vote extensions, or make them optional within the application itself? I suppose as a fallback the application itself could just ignore and not generate vote extensions if it wants, and we'd continue to just sign empty vote extensions once they're enabled. |
Yes, this the way I see it: once extensions are activated, the app can choose to ignore the feature altogether by always extending with empty byte arrays. And that's what it'll see at |
…re height (#8547) This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
This pull requests adds the protocol buffer field for the `ABCI.VoteExtensionsEnableHeight` parameter. This proto field is threaded throughout all of the relevant places where consensus params are used and referenced. This PR also adds validation of the consensus param updates. Previous consensus param changes didn't depend on _previous_ versions of the params, so this change adds a method for validating against the old params as well. closes: #8453
…re height (#8547) This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
This pull requests adds the protocol buffer field for the `ABCI.VoteExtensionsEnableHeight` parameter. This proto field is threaded throughout all of the relevant places where consensus params are used and referenced. This PR also adds validation of the consensus param updates. Previous consensus param changes didn't depend on _previous_ versions of the params, so this change adds a method for validating against the old params as well. closes: #8453
…re height (#8547) This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
This pull requests adds the protocol buffer field for the `ABCI.VoteExtensionsEnableHeight` parameter. This proto field is threaded throughout all of the relevant places where consensus params are used and referenced. This PR also adds validation of the consensus param updates. Previous consensus param changes didn't depend on _previous_ versions of the params, so this change adds a method for validating against the old params as well. closes: #8453
… extension require height (#8547) This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
…#8587) This pull requests adds the protocol buffer field for the `ABCI.VoteExtensionsEnableHeight` parameter. This proto field is threaded throughout all of the relevant places where consensus params are used and referenced. This PR also adds validation of the consensus param updates. Previous consensus param changes didn't depend on _previous_ versions of the params, so this change adds a method for validating against the old params as well. closes: #8453
… extension require height (#8547) This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
…9862) * [cherry-picked] abci++: add consensus parameter logic to control vote extension require height (#8547) This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453 * Fix UTs * fix blocksync reactor import of state store * fixes1 * fixed_more_UTs * Fix TestHandshakeReplaySome * Fix all unit tests * Added hunk in original commit Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com> Co-authored-by: Callum Waters <cmwaters19@gmail.com>
…#8587) This pull requests adds the protocol buffer field for the `ABCI.VoteExtensionsEnableHeight` parameter. This proto field is threaded throughout all of the relevant places where consensus params are used and referenced. This PR also adds validation of the consensus param updates. Previous consensus param changes didn't depend on _previous_ versions of the params, so this change adds a method for validating against the old params as well. closes: #8453
* [cherry-picked] abci++: add proto fields for enabling vote extensions (#8587) This pull requests adds the protocol buffer field for the `ABCI.VoteExtensionsEnableHeight` parameter. This proto field is threaded throughout all of the relevant places where consensus params are used and referenced. This PR also adds validation of the consensus param updates. Previous consensus param changes didn't depend on _previous_ versions of the params, so this change adds a method for validating against the old params as well. closes: #8453 * Re-sync some things with original patch * fixes * Remove 'Skip' from TestApp_VoteExtensions * Fix all unit tests * Appease linter * Update types/params.go Co-authored-by: Thane Thomson <connect@thanethomson.com> Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com> Co-authored-by: Thane Thomson <connect@thanethomson.com>
As of v0.36 VoteExtensions are set to be required by Tendermint. This poses a challenge to validators wishing to upgrade to v0.36 without performing a hardfork upgrade.
Validators running previous versions of Tendermint that update to v0.36 will not be able to propose blocks during the first height if vote extensions are required. This is because the previous height was completed without them and so Tendermint will not be able to deliver vote extension data to the application. For more information on this problem, see RFC-009.
To allow a smooth transition from previous versions of Tendermint to v0.36, I propose creating a consensus parameter nominally called
VoteExtensions.InitialHeight
. The default value of this field will be 0. When set to 0, vote extensions will not be required in any capacity. This will allow new validators that come up without extension data to not error. Chains will then be able to set this to a specific height after successfully running and collecting vote extensions.Why A Height?
Whatever mechanism for enabling this system needs to save the initial height the feature is enabled. If VoteExtensions are enabled at height
H
, then validators will attempt to use the data from heightH-1
as the vote extension data. That data is not guaranteed to exist because the network wasn't validating the existence of the extension data.If we us a height then we can ensure that the correct behavior is enforced. The height that the parameter is set to,
H
, will be the first height that votes will be validated for the presence of vote extension data. The following height,H+1
, will be the first height that the proposal creation logic will require vote extension data.Effect of the variable on consensus
When Set to A Value,
H
, Greater Than 0H
, vote extension data not checked for in any logic.H
, vote extension data is required on incoming votes but not required to be delivered to the application.H
, vote extension data is required on incoming votes and is required to be delivered to the application.When Set to 0
Should chains be disable vote extensions after beginning their use?
Vote extension data is a new feature and somewhat experimental. Applications that encounter issue with the technology may wish to disable it while further debugging and diagnosing the problems they encounter.
However, from the use cases that have been proposed thus far, vote extensions are a pivotal piece of applications. For applications taking advantage of threshold decryption and oracle data for pricing, this is a pretty central piece of their design and execution. If they disable the feature, they will also need to fundamentally alter their application. It therefore seems safe to make vote extensions required after being enabled.
The text was updated successfully, but these errors were encountered: