Block History

The most fundamental piece of proving facts with Relic Protocol is the Block History. This is best considered not as a particular smart contract, but rather as a simple interface that Relic implements and is used by other Relic contracts. While the Block History is not something that developers can interact with directly, it is a vital piece of Relic Protocol’s architecture.

Background

Ethereum state proofs are all based on Ethereum block headers. Using these block headers, one can then use Merkle-Patricia Trie proofs or other techniques to cryptographically prove any information that the Ethereum chain knows about.

Ethereum itself provides a way to verify the state of past Ethereum block headers: the Keccak hash of the previous block is stored in the block header of the current block, forming a block chain! While this is a simple property which makes it possible to verify block headers, this does not work well when one wishes to access an old block header. To verify that, one needs to gather every block header between the current block and the desired block, then perform the Keccak hash of each block along the way, and verify the block chain property holds.

Performing this operation is not possible on Ethereum, given the large amount of data that would need to be put on-chain to contain every block header. However, we can use ZK-SNARKs to do this operation off-chain and verify it was done correctly efficiently. More details about this process can be found in the zk-SNARKs page.

This operation requires the Relic Protocol maintainers to maintain a server working constantly off chain to construct the proofs, and to submit the generated proofs periodically on-chain. These proofs can be found in the Relic Explorer.

Using Block History

As a developer, the Block History is never used directly. That is primarily because Relic Protocol may update the Block History provider over time, due to improvements in efficiency, security, or features. Additionally, the Block History providers usually restrict access to the Reliquary to prevent misuse.

Instead, Relic provers use the Block History as needed to ensure the provenance of the data they use to prove things about Ethereum state. If your application needs to access historic Ethereum block headers, Relic Protocol provides the BlockHeaderProver which can be used.