From 77f8000ff39817e246800040bfc04defe1892269 Mon Sep 17 00:00:00 2001 From: Mahsa Moosavi Date: Fri, 13 Oct 2023 10:37:51 -0400 Subject: [PATCH] Slightly improve the Orbit STF guide --- .../launch-orbit-chain/how-tos/customize-stf.mdx | 12 ++++++------ .../node-running/how-tos/build-nitro-locally.md | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/customize-stf.mdx b/arbitrum-docs/launch-orbit-chain/how-tos/customize-stf.mdx index 020d3e3dc..9e5e8bc56 100644 --- a/arbitrum-docs/launch-orbit-chain/how-tos/customize-stf.mdx +++ b/arbitrum-docs/launch-orbit-chain/how-tos/customize-stf.mdx @@ -24,7 +24,7 @@ Otherwise, the fraud prover would side with unmodified nodes, which would win fr Here's some examples of modifications that affect the STF: - Adding a new EVM opcode or precompile: - This modifies the STF because a node with this change would disagree about the outcome of EVM execution compared to an unmodified nitro node + This modifies the STF because a node with this change would disagree about the outcome of EVM execution compared to an unmodified Nitro node when the new opcode or precompile is invoked. - Rewarding the deployer of a smart contract with a portion of gas spent in the smart contract's execution: This modifies the STF because a node which has this change applied would disagree about the balance of the deployer after transactions. Such changes would lead to disagreements about block hashes compared to unmodified Nitro nodes. @@ -32,9 +32,9 @@ Here's some examples of modifications that affect the STF: Here's some examples of modifications that don't affect the STF: - Adding a new RPC method to query an address's balance across multiple blocks: - This doesn't modify the STF because this doesn't change on-chain balances or block hashes. + This doesn't modify the STF because it doesn't change on-chain balances or block hashes. - Changing the sequencer to order blocks by tip: - The sequencer is trusted to order transactions in Arbitrum Nitro, and it can chose any ordering it wants. + The sequencer is trusted to order transactions in Arbitrum Nitro, and it can choose any ordering it wants. Nodes (and the fraud proofs) will simply accept the new transaction ordering as there is no single ordering they think is correct. ### Modification compatibility with Arbitrum Nitro @@ -66,7 +66,7 @@ Here are some requirements for the Arbitrum Nitro State Transition Function: ## Building the modified node -To modify the State Transition Function, you'll need to build a modified Arbitrum Nitro node docker image. +To modify the State Transition Function, you'll need to build a modified Arbitrum Nitro node Docker image. This guide covers how to build the node and enable fraud proofs by building a new replay binary. ### Step 1. Download the Nitro source code @@ -88,7 +88,7 @@ Next, make your changes to the State Transition Function. For example, you could To build the Arbitrum Nitro node image, you'll first need to install Docker. You can confirm if it's already setup by running `docker version` in a terminal. If not, try following [Docker's getting started guide](https://www.docker.com/get-started/), or if you're on Linux, -install Docker from your distribution's package manager and start the docker service. +install Docker from your distribution's package manager and start the Docker service. Once you have Docker installed, you can simply run `docker build . --tag custom-nitro-node` in the `nitro` folder to build your custom node. @@ -148,7 +148,7 @@ docker run --rm -it -v /some/local/dir/arbitrum:/home/user/.arbitrum -p 0.0.0.0: Note that `--node.staker.dangerous.without-block-validator` has been removed from this invocation now that fraud proofs are working again. -#### 4.2 Preserving the Replay Binary +#### 4.2 Preserving the replay binary The primary issue with simply using a nitro-node-dev build is that, whenever the code changes at all, the replay binary will also change. diff --git a/arbitrum-docs/node-running/how-tos/build-nitro-locally.md b/arbitrum-docs/node-running/how-tos/build-nitro-locally.md index 614bf7343..e2c7cc93b 100644 --- a/arbitrum-docs/node-running/how-tos/build-nitro-locally.md +++ b/arbitrum-docs/node-running/how-tos/build-nitro-locally.md @@ -11,7 +11,7 @@ import PublicPreviewBannerPartial from '../../partials/_public-preview-banner-pa -Arbitrum Nitro is the software that powers all Arbitrum chains. This how-to shows how you can build a docker image, or binaries, directly from Nitro's source code. If you want to run a node for one of the Arbitrum chains, however, it is recommended that you use the docker image available on DockerHub, as explained in [How to run a full node](/node-running/how-tos/running-a-full-node.mdx). +Arbitrum Nitro is the software that powers all Arbitrum chains. This how-to shows how you can build a Docker image, or binaries, directly from Nitro's source code. If you want to run a node for one of the Arbitrum chains, however, it is recommended that you use the docker image available on DockerHub, as explained in [How to run a full node](/node-running/how-tos/running-a-full-node.mdx). This how-to assumes that you're running one of the following operating systems: @@ -68,7 +68,7 @@ cd nitro git submodule update --init --recursive --force ``` -### Step 3. Build the Nitro node docker image +### Step 3. Build the Nitro node Docker image ```bash docker build . --tag nitro-node @@ -110,7 +110,7 @@ sudo mkdir -p /usr/local/bin sudo ln -s /opt/homebrew/opt/llvm/bin/wasm-ld /usr/local/bin/wasm-ld ``` -### Step 5. Configure Node [16.19](https://github.com/nvm-sh/nvm) +### Step 5. Configure node [16.19](https://github.com/nvm-sh/nvm) #### For Debian/Ubuntu