Skip to content

Commit 198cf6e

Browse files
committed
add missing files
1 parent 62058f5 commit 198cf6e

File tree

5 files changed

+205
-0
lines changed

5 files changed

+205
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: 'A gentle introduction'
3+
description: 'Learn the fundamentals of Nitro, Arbitrum stack.'
4+
author: petevielhaber
5+
sme: Mehdi
6+
user_story: As a current or prospective Arbitrum user, I need learn more about Nitros design.
7+
content_type: get-started
8+
---
9+
10+
A <a data-quicklook-from="state-transition-function">State Transition Function</a> (STF) determines how <a data-quicklook-from="blockchain">blockchain</a> systems change state when processing transactions. The STF takes the current blockchain state (account balances, <a data-quicklook-from="smart-contract">smart contract</a> data, and ledger information) and an input (<a data-quicklook-from="transaction">transaction</a> or block) to compute the new state deterministically. This deterministic property ensures all network nodes reach the same result, maintaining consensus.
11+
12+
With <a data-quicklook-from="arbitrum">Arbitrum</a>, the STF plays an even more pivotal role. <a data-quicklook-from="arbitrum">Arbitrum</a> executes transactions offchain in batches, periodically submitting summaries to the <a data-quicklook-from="parent-chain">parent chain</a>. This approach leverages offchain computation to achieve higher throughput and lower gas costs while maintaining Ethereum's security. To safeguard against incorrect or malicious offchain execution, Arbitrum employs a <a data-quicklook-from="challenge">challenge</a> mechanism called fraud proofs. If a dispute arises, the STF can be recomputed step-by-step onchain, enabling the network to verify the validity of offchain computations and ensure that errors or fraudulent behavior are detected and rectified.
13+
14+
The <a data-quicklook-from="arbitrum-nitro">Arbitrum Nitro</a> Stack STF mirrors Ethereum's STF with key modifications for <a data-quicklook-from="arbitrum-chain">Arbitrum chain</a> requirements. The function processes ordered transactions and outputs the updated state from the transaction <a data-quicklook-from="batch">batch</a>.
15+
16+
<a data-quicklook-from="stylus">Stylus</a> expands Arbitrum's execution model beyond the Ethereum Virtual
17+
Machine (EVM) by adding WebAssembly (<a data-quicklook-from="wasm">WASM</a>)–based execution, allowing
18+
high-performance contracts in Rust, C, and C++ to run alongside traditional EVM contracts. The integration
19+
The Stylus introduces several modifications to the STF, including:
20+
21+
### Stylus-specific transaction processing
22+
23+
A modified version of <a data-quicklook-from="geth">Geth</a> that recognizes and processes Stylus transactions, ensuring proper inclusion in state transitions.
24+
25+
### Execution in a WASM runtime
26+
27+
Stylus transactions execute in <a data-quicklook-from="arbos">ArbOS</a>'s WASM runtime instead of the EVM, enabling faster execution and more efficient computation.
28+
29+
### Stylus gas accounting and pricing
30+
31+
Unlike standard EVM transactions, Stylus transactions introduce new gas pricing models that account for factors such as opcode pricing, host I/O operations, and <a data-quicklook-from="ink">Ink</a> usage costs.
32+
33+
### Interoperability with the EVM
34+
35+
Stylus contracts can interact seamlessly with Solidity contracts, enabling hybrid applications that leverage EVM and WASM execution environments.
36+
37+
These Stylus-related changes aim to maintain compatibility with Ethereum's execution model while introducing a more efficient, flexible, and scalable alternative for smart contract development.
38+
39+
The following sections cover STF inputs, node processing, and implementation rules, highlighting differences between Ethereum, Arbitrum, and Stylus execution environments. Stylus-specific execution tasks handled within ArbOS will be covered separately, focusing on host I/O operations, caching, and WASM memory management.

