Skip to content

Commit

Permalink
docs: update blobstream to SP1 version from Blobstream X (#1680)
Browse files Browse the repository at this point in the history
* docs: simplify deploy blobstream page

* docs: add suggestions from review

* docs: add note about ram

* feat: rename file

* docs: add audits

* docs: add back blobstream-x-deploy page

* docs: revert to blobstream-x-deploy for blobstream-x- doc

* docs: revert change of menu flow for now

* docs: refactor menu for sp1 at top

* docs: last updates for section MVP

* docs: add context

* docs: resolve feedback from review

* docs: add intro abuot Sp1

* Update developers/blobstream.md

Co-authored-by: CHAMI Rachid <[email protected]>

* Update developers/blobstream.md

Co-authored-by: CHAMI Rachid <[email protected]>

* docs: add suggestions

* docs: update to SP1 docs (#1700)

* docs: update to SP1 docs

* chore: correct code groups

* chore: correct code groups

* chore: correct code groups

* chore: add bindings links

* chore: nits

* chore: nits

---------

Co-authored-by: CHAMI Rachid <[email protected]>
  • Loading branch information
jcstein and rach-id authored Sep 10, 2024
1 parent 4e4c010 commit c37c3af
Show file tree
Hide file tree
Showing 8 changed files with 328 additions and 143 deletions.
82 changes: 61 additions & 21 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -721,45 +721,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

0 comments on commit c37c3af

Please sign in to comment.