Skip to content

Treat the validator updates from the application as an unordered set #3181

Closed
@ancazamfir

Description

@ancazamfir

When the application updates the validator set it calls updateValidators() with an 'updates' parameter, a list of changes that is then parsed in order, one entry at a time, making updates for the corresponding validator. i.e. the list is treated as a transaction list.
For example [add v1, rem v2, add v3] is different than [rem v2, add v1, add v3] and the call with one will produce different results than with the other.
This is an issue for gaia that requires these updates to be instead interpreted as a set.

Activity

changed the title Treat the updates from the application as an unordered set Treat the validator updates from the application as an unordered set on Jan 21, 2019
added
T:bugType Bug (Confirmed)
C:abciComponent: Application Blockchain Interface
on Jan 22, 2019
added this to the v0.30.0 milestone on Jan 22, 2019
kevlubkcm

kevlubkcm commented on Jan 22, 2019

@kevlubkcm
Contributor

sounds related to #3073

cwgoes

cwgoes commented on Jan 24, 2019

@cwgoes
Contributor

Proposal for atomic application:

  • First apply all updates to the validator set, without setting priorities. Track a list of addresses of newly added validators.
  • Calculate the total voting power of the new validator set.
  • Set the priorities of all newly added validators to -C * total voting power (presently C = 1.125).
  • Normalize priorities if necessary & subtract the average.

Also we should consider if we need C = 1.125 after this change.

ancazamfir

ancazamfir commented on Jan 24, 2019

@ancazamfir
ContributorAuthor

Proposal for atomic application:
First apply all updates to the validator set, without setting priorities. Track a list of addresses of newly added validators.

all updates except the validator removals

Calculate the total voting power of the new validator set.
Set the priorities of all newly added validators to -C * total voting power (presently C = 1.125).

do validator removals here

Normalize priorities if necessary & subtract the average.
Also we should consider if we need C = 1.125 after this change.

ancazamfir

ancazamfir commented on Jan 28, 2019

@ancazamfir
ContributorAuthor

pls. see pull request #3222

ancazamfir

ancazamfir commented on Feb 4, 2019

@ancazamfir
ContributorAuthor

Seems like NewValidatorSet(valList) does not check for duplicates in the validator list valList and we end up with a validator "set" including same validator multiple times. I'm not sure if all checks are in place when running in a real setup so valList does not contain duplicates. Will check.
This also needs fix it in validator_set.go

ebuchman

ebuchman commented on Feb 8, 2019

@ebuchman
Contributor

Merged! Thanks @ancazamfir ! Will add follow up notes to #3166

2 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C:abciComponent: Application Blockchain InterfaceC:consensusComponent: ConsensusT:breakingType: Breaking ChangeT:bugType Bug (Confirmed)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Treat the validator updates from the application as an unordered set · Issue #3181 · tendermint/tendermint