Skip to content

Commit

Permalink
feat(docs-site): enhance some sections (#18850)
Browse files Browse the repository at this point in the history
Co-authored-by: Roger <[email protected]>
Co-authored-by: RogerLamTd <[email protected]>
  • Loading branch information
3 people authored Feb 5, 2025
1 parent 02ae1cf commit 61fff4e
Show file tree
Hide file tree
Showing 16 changed files with 1,355 additions and 413 deletions.
7 changes: 3 additions & 4 deletions packages/docs-site/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export default defineConfig({
label: "Start Here",
items: [
{ label: "Getting started", link: "/start-here/getting-started/" },
{ label: "Set up your wallet", link: "/start-here/set-up-your-wallet/", },
{ label: "Contributing", link: "/start-here/contributing/" },
{ label: "Getting support", link: "/start-here/getting-support" },
],
Expand Down Expand Up @@ -93,6 +94,8 @@ export default defineConfig({
{label: "TaikoL1 Contract", link: "/taiko-alethia-protocol/codebase-analysis/taikol1-contract"},
{label: "TaikoL2 Contract", link: "/taiko-alethia-protocol/codebase-analysis/taikol2-contract"},
{label: "SGXVerifier Contract", link: "/taiko-alethia-protocol/codebase-analysis/sgxverifier-contract"},
{label: "SignalService Contract", link: "/taiko-alethia-protocol/codebase-analysis/signalservice-contract"},
{label: "Bridge Contract", link: "/taiko-alethia-protocol/codebase-analysis/bridge-contract"},
],
},
{ label: "Block states", link: "/taiko-alethia-protocol/block-states" },
Expand All @@ -108,10 +111,6 @@ export default defineConfig({
label: "App Developers",
collapsed: true,
items: [
{
label: "Set up your wallet",
link: "/guides/app-developers/set-up-your-wallet/",
},
{
label: "Receive tokens",
link: "/guides/app-developers/receive-tokens/",
Expand Down
68 changes: 68 additions & 0 deletions packages/docs-site/src/assets/custom-icons.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
export const customIcons = {
custom: {
icons: {
'metamask-logo': {
body: `<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 204.8 192.4" style="enable-background:new 0 0 204.8 192.4;" xml:space="preserve">
<style type="text/css">
.st0{display:none;}
.st1{fill:#F5841F;}
.st2{fill:#E27625;}
.st3{fill:#D7C1B3;}
.st4{fill:#2F343B;}
.st5{fill:#CC6228;}
.st6{fill:#C0AD9E;}
.st7{fill:#763E1A;}
</style>
<g id="bg_x28_do_not_export_x29_" class="st0">
</g>
<g id="MM_Head_background__x28_Do_not_edit_x29_">
<g>
<path class="st1" d="M167.4,96.1l6.9-8.1l-3-2.2l4.8-4.4l-3.7-2.8l4.8-3.6l-3.1-2.4l5-24.4l-7.6-22.6 M171.5,25.6l-48.8,18.1l0,0
l0,0H82l0,0L33.2,25.6l0.3,0.2l-0.3-0.2l-7.6,22.6l5.1,24.4L27.5,75l4.9,3.6l-3.7,2.8l4.8,4.4l-3,2.2l6.9,8.1l-10.5,32.4h0l0,0
l9.7,33.1l34.1-9.4l0-0.1l0,0.1l0,0l0,0l0,0v0l0,0l0,0l0,0l6.6,5.4l13.5,9.2h23.1l13.5-9.2l6.6-5.4l0,0v0l0,0l0,0l34.2,9.4
l9.8-33.1l0,0h0l-10.6-32.4 M70.7,152.1L70.7,152.1L70.7,152.1"/>
</g>
</g>
<g id="Logos">
<g>
<polygon class="st2" points="171.5,25.6 111.6,69.7 122.7,43.7 "/>
<polygon class="st2" points="33.2,25.6 92.6,70.1 82,43.7 "/>
<polygon class="st2" points="150,127.9 134,152.1 168.2,161.5 178,128.4 "/>
<polygon class="st2" points="26.9,128.4 36.6,161.5 70.7,152.1 54.8,127.9 "/>
<polygon class="st2" points="68.9,86.9 59.4,101.2 93.2,102.7 92.1,66.5 "/>
<polygon class="st2" points="135.9,86.9 112.3,66.1 111.6,102.7 145.4,101.2 "/>
<polygon class="st2" points="70.7,152.1 91.2,142.3 73.5,128.7 "/>
<polygon class="st2" points="113.6,142.3 134,152.1 131.2,128.7 "/>
<polygon class="st3" points="134,152.1 113.6,142.3 115.3,155.5 115.1,161.1 "/>
<polygon class="st3" points="70.7,152.1 89.7,161.1 89.6,155.5 91.2,142.3 "/>
<polygon class="st4" points="90,119.9 73.1,115 85.1,109.5 "/>
<polygon class="st4" points="114.7,119.9 119.7,109.5 131.7,115 "/>
<polygon class="st5" points="70.7,152.1 73.7,127.9 54.8,128.4 "/>
<polygon class="st5" points="131.1,127.9 134,152.1 150,128.4 "/>
<polygon class="st5" points="145.4,101.2 111.6,102.7 114.7,119.9 119.7,109.5 131.7,115 "/>
<polygon class="st5" points="73.1,115 85.1,109.5 90,119.9 93.2,102.7 59.4,101.2 "/>
<polygon class="st2" points="59.4,101.2 73.5,128.7 73.1,115 "/>
<polygon class="st2" points="131.7,115 131.2,128.7 145.4,101.2 "/>
<polygon class="st2" points="93.2,102.7 90,119.9 94,140.3 94.9,113.5 "/>
<polygon class="st2" points="111.6,102.7 109.9,113.4 110.7,140.3 114.7,119.9 "/>
<polygon class="st1" points="114.7,119.9 110.7,140.3 113.6,142.3 131.2,128.7 131.7,115 "/>
<polygon class="st1" points="73.1,115 73.5,128.7 91.2,142.3 94,140.3 90,119.9 "/>
<polygon class="st6" points="115.1,161.1 115.3,155.5 113.7,154.2 91,154.2 89.6,155.5 89.7,161.1 70.7,152.1 77.3,157.5
90.8,166.8 113.9,166.8 127.4,157.5 134,152.1 "/>
<polygon class="st4" points="113.6,142.3 110.7,140.3 94,140.3 91.2,142.3 89.6,155.5 91,154.2 113.7,154.2 115.3,155.5 "/>
<polygon class="st7" points="174.1,72.6 179.1,48.2 171.5,25.6 113.6,68.2 135.9,86.9 167.4,96.1 174.3,88 171.3,85.8 176.1,81.5
172.4,78.6 177.2,75 "/>
<polygon class="st7" points="25.6,48.2 30.7,72.6 27.5,75 32.3,78.7 28.6,81.5 33.4,85.8 30.4,88 37.4,96.1 68.9,86.9 91.2,68.2
33.2,25.6 "/>
<polygon class="st1" points="167.4,96.1 135.9,86.9 145.4,101.2 131.2,128.7 150,128.4 178,128.4 "/>
<polygon class="st1" points="68.9,86.9 37.4,96.1 26.9,128.4 54.8,128.4 73.5,128.7 59.4,101.2 "/>
<polygon class="st1" points="111.6,102.7 113.6,68.2 122.7,43.7 82,43.7 91.2,68.2 93.2,102.7 94,113.5 94,140.3 110.7,140.3
110.8,113.5 "/>
</g>
</g>
</svg>`,
},
},
},
};
160 changes: 160 additions & 0 deletions packages/docs-site/src/components/NetworkAdder.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
---
import { customIcons } from '../assets/custom-icons';
interface Props {
network: 'mainnet' | 'testnet';
}
const { network } = Astro.props;
const chainName = network === 'mainnet' ? 'Taiko Alethia' : 'Taiko Hekla';
const metamaskIcon = customIcons.custom.icons['metamask-logo'].body;
---

<button
type="button"
class={`network-button ${network === 'mainnet' ? 'mainnet' : 'testnet'}`}
data-network={network}
>
<span class="metamask-icon" set:html={metamaskIcon} />
<span class="button-text">Add {chainName}</span>
</button>

<style>
.network-button {
display: inline-flex;
align-items: center;
gap: 1rem;
padding: 0.75rem 1.5rem;
border-radius: 3rem;
font-size: 1.125rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
min-width: 250px;
justify-content: center;
border: none;
margin: 0.5rem;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mainnet {
background-color: #bc007a;
color: white;
}

.testnet {
background-color: transparent;
color: #bc007a;
border: 2px solid #bc007a;
}

.network-button:hover {
transform: translateY(-1px);
}

.mainnet:hover {
background-color: #d4008a;
}

.testnet:hover {
background-color: rgba(188, 0, 122, 0.1);
}

.metamask-icon {
width: 1.5rem;
height: 1.5rem;
display: inline-flex;
align-items: center;
justify-content: center;
}

.metamask-icon :global(svg) {
width: 100%;
height: 100%;
}

.metamask-icon :global(svg path.st2),
.metamask-icon :global(svg path.st5) {
fill: currentColor;
}

.button-text {
margin-left: 0.25rem;
}

/* Dark mode adjustments */
:global(.dark) .testnet {
color: #f3b3d0;
border-color: #f3b3d0;
}

:global(.dark) .testnet:hover {
background-color: rgba(243, 179, 208, 0.1);
}
</style>

<script>
declare global {
interface Window {
ethereum: any;
}
}

const config = {
mainnet: {
chainId: '0x28c58',
chainName: 'Taiko Alethia',
rpcUrls: ['https://rpc.taiko.xyz'],
blockExplorerUrls: ['https://taikoscan.io/'],
},
testnet: {
chainId: '0x28c61',
chainName: 'Taiko Hekla',
rpcUrls: ['https://rpc.hekla.taiko.xyz'],
blockExplorerUrls: ['https://hekla.taikoscan.io/'],
}
};

function initializeNetworkButtons() {
const buttons = document.querySelectorAll('.network-button');

buttons.forEach(button => {
button.addEventListener('click', async () => {
const network = button.getAttribute('data-network') as 'mainnet' | 'testnet';
const networkConfig = config[network];

if (typeof window.ethereum === 'undefined') {
alert('No Ethereum wallet detected. Please install MetaMask or another Ethereum wallet.');
return;
}

try {
await window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [{
chainId: networkConfig.chainId,
chainName: networkConfig.chainName,
nativeCurrency: {
name: 'Ethereum',
symbol: 'ETH',
decimals: 18,
},
rpcUrls: networkConfig.rpcUrls,
blockExplorerUrls: networkConfig.blockExplorerUrls,
}],
});
} catch (error) {
console.error('Failed to add network:', error);
alert('Failed to add network. Please check your wallet and try again.');
}
});
});
}

// Initialize when the DOM is ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initializeNetworkButtons);
} else {
initializeNetworkButtons();
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,96 @@ title: What is Taiko Alethia?
description: Core concept page for "What is Taiko Alethia?".
---

Ethereum is too expensive. We believe in Ethereum's core properties (e.g., censorship-resistant, permissionless, secure). We also believe that rollups should **extend** (not augment) these properties.
Ethereum is **expensive** and **congested**. However, Ethereum's core principles—**censorship resistance, permissionless access, and robust security**—are **non-negotiable**. A true scaling solution must **extend** these properties without introducing trust assumptions, centralization, or trade-offs.

Taiko Alethia is a [based rollup](/core-concepts/based-rollups) which makes Ethereum cheaper while maintaining its properties:
## Introducing Taiko Alethia

- [Based contestable rollup](/core-concepts/contestable-rollup): A configurable rollup to reduce transaction fees on Ethereum.
- [Based booster rollup](/core-concepts/booster-rollups): An innovative approach to **native L1 scaling**.
Taiko Alethia is an **Ethereum-equivalent, permissionless, based rollup** designed to scale Ethereum without compromising its fundamental properties. Unlike traditional rollups that rely on centralized sequencers, Taiko Alethia leverages Ethereum itself for sequencing, ensuring that block ordering is decentralized and censorship-resistant.

Taiko Alethia is a **highly configurable, fully open source, permissionless (based), Ethereum-equivalent rollup**.
### Why Taiko Alethia?

It can be easily configured as a fully ZK rollup, optimistic rollup, or anything in between. There are no centralized actors that operate the network; all operations are permissionlessly run by the community.
- **Fully Ethereum-equivalent**: Runs an unmodified Ethereum execution layer, making it easy for developers to migrate smart contracts and tooling.
- **No centralized sequencer**: Ethereum L1 validators naturally order transactions in a decentralized way.
- **Multi-proof architecture**: Supports ZK proofs, Trusted Execution Environments (TEE), and Guardian proofs, making it more flexible than single-proof rollups.
- **Configurable proof system**: Can operate as a ZK-rollup, optimistic rollup, or hybrid, depending on security and performance trade-offs.
- **Decentralized proving & proposing**: Permissionless block proposing and proving, eliminating reliance on whitelisted actors.

## The Taiko Alethia protocol
### Key Concepts in Taiko Alethia

- **Taiko Alethia Protocol**: A set of smart contracts deployed on Ethereum that describe the Taiko Alethia protocol, a fully open-source scaling solution for Ethereum. In the most fundamental sense, this is what Taiko is. Even Taiko Alethia's governance is written into the protocol contracts.
- [Based rollup](/core-concepts/based-rollups): A rollup where Ethereum L1 validators sequence blocks, removing the need for a centralized sequencer.
- [Based contestable rollup](/core-concepts/contestable-rollup): A configurable, multi-proof rollup with hierarchical proving mechanisms to enhance security.
- [Based booster rollup](/core-concepts/booster-rollups): Native L1 scaling via Ethereum-equivalent L2.

## Organizations
## How Taiko Alethia Works

- **Taiko Community**: Social groups/accounts run by anyone interested, including Taiko Discord, Taiko Twitter, etc.
- **Taiko Labs**: Research & development group for the Taiko Alethia protocol.
- **Taiko Treasury**: Funded by income from the Taiko Alethia protocol (L2 EIP-1559 congestion MEV).
- **Taiko DAO (in progress)**: Governing body of Taiko Token (TAIKO) holders with voting rights over smart contract upgrades, network parameters, and more. Controls all aspects of the Taiko Alethia protocol smart contracts.
- **Taiko Foundation**: Stewards growth and development of the Taiko Alethia protocol and ecosystem. Works for the Taiko DAO and token holders, financing technical developments, ecosystem growth, partnerships, events, and more with full transparency.
- **Taiko Security Council**: Elected by the Taiko DAO to handle emergency actions. Ensures the safety of the Taiko Alethia protocol, implementing necessary upgrades or changes, and controls the Guardian Provers.
At its core, Taiko Alethia is a set of smart contracts deployed on Ethereum L1 that enforce execution rules, manage proofs, and facilitate rollup operations.

## Services operated by Taiko Labs
- **Proposing blocks**: Transactions are proposed permissionlessly by anyone following Ethereum’s sequencing rules.
- **Proving blocks**: Provers submit validity proofs (ZK, TEE, or Guardian) to confirm the correctness of proposed blocks.
- **Verification & contestation**: If a proof is contested, a higher-tier proof can be submitted to verify or dispute the original proof.

### Non-critical infrastructure
---

## Taiko Alethia Governance & Organizations

### Decentralized Organizations

Taiko Alethia operates as a fully decentralized protocol governed by **DAOs, community-run validators, and decentralized incentives**.

| Organization | Functionality |
| ---------------------------------------- | ---------------------------------------------------------------------------------------- |
| **Taiko Community** | Open social groups and discussions (Discord, Twitter, forums). |
| **Taiko Labs** | Research and development entity supporting the Taiko Alethia protocol. |
| **Taiko Treasury** | Collects fees from L2 congestion pricing and distributes funds for development. |
| **Taiko DAO (in progress)** | Governing body managing smart contract upgrades, network parameters, and protocol funds. |
| **Taiko Foundation** | Funds technical development, partnerships, and ecosystem growth. |
| **Taiko Security Council (in progress)** | Handles critical protocol security, Guardian Provers, and emergency network decisions. |

---

## Infrastructure Operated by Taiko Labs

Taiko Labs operates non-critical and critical infrastructure, but anyone can run these components due to Taiko’s open-source and permissionless nature.

:::note
Anyone can run these components, not just Taiko Labs. Yes you can sequence blocks on Taiko, host your own bridge using our [signal service](/taiko-alethia-protocol/bridging#the-signal-service), etc.
:::
### Non-Critical Infrastructure

These services are open-source, meaning anyone can replicate or improve them.

#### Frontends

- [Bridge UI](https://bridge.taiko.xyz)
- [Network status page](https://status.taiko.xyz)
- [Main homepage](https://taiko.xyz) + [this documentation site](https://docs.taiko.xyz)
- [Geth fork diff page](https://geth.taiko.xyz)
- [Bridge UI](https://bridge.taiko.xyz) → Interface for asset transfers between L1 & L2.
- [Network status](https://status.taiko.xyz) → Live updates on Taiko Alethia.
- [Homepage](https://taiko.xyz) → Official website and ecosystem.
- [Geth fork diff](https://geth.taiko.xyz) → Fork comparison for Ethereum-equivalence.

#### Backends

- [Event indexer](/api-reference/event-indexer)
- [Bridge relayer](/api-reference/bridge-relayer)
- [Taiko Alethia P2P bootstrapping nodes](/network-reference/alethia-addresses#taiko-labs-bootnode-addresses)
- [Event Indexer](/api-reference/event-indexer) → Tracks rollup transactions & events.
- [Bridge Relayer](/api-reference/bridge-relayer) → Facilitates trust-minimized bridging.
- [Taiko Alethia & Hekla P2P Bootstrapping Nodes](https://github.com/taikoxyz/simple-taiko-node/tree/v1.9.1) → Helps decentralized peers sync with the network. Found in their respective `.env.sample` files.
- [Taiko Alethia Taiko Labs' proposers and provers](/network-reference/alethia-addresses)
- [Taiko Hekla P2P bootstrapping nodes](/network-reference/hekla-addresses#taiko-labs-bootnode-addresses)
- [Taiko Hekla Taiko Labs' proposer and provers](/network-reference/hekla-addresses)

### Critical infrastructure
### Critical Infrastructure

:::caution
This is a vital concern for rollup users. The smart contracts are upgradeable via a multi-sig, which is a **trusted component** until handed over to the DAO. Please look at a third party source regarding any rollup's safety, such as [L2Beat](https://l2beat.com/scaling/projects/taiko).
:::
🚨 These components are trusted until full decentralization is achieved via the DAO. 🚨

- [Taiko Alethia contract owners (multi-sig)](/network-reference/alethia-addresses#contract-owners)
- [Taiko Alethia contract owners](/network-reference/alethia-addresses#contract-owners)
- [Taiko Hekla contract owners](/network-reference/hekla-addresses#contract-owners)

Taiko Alethia is actively **transitioning towards full decentralization**, following **Ethereum's rollup-centric roadmap**.

---

## Why Taiko Alethia is Superior to Traditional Rollups

| Feature | Traditional Rollups | Taiko Alethia |
| ------------------------------ | ------------------------------------ | -------------------------------------- |
| **Sequencing** | Centralized (single sequencer) | Decentralized (L1 validators sequence) |
| **Proof System** | Single proof type (ZK or Optimistic) | Multi-proof (ZK, TEE, Guardian) |
| **Censorship Resistance** | Operator can censor transactions | Permissionless transaction inclusion |
| **Smart Contract Equivalence** | Modified Ethereum (Geth changes) | 100% Ethereum-equivalent |
| **Decentralization** | Relies on multisig governance | DAO-controlled with open participation |

Taiko Alethia follows Ethereum’s decentralization ethos by ensuring L1 validators remain in control, minimizing trust assumptions, and maximizing rollup neutrality.

---
Loading

0 comments on commit 61fff4e

Please sign in to comment.