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

feat(docs-site,eventindexer,relayer,taiko-client): migrate all swagger apis to docs-site #17147

Closed
wants to merge 1 commit into from
Closed
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
35 changes: 0 additions & 35 deletions .github/workflows/blobstorage-preview.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/blobstorage-production.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/taiko-client-proverapi-preview.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/taiko-client-proverapi-production.yml

This file was deleted.

42 changes: 37 additions & 5 deletions packages/docs-site/astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import starlightLinksValidator from "starlight-links-validator";
import starlightOpenAPI, { openAPISidebarGroups } from "starlight-openapi";

// https://astro.build/config
export default defineConfig({
Expand All @@ -13,7 +14,38 @@ export default defineConfig({
},
integrations: [
starlight({
plugins: [starlightLinksValidator()],
plugins: [
starlightLinksValidator({
exclude: [
// "/api-reference/blob-storage",
"/api-reference/bridge-relayer",
"/api-reference/event-indexer",
"/api-reference/prover-server",
],
}),
starlightOpenAPI([
// {
// base: "api-reference/blob-storage",
// label: "Blob Storage API",
// schema: "../blobstorage/docs/swagger.yaml",
// },
{
base: "api-reference/bridge-relayer",
label: "Bridge Relayer API",
schema: "../relayer/docs/swagger.yaml",
},
{
base: "api-reference/event-indexer",
label: "Event Indexer API",
schema: "../eventindexer/docs/swagger.yaml",
},
{
base: "api-reference/prover-server",
label: "Prover Server API",
schema: "../taiko-client/docs/swagger.yaml",
},
]),
],
components: {
SiteTitle: "./src/components/starlight/SiteTitle.astro",
Head: "./src/components/starlight/Head.astro",
Expand Down Expand Up @@ -115,14 +147,14 @@ export default defineConfig({
},
],
},
{
label: "API Reference",
autogenerate: { directory: "api-reference" },
},
{
label: "Resources",
autogenerate: { directory: "resources" },
},
{
label: "API Reference",
items: openAPISidebarGroups,
},
],
}),
],
Expand Down
9 changes: 5 additions & 4 deletions packages/docs-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
"dependencies": {
"@astrojs/check": "^0.6.0",
"@astrojs/starlight": "^0.22.2",
"astro": "^4.7.1",
"astro-og-canvas": "^0.4.2",
"astro": "^4.8.3",
"astro-og-canvas": "^0.5.0",
"canvaskit-wasm": "^0.39.1",
"sharp": "^0.33.3",
"starlight-links-validator": "^0.6.0",
"typescript": "^5.4.3"
"starlight-links-validator": "^0.8.0",
"starlight-openapi": "^0.6.3",
"typescript": "^5.4.5"
}
}
2 changes: 1 addition & 1 deletion packages/docs-site/src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const collections = {
extend: z.object({
description: z
.string()
.max(160, { message: "Must be 160 characters or less." }),
.max(160, { message: "Must be 160 characters or less." }).optional(),
}),
}),
}),
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

20 changes: 20 additions & 0 deletions packages/docs-site/src/content/docs/core-concepts/taiko-nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,23 @@ If the proposed block has a **valid** or **invalid** `txList`, the `prover`:

1. Generates a Merkle proof of the block's `TaikoL2.anchor` transaction to prove its existence in the `block.txRoot`'s [MPT](https://ethereum.org/en/developers/docs/data-structures-and-encoding/patricia-merkle-trie/) and this transaction receipt's [Merkle proof](https://rollup-glossary.vercel.app/other-terms#merkle-proofs) in the `block.receiptRoot`'s MPT from the L2 execution engine.
2. Submits the `TaikoL2.anchor` transaction's RLP encoded bytes, its receipt's RLP encoded bytes, the generated Merkle proofs, and a validity proof to prove this block **valid** by sending a `TaikoL1.proveBlock` transaction (the block is valid even for an invalid `txList` because we prove the invalid `txList` maps to an empty block with only the anchor transaction).

## Taiko Node API

Using a Taiko node should feel the same as using any other L1 node, because we essentially re-use the L1 client and make a few backwards-compatible modifications. You can first read about the architecture of Taiko nodes [here](/core-concepts/taiko-nodes).

### Differences from a Geth client

View the fork diff page to see the minimal set of changes made to Geth [here](https://geth.taiko.xyz).

### Execution JSON-RPC API

Check out the execution client spec [here](https://ethereum.github.io/execution-apis/api-documentation/).

### Engine API

Check out the engine API spec [here](https://github.com/ethereum/execution-apis/blob/main/src/engine/common.md).

### Hive test harness

If a Taiko node should feel the same as using any other L1 node, it should surely be able to pass the [hive e2e test harness](https://github.com/ethereum/hive). At the time of writing, the hive tests are actually one of the best references for what the API of an Ethereum node actually is.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Taiko is a **fully open source, permissionless, Ethereum-equivalent ZK-Rollup**.

### Non-critical backend infrastructure

- [Event indexer](/api-reference/event-indexer-api)
- [Bridge relayer](/api-reference/bridge-relayer-api)
- [Event indexer](/api-reference/event-indexer)
- [Bridge relayer](/api-reference/bridge-relayer)
- [P2P bootstrapping nodes](/network-reference/addresses#taiko-labs-bootnode-addresses)
- [Taiko Labs' proposers and provers](/network-reference/addresses)

Expand Down
5 changes: 1 addition & 4 deletions packages/docs-site/src/pages/og/[...slug].ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ export const { getStaticPaths, GET } = OGImageRoute({
getImageOptions: (_path, page: (typeof pages)[number]) => {
return {
title: page.data.title,
description: page.data.description,
description: page.data.description ?? "",
logo: {
path: "./src/assets/taiko-og-logo.png",
},
// bgImage: {
// path: "./src/assets/taiko-og-bg.png",
// },
bgGradient: [
[15, 2, 15],
[58, 12, 36],
Expand Down
Loading
Loading