Skip to content

Commit

Permalink
Slightly improve the Orbit STF guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mahsamoosavi committed Oct 13, 2023
1 parent 23c1131 commit 77f8000
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions arbitrum-docs/launch-orbit-chain/how-tos/customize-stf.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ 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.

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
Expand Down Expand Up @@ -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
Expand All @@ -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.

Expand Down Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions arbitrum-docs/node-running/how-tos/build-nitro-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import PublicPreviewBannerPartial from '../../partials/_public-preview-banner-pa

<PublicPreviewBannerPartial />

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:

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 77f8000

Please sign in to comment.