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

docs: update blobstream to SP1 version from Blobstream X #1680

Merged
merged 17 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 61 additions & 21 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,45 +717,85 @@ function sidebarHome() {
link: "/developers/blobstream-proof-queries",
},
{
text: "Example implementation of Blobstream proofs by CryptoKass",
link: "https://github.com/CryptoKass/blobstreamx-example",
},
{
text: "Local Blobstream X operators",
text: "SP1 Blobstream",
collapsed: true,
items: [
{
text: "Requesting data commitment ranges",
link: "/developers/blobstream-x-requesting-data-commitment-ranges",
text: "Local SP1 Blobstream operators",
collapsed: true,
items: [
{
text: "New SP1 Blobstream deployments",
link: "/developers/sp1-blobstream-deploy",
},
],
},
{
text: "New Blobstream X deployments",
link: "/developers/blobstream-x-deploy",
text: "SP1 Blobstream audits",
collapsed: true,
items: [
{
text: "Ottersec",
link: "https://docs.celestia.org/audits/SP1_Blobstream_Ottersec_Audit.pdf",
},
{
text: "SP1 Audits",
link: "https://github.com/succinctlabs/sp1/tree/dev/audits"
}
]
},
],
]
},
{
text: "Blobstream X audits",
text: "Blobstream X",
collapsed: true,
items: [
{
text: "Informal Systems",
link: "https://docs.celestia.org/audits/Blobstream_X-Informal_Systems_Audit.pdf",
text: "Overview of BlobstreamX",
link: "/developers/blobstreamx",
},
{
text: "OtterSec",
link: "https://docs.celestia.org/audits/Blobstream_X-OtterSec_Audit.pdf",
text: "Example implementation of Blobstream proofs by CryptoKass",
link: "https://github.com/CryptoKass/blobstreamx-example",
},
{
text: "Veridise",
link: "https://docs.celestia.org/audits/Blobstream_X-Veridise_Audit.pdf",
text: "Local Blobstream X operators",
collapsed: true,
items: [
{
text: "Requesting data commitment ranges",
link: "/developers/blobstream-x-requesting-data-commitment-ranges",
},
{
text: "New Blobstream X deployments",
link: "/developers/blobstream-x-deploy",
}
]
},
{
text: "Zellic",
link: "https://docs.celestia.org/audits/Blobstream_X-Zellic_Audit.pdf",
text: "Blobstream X audits",
collapsed: true,
items: [
{
text: "Informal Systems",
link: "https://docs.celestia.org/audits/Blobstream_X-Informal_Systems_Audit.pdf",
},
{
text: "OtterSec",
link: "https://docs.celestia.org/audits/Blobstream_X-OtterSec_Audit.pdf",
},
{
text: "Veridise",
link: "https://docs.celestia.org/audits/Blobstream_X-Veridise_Audit.pdf",
},
{
text: "Zellic",
link: "https://docs.celestia.org/audits/Blobstream_X-Zellic_Audit.pdf",
}
],
}
],
}
]
},
],
},
{
Expand Down
25 changes: 13 additions & 12 deletions developers/blobstream-contracts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
sidebar_label: Integrate with Blobstream contracts
description: Learn how to integrate your L2's onchain logic with Blobstream
prev:
text: "New SP1 Blobstream deployments"
link: "/developers/sp1-blobstream-deploy"
---

# Integrate with Blobstream contracts
Expand All @@ -13,15 +16,14 @@ Make sure to have the following installed:

- [Foundry](https://github.com/foundry-rs/foundry)

### Installing Blobstream X contracts
### Installing Blobstream contracts

We will be using the Blobstream X implementation of
Blobstream, so we can install its repo as a dependency:

Install the Blobstream X contracts repo as a dependency:
We will be using the [`IDAOracle`](https://github.com/celestiaorg/blobstream-contracts/blob/master/src/IDAOracle.sol)
interface to verify inclusion.
So, we will install the Blobstream contracts repo as a dependency:

```sh
forge install succinctlabs/blobstreamx --no-commit
forge install celestiaorg/blobstream-contracts --no-commit
```

Make sure that the directory you're running this command
Expand All @@ -44,30 +46,29 @@ Example minimal Solidity contract for a stub ZK rollup that leverages the
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.19;

TBD
import "blobstream-contracts/IDAOracle.sol";
import "blobstream-contracts/DataRootTuple.sol";
import "blobstream-contracts/lib/tree/binary/BinaryMerkleProof.sol";

contract MyRollup {
IDAOracle immutable blobstreamX;
IDAOracle immutable blobstream;
bytes32[] public rollup_block_hashes;

constructor(IDAOracle _blobstreamX) {
blobstreamX = _blobstreamX;
constructor(IDAOracle _blobstream) {
blobstream = _blobstream;
}

function submitRollupBlock(
bytes32 _rollup_block_hash,
bytes calldata _zk_proof,
uint256 _blobstreamX_nonce,
uint256 _blobstream_nonce,
DataRootTuple calldata _tuple,
BinaryMerkleProof calldata _proof
) public {
// Verify that the data root tuple (analog. block header) has been
// attested to by the Blobstream contract.
require(
blobstreamX.verifyAttestation(_blobstreamX_nonce, _tuple, _proof)
blobstream.verifyAttestation(_blobstream_nonce, _tuple, _proof)
);

// Verify the ZKP (zero-knowledge proof).
Expand Down
2 changes: 1 addition & 1 deletion developers/blobstream-offchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Rollups can use Blobstream for DA by posting their data to Celestia and then
proving that it was posted on Ethereum. This is done identically to how any
rollup or user would post data to Celestia. Then, a zero-knowledge proof that
Celestia validators have come to consensus on Celestia block headers is
generated, and subsequently relayed to Ethereum to the Blobstream X smart
generated, and subsequently relayed to Ethereum to the Blobstream smart
contract.

This demo rollup will outline (the outline is not an
Expand Down
Loading
Loading