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

ADR 0001: Multiple Roots Under the Tendermint Application Hash #3136

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

kostko
Copy link
Member

@kostko kostko commented Jul 28, 2020

Currently the Tendermint ABCI application hash is equal to the consensus state
root for a specific height. In order to allow additional uses, like proving to
light clients that specific events have been emitted in a block, we should make
the application hash be derivable from potentially different kinds of roots.

@kostko kostko added the c:docs/adr Category: documentation/ADR label Jul 28, 2020
@kostko kostko force-pushed the kostko/docs/adr-app-hash-roots branch 2 times, most recently from 7259de8 to f37604e Compare July 28, 2020 11:43
@kostko kostko marked this pull request as ready for review July 28, 2020 15:25
@bennetyee
Copy link
Contributor

Just to verify / make clear: from a crypto/security viewpoint, the Root_i values -- inputs to H -- are all public values, and we are not concerned that a replacement/tweaked AppHash value could be created by an adversary, since the messages that will contain the legitimate AppHash value will be separatedly signed/verified etc, correct? This is to cryptographically compress many root values into a single hash value-sized field.

@kostko
Copy link
Member Author

kostko commented Jul 28, 2020

Just to verify / make clear: from a crypto/security viewpoint, the Root_i values -- inputs to H -- are all public values, and we are not concerned that a replacement/tweaked AppHash value could be created by an adversary, since the messages that will contain the legitimate AppHash value will be separatedly signed/verified etc, correct? This is to cryptographically compress many root values into a single hash value-sized field.

That's right, so the full trust chain goes like this:

  • Light client verification ensures we have a trusted Tendermint header by checking the validator signatures from some known-trusted point in time.
  • The (verified) Tendermint header contains an AppHash.
  • The (verified) AppHash can be used to verify that UntrustedStateRoot (and other roots) provided by the node are valid.
  • Merkle tree proofs are then used to prove that specific items/keys are contained under the given (verified) root.

So yeah, it's just to compress many root values into a single hash as that is what Tendermint ABCI expects. If we had control over that, we could also just put all the different roots directly in the Tendermint block header.

@kostko kostko force-pushed the kostko/docs/adr-app-hash-roots branch from f37604e to 6361532 Compare July 29, 2020 07:29
@kostko kostko force-pushed the kostko/docs/adr-app-hash-roots branch from 6361532 to e3dfb30 Compare July 31, 2020 10:04
Currently the Tendermint ABCI application hash is equal to the consensus state
root for a specific height. In order to allow additional uses, like proving to
light clients that specific events have been emitted in a block, we should make
the application hash be derivable from potentially different kinds of roots.
@kostko kostko force-pushed the kostko/docs/adr-app-hash-roots branch from e3dfb30 to 8efaa23 Compare July 31, 2020 10:06
@kostko kostko merged commit fc178e4 into master Jul 31, 2020
@kostko kostko deleted the kostko/docs/adr-app-hash-roots branch July 31, 2020 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:docs/adr Category: documentation/ADR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants