-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for catchup to use state proofs to validate new blocks. The main changes are: - The catchup service now has a state proof fetcher, whose job is to retrieve state proofs for rounds beyond the current ledger state. These state proofs are stored in an sqlite DB, since there might be many state proofs that we need to fetch. - The catchup service exposes a way to set trusted "renaissance" parameters for authenticating the initial state proofs, for cases when we can't use state proofs from the genesis block (like the situation we have on mainnet now). - The BlockService HTTP interface adds support for retrieving a state proof, and for getting a light block header proof instead of a cert when retrieving a block. - The catchup service uses state proofs, if possible, to authenticate new blocks, in lieu of agreement certificates. The catchup service is backwards-compatible: if it requests a state proof from the BlockService, but receives an agreement certificate instead (e.g., because the BlockService has not been upgraded with the above changes), the catchup service will validate the certificate instead. - The config file has additional fields to optionally specify the renaissance catchup parameters, to allow catchup to start validating state proofs from some (trusted through out-of-band channels) block. It may be a good idea, for performance, to pre-compute the state proofs and distribute them in a single file, rather than asking many relays to find the state proofs on-demand. This is not done yet, because it largely depends on how we would want to distribute these bundled state proofs. It should be reasonably straightforward to feed a bundle of state proofs into the stateProofFetcher.
- Loading branch information
Showing
25 changed files
with
1,668 additions
and
189 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
Oops, something went wrong.