forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[types] Verify accumulator consistency proofs in trusted state
This diff modifies the `TrustedState` to support verifying accumulator consistency proofs. Now when verifying state proofs, we will correctly verify the consistency proof up to the last verifiable ledger info. In order to verify a consistency proof, the trusted state needs to keep track of a verified transaction accumulator summary; ratcheting a state proof will also move the accumulator summary forward to the newly trusted state. When verifying from a waypoint, we haven't yet built an accumulator summary. `verify_and_ratchet` now also takes an optional, untrusted `initial_accumulator`, which the trusted state will verify and use when it does not yet have an accumulator summary built up. One consequence of verifying the consistency proofs is that we can no longer verify a state proof with a newer latest li but a partially trusted/verified prefix of epoch changes, since consistency proofs can only be verified from the exact accumulator summary at their starting version. This means users like the verifying client must verify_and_ratchet from the trusted state they had at the start of their request rather than reading the current trusted state when they verify the response. This diff also adds support for verifying the initializing the accumulator and verifying consistency proofs to the verifying client.
- Loading branch information
1 parent
be224f8
commit 647c6d0
Showing
13 changed files
with
664 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.