You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.3 KiB

  1. # ADR 018: ABCI Validator Improvements
  2. ## Changelog
  3. 05-08-2018: Initial draft
  4. ## Context
  5. ADR 009 introduced major improvements to the ABCI around validators and the use
  6. of Amino. Here we follow up with some additional changes to improve the naming
  7. and expected use of Validator messages.
  8. We also fix how we communicate the commit round - there is no defined commit
  9. round, as validators can commit the same block in different rounds, so we
  10. should communicate the round each validator committed in.
  11. ## Decision
  12. ### Validator
  13. Currently a Validator contains address and `pub_key`, and one or the other is
  14. optional/not-sent depending on the use case. Instead, we should have a
  15. Validator (with just the address) and a ValidatorUpdate (with the pubkey):
  16. ```
  17. message Validator {
  18. bytes address
  19. int64 power
  20. }
  21. message ValidatorUpdate {
  22. PubKey pub_key
  23. int64 power
  24. }
  25. ```
  26. ### RequestBeginBlock
  27. LastCommitInfo currently has an array of `SigningValidator` that contains
  28. information for each validator in the entire validator set.
  29. Instead, this should be called `VoteInfo`, since it is information about the
  30. validator votes.
  31. Additionally, we have a single CommitRound in the LastCommitInfo,
  32. but such a round does not exist. Instead, we
  33. should include the round associated with each commit vote:
  34. ```
  35. message LastCommitInfo {
  36. repeated VoteInfo commit_votes
  37. }
  38. message VoteInfo {
  39. Validator validator
  40. bool signed_last_block
  41. int64 round
  42. }
  43. ```
  44. ### ResponseEndBlock
  45. Use ValidatorUpdates instead of Validators. Then it's clear we don't need an
  46. address, and we do need a pubkey.
  47. ### InitChain
  48. Use ValidatorUpdates for both Request and Response. InitChain
  49. is about setting/updating the initial validator set, unlike BeginBlock
  50. which is just informational.
  51. ## Status
  52. Proposal.
  53. ## Consequences
  54. ### Positive
  55. - Easier for developers to build on and understand the ABCI
  56. - Apps get more information about the votes (ie. the round they're from)
  57. ### Negative
  58. - There are two validator types
  59. ### Neutral
  60. -
  61. ## References
  62. - [Latest ABCI Spec](https://github.com/tendermint/tendermint/blob/v0.22.8/docs/app-dev/abci-spec.md)
  63. - [ADR-009](https://github.com/tendermint/tendermint/blob/v0.22.8/docs/architecture/adr-009-ABCI-design.md)
  64. - [Issue #1712 - Don't send PubKey in
  65. RequestBeginBlock](https://github.com/tendermint/tendermint/issues/1712)