docs/intro/intro.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'A gentle introduction to Arbitrum'
3+
description: 'Arbitrum is a suite of Ethereum Layer-2 scaling solutions that you can use to build decentralized apps (dApps). This guide introduces you to the Arbitrum suite of products and explains how developers can use each of them to build fast and secure dApps.'
4+
author: dzgoldman
5+
---
6+
7+
import GentleIntroPartial from '../partials/_gentle-intro-partial.mdx';
8+
9+
<GentleIntroPartial />

docs/stylus/cli-tools-overview.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
id: cli-tools-overview
3+
title: CLI Tools (cargo-stylus)
4+
sidebar_label: CLI tools overview
5+
---
6+
7+
The CLI tools provided for Stylus, specifically the `cargo-stylus` tool, are designed to help developers manage, compile, and optimize their Stylus contracts efficiently. This overview provides a summary of the tools available and how to use them effectively.
8+
9+
## Available tools
10+
11+
### 1. Optimize WASM binaries
12+
13+
The `cargo-stylus` tool allows you to optimize WebAssembly (WASM) binaries, ensuring that your contracts are as efficient as possible.
14+
15+
- **[Optimize WASM binaries](/stylus/how-tos/optimizing-binaries.mdx):** Learn how to optimize your WASM binaries for performance and size.
16+
17+
### 2. Debug Stylus transactions
18+
19+
Gain insights into your Stylus contracts by debugging transactions.
20+
21+
- **[Debug Stylus transactions](/stylus/how-tos/debugging-tx.mdx):** A guide to debugging transactions, helping you identify and fix issues.
22+
23+
### 3. Verify contracts
24+
25+
Ensure that your Stylus contracts are correctly verified.
26+
27+
- **[Verify contracts](/stylus/how-tos/verifying-contracts.mdx):** Step-by-step instructions on how to verify your contracts using `cargo-stylus`.
28+
29+
## Source code repository
30+
31+
The source code for `cargo-stylus` is available on GitHub. Explore the code, contribute, or use it as a reference.
32+
33+
- **[cargo-stylus repository](https://github.com/OffchainLabs/stylus):** Visit the GitHub repository for more information.
34+
35+
## Additional resources
36+
37+
For more advanced usage and detailed guides, refer to the following resources:
38+
39+
- **[Optimize WASM binaries](/stylus/how-tos/optimizing-binaries.mdx)**
40+
- **[Troubleshooting](/stylus/troubleshooting-building-stylus.md)**
41+
- **[Run a Stylus dev node](/run-arbitrum-node/03-run-local-full-chain-simulation.mdx)**
42+
43+
This overview page serves as the starting point for mastering the CLI tools available for Stylus development. From optimizing your contracts to debugging and verifying them, the `cargo-stylus` toolset is integral to a smooth development experience.

docs/stylus/overview.mdx

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
id: stylus-overview
3+
title: Write Stylus Contracts
4+
sidebar_label: Write Stylus contracts
5+
displayed_sidebar: buildAppsSidebar
6+
---
7+
8+
import Card from '@site/src/components/Cards/Card';
9+
10+
# Write Stylus Contracts
11+
12+
Let's learn how to write contracts with Stylus!
13+
14+
<div
15+
style={{
16+
display: 'grid',
17+
gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))',
18+
gap: '20px',
19+
}}
20+
>
21+
<Card
22+
title="A gentle introduction"
23+
description="Start with the basics of Stylus contracts."
24+
href="https://docs.arbitrum.io/stylus/gentle-introduction"
25+
/>
26+
<Card
27+
title="Quickstart (Rust)"
28+
description="Get started quickly with Rust."
29+
href="https://docs.arbitrum.io/stylus/quickstart"
30+
/>
31+
<Card
32+
title="Testnet"
33+
description="Explore the testnet environment."
34+
href="https://docs.arbitrum.io/stylus/reference/testnet-information"
35+
/>
36+
<Card
37+
title="Stylus by example"
38+
description="Learn Stylus through examples."
39+
href="https://stylus-by-example.org"
40+
/>
41+
<Card
42+
title="Stylus Rust SDK"
43+
description="Dive into the Stylus Rust SDK."
44+
href="https://docs.arbitrum.io/stylus/reference/rust-sdk-guide"
45+
/>
46+
<Card
47+
title="Gas, ink and caching"
48+
description="Learn about gas, ink, and caching strategies."
49+
href="https://docs.arbitrum.io/stylus/concepts/gas-metering"
50+
/>
51+
<Card
52+
title="CLI tools (cargo-stylus)"
53+
description="Master the CLI tools for Stylus."
54+
href="/stylus/cli-tools-overview"
55+
/>
56+
<Card
57+
title="Run a Stylus dev node"
58+
description="Set up and run a development node."
59+
href="https://docs.arbitrum.io/run-arbitrum-node/run-local-dev-node"
60+
/>
61+
<Card
62+
title="Other supported languages"
63+
description="Explore other languages supported by Stylus."
64+
href="https://docs.arbitrum.io/stylus/reference/stylus-sdk"
65+
/>
66+
<Card
67+
title="Troubleshooting"
68+
description="Find solutions to common issues."
69+
href="https://docs.arbitrum.io/stylus/troubleshooting-building-stylus"
70+
/>
71+
<Card
72+
title="Source code repository"
73+
description="Check out the source code."
74+
href="https://github.com/OffchainLabs/stylus"
75+
/>
76+
<Card
77+
title="Public preview"
78+
description="View the public preview of Stylus."
79+
href="https://docs.arbitrum.io/stylus/concepts/public-preview-expectations"
80+
/>
81+
</div>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: 'Stylus testnet information'
3+
description: A reference providing details about the Stylus testnet and faucets for obtaining testnet ETH
4+
author: amarrazza
5+
sme: amarrazza
6+
target_audience: Developers building on the Stylus testnet
7+
sidebar_position: 9
8+
---
9+
10+
import StylusFaucets from './partials/_stylus-faucets.mdx';
11+
12+
import ArbitrumContractAddresses from '../../partials/_reference-arbitrum-contract-addresses-partial.mdx';
13+
14+
## Arbitrum public RPC endpoints
15+
16+
:::caution
17+
18+
- Unlike the RPC Urls, the Sequencer endpoints only support `eth_sendRawTransaction` and `eth_sendRawTransactionConditional` calls.
19+
- Arbitrum public RPCs do not provide Websocket support.
20+
- Stylus testnets v1 and v2 have been spun down and are not accessible anymore.
21+
- Visit [Quicknode's Arbitrum Sepolia faucet](https://faucet.quicknode.com/arbitrum/sepolia), [Alchemy's Arbitrum sepolia faucet](https://www.alchemy.com/faucets/arbitrum-sepolia), or [Getblock's Arbitrum Sepolia faucet](https://getblock.io/faucet/arb-sepolia) for testnet Sepolia tokens on L2.
22+
23+
:::
24+
25+
This section provides an overview of the available public RPC endpoints for different Arbitrum chains that have Stylus enabled, and the necessary details to interact with them.
26+
27+
| Name | RPC Url(s) | Chain ID | Block explorer | Underlying chain | Tech stack | Sequencer feed URL | Sequencer endpoint<sup>⚠️</sup> |
28+
| -------------------------- | -------------------------------------- | -------- | --------------------------- | ---------------- | -------------- | ------------------------------------- | ------------------------------------------------ |
29+
| Arbitrum Sepolia (Testnet) | https://sepolia-rollup.arbitrum.io/rpc | 421614 | https://sepolia.arbiscan.io | Sepolia | Nitro (Rollup) | wss://sepolia-rollup.arbitrum.io/feed | https://sepolia-rollup-sequencer.arbitrum.io/rpc |
30+
31+
<StylusFaucets />
32+
33+
<ArbitrumContractAddresses />

0 commit comments

Comments
 (0)