Skip to content

Commit 149c30b

Browse files
committed
fix conflict
2 parents 6633952 + 5b650db commit 149c30b

25 files changed

+387
-205
lines changed

.github/ISSUE_TEMPLATE/docs_audit_results.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,25 @@ labels: 'docs-audit-2024-Q4,op-labs'
99

1010
## Description of the updates required
1111

12-
> Write a description of the current state of the page.
12+
<!-- Write a description of the current state of the page. -->
13+
14+
### Acceptance criteria
15+
16+
<!-- Definition of done for the assignee -->
17+
18+
### Resources
19+
20+
<!-- Supporting docs, points of contact, and any additional helpful info -->
21+
22+
### Action items
23+
24+
<!-- The process for working through this issue for example:
25+
1. Read through resources and meet with SME
26+
2. Write the first draft
27+
3. Share draft with SMEs and implement feedback
28+
4. Peer review
29+
5. Final SME review
30+
6. Publish -->
1331

1432
## Github issue label criteria
1533

nouns.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ Granite
1616
Holocene
1717
Monitorism
1818
Kubernetes
19-
Fault Proof System
19+
Fault Proof System
20+
Viem

pages/builders/app-developers/tutorials/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"first-contract": "Deploying your first contract on OP Mainnet",
33
"cross-dom-solidity": "Communicating between chains in Solidity",
4-
"cross-dom-bridge-eth": "Bridging ETH with the Optimism SDK",
4+
"cross-dom-bridge-eth": "Bridging ETH with Viem",
55
"cross-dom-bridge-erc20": "Bridging ERC-20 tokens with the Optimism SDK",
66
"standard-bridge-custom-token": "Bridging your custom ERC-20 token to OP Mainnet",
77
"standard-bridge-standard-token": "Bridging your standard ERC-20 token to OP Mainnet",

pages/builders/app-developers/tutorials/cross-dom-bridge-eth.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Bridging ETH with viem
2+
title: Bridging ETH with Viem
33
lang: en-US
44
description: Learn how to use Viem to transfer ETH between Layer 1 (Ethereum or Sepolia) and Layer 2 (OP Mainnet or OP Sepolia).
55
---
66

77
import { Callout, Steps, Tabs } from 'nextra/components'
88

9-
# Bridging ETH to OP Mainnet with viem
9+
# Bridging ETH to OP Mainnet with Viem
1010

1111
This tutorial explains how you can use [Viem](https://viem.sh) to bridge ETH from L1 (Ethereum or Sepolia) to L2 (OP Mainnet or OP Sepolia).
1212
Viem is a TypeScript interface for Ethereum that provides low-level stateless primitives for interacting with Ethereum.
@@ -45,7 +45,7 @@ Since Viem is a [Node.js](https://nodejs.org/en/) library, you'll need to create
4545
pnpm init
4646
```
4747

48-
{<h3>Install the viem library</h3>}
48+
{<h3>Install the Viem library</h3>}
4949

5050
```bash
5151
pnpm add viem
@@ -92,7 +92,7 @@ This will bring up a Node REPL prompt that allows you to run JavaScript code.
9292
You need to import some dependencies into your Node REPL session.
9393

9494
<Steps>
95-
{<h3>Import viem and other packages</h3>}
95+
{<h3>Import Viem and other packages</h3>}
9696

9797
```js file=<rootDir>/public/tutorials/cross-dom-bridge-eth.js#L3-L6 hash=88319dda3322e76accb9e50222d30abc
9898
```

pages/builders/app-developers/tutorials/cross-dom-solidity.mdx

Lines changed: 35 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
11
---
2-
title: Communicating between OP Mainnet and Ethereum in Solidity
2+
title: Communicating between OP Stack and Ethereum in Solidity
33
lang: en-US
4-
description: Learn how to write Solidity contracts on OP Mainnet and Ethereum that can talk to each other.
4+
description: Learn how to write Solidity contracts on OP Stack and Ethereum that can talk to each other.
55
---
66

77
import { Steps, Callout, Tabs } from 'nextra/components'
8-
import { WipCallout } from '@/components/WipCallout'
98

10-
<WipCallout />
11-
# Communicating between OP Mainnet and Ethereum in Solidity
9+
# Communicating between OP Stack and Ethereum in Solidity
1210

13-
This tutorial explains how to write Solidity contracts on OP Mainnet and Ethereum that can talk to each other.
14-
Here you'll use a contract on OP Mainnet that can set a "greeting" variable on a contract on Ethereum, and vice-versa.
11+
This tutorial explains how to write Solidity contracts on OP Stack and Ethereum that can talk to each other.
12+
Here you'll use a contract on OP Stack that can set a "greeting" variable on a contract on Ethereum, and vice-versa.
1513
This is a simple example, but the same technique can be used to send any kind of message between the two chains.
1614

1715
You won't actually be deploying any smart contracts as part of this tutorial.
18-
Instead, you'll reuse existing contracts that have already been deployed to OP Mainnet and Ethereum.
16+
Instead, you'll reuse existing contracts that have already been deployed to OP Stack and Ethereum.
1917
Later in the tutorial you'll learn exactly how these contracts work so you can follow the same pattern to deploy your own contracts.
2018

2119
<Callout type="info">
22-
Just looking to bridge tokens between OP Mainnet and Ethereum?
23-
Check out the tutorial on [Bridging ERC-20 Tokens to OP Mainnet With the Optimism SDK](./cross-dom-bridge-erc20).
20+
Just looking to bridge tokens between OP Stack and Ethereum?
21+
Check out the tutorial on [Bridging ERC-20 Tokens to OP Stack With the viem](./cross-dom-bridge-erc20).
2422
</Callout>
2523

2624
## Message passing basics
2725

28-
OP Mainnet uses a smart contract called the `CrossDomainMessenger` to pass messages between OP Mainnet and Ethereum.
26+
OP Stack uses a smart contract called the `CrossDomainMessenger` to pass messages between OP Stack and Ethereum.
2927
Both chains have a version of this contract (the `L1CrossDomainMessenger` and the `L2CrossDomainMessenger`).
30-
Messages sent from Ethereum to OP Mainnet are automatically relayed behind the scenes.
31-
Messages sent from OP Mainnet to Ethereum must be explicitly relayed with a second transaction on Ethereum.
28+
Messages sent from Ethereum to OP Stack are automatically relayed behind the scenes.
29+
Messages sent from OP Stack to Ethereum must be explicitly relayed with a second transaction on Ethereum.
3230
Read more about message passing in the guide to [Sending Data Between L1 and L2](/builders/app-developers/bridging/messaging).
3331

3432
## Dependencies
@@ -80,8 +78,8 @@ It will take a few minutes for your message to reach L2.
8078
Feel free to take a quick break while you wait.
8179

8280
<Callout type="info">
83-
You can use the Optimism SDK to programmatically check the status of any message between L1 and L2.
84-
Later on in this tutorial you'll learn how to use the Optimism SDK and the `waitForMessageStatus` function to wait for various message statuses.
81+
You can use Viem to programmatically check the status of any message between L1 and L2.
82+
Later on in this tutorial you'll learn how to use Viem and the `waitToProve` function to wait for various message statuses.
8583
This same function can be used to wait for a message to be relayed from L1 to L2.
8684
</Callout>
8785

@@ -127,36 +125,27 @@ Feel free to keep this tab open so you can easily copy the transaction hash late
127125

128126
{<h3>Create a demo project folder</h3>}
129127

130-
You're going to use the Optimism SDK to prove and relay your message to L1.
131-
Since the Optimism SDK is a [Node.js](https://nodejs.org/en/) library, you'll need to create a Node.js project to use it.
128+
You're going to use the viem to prove and relay your message to L1.
132129

133130
```bash
134-
mkdir op-sample-project
135-
cd op-sample-project
131+
mkdir cross-dom
132+
cd cross-dom
136133
```
137134

138-
{<h3>Initialize the Project</h3>}
135+
{<h3>Initialize the project</h3>}
139136

140137
Set up the project as a basic Node.js project with `pnpm` or your favorite package manager.
141138

142139
```bash
143140
pnpm init
144141
```
145142

146-
{<h3>Install the Optimism SDK</h3>}
143+
{<h3>Install viem</h3>}
147144

148-
Install the Optimism SDK with `pnpm` or your favorite package manager.
145+
Install Viem with `pnpm` or your favorite package manager.
149146

150147
```bash
151-
pnpm add @eth-optimism/sdk
152-
```
153-
154-
{<h3>Install ethers.js</h3>}
155-
156-
Install `ethers` with `pnpm` or your favorite package manager.
157-
158-
```bash
159-
pnpm add ethers@^5
148+
pnpm add viem
160149
```
161150

162151
{<h3>Add your private key to your environment</h3>}
@@ -187,46 +176,27 @@ Start the Node.js REPL with the `node` command.
187176
node
188177
```
189178

190-
{<h3>Import the Optimism SDK</h3>}
191-
192-
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L3 hash=26b2fdb17dd6c8326a54ec51f0769528
193-
```
194-
195-
{<h3>Import ethers.js</h3>}
179+
{<h3>Import Viem</h3>}
196180

197-
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L4 hash=69a65ef97862612e4978b8563e6dbe3a
198-
```
199-
200-
{<h3>Load your private key</h3>}
201-
202-
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L6 hash=755b77a7ffc7dfdc186f36c37d3d847a
181+
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L3-L5 hash=65b9a5ad5b634bc2e424f5664e6e1f84
203182
```
204183

205184
{<h3>Load your transaction hash</h3>}
206185

207-
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L8 hash=320cd4f397d7bed8d914d4be0c99f8dc
186+
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L7 hash=320cd4f397d7bed8d914d4be0c99f8dc
208187
```
209188

210189
{<h3>Create the RPC providers and wallets</h3>}
211190

212-
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L10-L13 hash=9afdce50665ae93bce602068071ffaa1
213-
```
214-
215-
{<h3>Create a CrossChainMessenger instance</h3>}
216-
217-
The Optimism SDK exports a `CrossChainMessenger` class that makes it easy to prove and relay cross-chain messages.
218-
219-
Create an instance of the `CrossChainMessenger` class:
220-
221-
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L15-L20 hash=997b9c4cdd5fb1f9d4e0882a683ae016
191+
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L8-L9 hash=d47e4991c5153e1e1dc55de5047a8a3e
222192
```
223193

224194
{<h3>Wait until the message is ready to prove</h3>}
225195

226-
The second step to send messages from L2 to L1 is to prove that the message was sent on L2.
196+
Next, you will send messages from L2 to L1 is to prove that the message was sent on L2.
227197
You first need to wait until the message is ready to prove.
228198

229-
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L23 hash=25a072666b6147f8d8983d8223f045b8
199+
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L12-L16 hash=df275e659d954eb72b8c5765d9baf6de
230200
```
231201

232202
<Callout type="info">
@@ -238,34 +208,34 @@ Feel free to take a quick break while you wait.
238208

239209
Once the message is ready to be proven, you'll send an L1 transaction to prove that the message was sent on L2.
240210

241-
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L26 hash=17922abea43b3d379404fedd87422dde
211+
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L18-L23 hash=e4d608ac2c2ceb5a744c8474679bd8cb
242212
```
243213

244214
{<h3>Wait until the message is ready for relay</h3>}
245215

246216
The final step to sending messages from L2 to L1 is to relay the messages on L1.
247217
This can only happen after the fault proof period has elapsed.
248-
On OP Mainnet, this takes 7 days.
218+
On OP Stack, this takes 7 days.
249219

250220
<Callout>
251221
We're currently testing fault proofs on OP Sepolia, so withdrawal times reflect Mainnet times.
252222
</Callout>
253223

254-
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L29 hash=45d995aab47ec29afee4bb4577ae9303
224+
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L25-L29 hash=88cec1db2fde515ea9008eaa1bbdfd73
255225
```
256226

257227
{<h3>Relay the message on L1</h3>}
258228

259229
Once the withdrawal is ready to be relayed you can finally complete the message sending process.
260230

261-
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L32 hash=b5515811ffcf8b9ada15dea8ae666e44
231+
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L31-L33 hash=d7e47c9787d92e2140622a6bdcc6d7bb
262232
```
263233

264234
{<h3>Wait until the message is relayed</h3>}
265235

266236
Now you simply wait until the message is relayed.
267237

268-
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L35 hash=d6e7f89e929eea0ac3217a6751b7e578
238+
```js file=<rootDir>/public/tutorials/cross-dom-solidity.js#L35-L36 hash=4ff3cdc48f17cfd7de4a6ef2d2671dc2
269239
```
270240

271241
{<h3>Check the L1 Greeter</h3>}
@@ -348,10 +318,10 @@ You can follow a similar pattern in your own smart contracts.
348318
## Conclusion
349319

350320
You just learned how you can write Solidity contracts on Sepolia and OP Sepolia that can talk to each other.
351-
You can follow the same pattern to write contracts that can talk to each other on Ethereum and OP Mainnet.
321+
You can follow the same pattern to write contracts that can talk to each other on Ethereum and OP Stack.
352322

353323
This sort of cross-chain communication is useful for a variety of reasons.
354-
For example, the [Standard Bridge](/builders/app-developers/bridging/standard-bridge) contracts use this same system to bridge ETH and ERC-20 tokens between Ethereum and OP Mainnet.
324+
For example, the [Standard Bridge](/builders/app-developers/bridging/standard-bridge) contracts use this same system to bridge ETH and ERC-20 tokens between Ethereum and OP Stack.
355325

356-
One cool way to take advantage of cross-chain communication is to do most of your heavy lifting on OP Mainnet and then send a message to Ethereum only when you have important results to share.
357-
This way you can take advantage of the low gas costs on OP Mainnet while still being able to use Ethereum when you need it.
326+
One cool way to take advantage of cross-chain communication is to do most of your heavy lifting on OP Stack and then send a message to Ethereum only when you have important results to share.
327+
This way you can take advantage of the low gas costs on OP Stack while still being able to use Ethereum when you need it.

pages/builders/app-developers/tutorials/send-tx-from-eth.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ description: Learn how to force transaction inclusion without the OP Stack Seque
55
---
66

77
import { Callout, Steps } from 'nextra/components'
8-
import { WipCallout } from '@/components/WipCallout'
98

10-
<WipCallout />
119
# Triggering OP Stack transactions from Ethereum
1210

1311
OP Stack currently uses a single-Sequencer block production model.

pages/builders/chain-operators/configuration/batcher.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,24 +262,24 @@ default value is `10`.
262262
<Tabs.Tab>`OP_BATCHER_NUM_CONFIRMATIONS=10`</Tabs.Tab>
263263
</Tabs>
264264

265-
### altda.da-server
265+
### plasma.da-server
266266

267267
HTTP address of a DA Server.
268268

269269
<Tabs items={['Syntax', 'Example', 'Environment Variable']}>
270-
<Tabs.Tab>`--altda.da-server=<value>`</Tabs.Tab>
271-
<Tabs.Tab>`--altda.da-server=`</Tabs.Tab>
270+
<Tabs.Tab>`--plasma.da-server=<value>`</Tabs.Tab>
271+
<Tabs.Tab>`--plasma.da-server=`</Tabs.Tab>
272272
<Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERVER=`</Tabs.Tab>
273273
</Tabs>
274274

275-
### altda.da-service
275+
### plasma.da-service
276276

277277
Use DA service type where commitments are generated by plasma server. The
278278
default value is `false`.
279279

280280
<Tabs items={['Syntax', 'Example', 'Environment Variable']}>
281-
<Tabs.Tab>`--altda.da-service=<value>`</Tabs.Tab>
282-
<Tabs.Tab>`--altda.da-service=false`</Tabs.Tab>
281+
<Tabs.Tab>`--plasma.da-service=<value>`</Tabs.Tab>
282+
<Tabs.Tab>`--plasma.da-service=false`</Tabs.Tab>
283283
<Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERVICE=false`</Tabs.Tab>
284284
</Tabs>
285285

pages/builders/chain-operators/management/key-management.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ are compromised, the system can be exploited.
2121

2222
It is up to the chain operator to make the decision on how they want to manage
2323
these keys. One suggestion is to use a Hardware Security Module (HSM) to provide
24-
a safer environment for key management. Cloud providers often times provide
24+
a safer environment for key management. Cloud providers oftentimes provide
2525
Key Management Systems (KMS) that can work with your developer operations
2626
configurations. This can be used in conjunction with the `eth_signTransaction`
2727
RPC method.

pages/builders/chain-operators/management/troubleshooting.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export IMPL_SALT=$(openssl rand -hex 32)
3333

3434
## Failed to find the L2 Heads to start from
3535

36-
`op-node` fails to execute the derviation process with the following error:
36+
`op-node` fails to execute the derivation process with the following error:
3737

3838
```text
3939
WARN [02-16|21:22:02.868] Derivation process temporary error attempts=14 err="stage 0 failed resetting: temp: failed to find the L2 Heads to start from: failed to fetch L2 block by hash 0x0000000000000000000000000000000000000000000000000000000000000000: failed to determine block-hash of hash 0x0000000000000000000000000000000000000000000000000000000000000000, could not get payload: not found"

pages/builders/chain-operators/tools/chain-monitoring.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ Onchain monitoring services provide insights into the overall system, helping ch
1919

2020
Monitorism is a tooling suite that supports monitoring and active remediation actions for the OP Stack chain. Monitorism uses monitors as passive security providing automated monitoring for the OP Stack. They are used to monitor the OP stack and alert on specific events that could be a sign of a security incident.
2121

22-
Currently. the list of monitors includes:
22+
Currently, the list of monitors includes:
2323

2424
Security integrity monitors: These are monitors necessary for making sure Bridges between L2 and L1 are safe and work as expected. These monitors are divided in two subgroups:
2525

2626
* Pre-Faultproof Chain Monitors:
27-
* Fault Monitor: checks for changes in output roots posted to the L2OutputOracle contract. When a change is detected, it reconstructs the output root from a trusted L2 source and looks for a match..
27+
* Fault Monitor: checks for changes in output roots posted to the L2OutputOracle contract. When a change is detected, it reconstructs the output root from a trusted L2 source and looks for a match.
2828
* Withdrawals Monitor: checks for new withdrawals that have been proven to the OptimismPortal contract. Each withdrawal is checked against the `L2ToL1MessagePasser` contract.
2929
* Faultproof chain monitors:
3030
* Faultproof Withdrawal: The Faultproof Withdrawal component monitors `ProvenWithdrawals` events on the `OptimismPortal` contract and performs checks to detect any violations of invariant conditions on the chain. If a violation is detected, the issue is logged, and a Prometheus metric is set for the event. This component is designed to work exclusively with chains that are already utilizing the Fault Proofs system. This is a new version of the deprecated `chain-mon`, `faultproof-wd-mon`. For detailed information on how the component works and the algorithms used, please refer to the component README.
@@ -34,7 +34,7 @@ Security monitors: Those tools monitor other aspects of several contracts used i
3434
* Global Events Monitor: made for taking YAML rules as configuration and monitoring the events that are emitted on the chain.
3535
* Liveness Expiration Monitor: monitors the liveness expiration on Safes.
3636
* Balances Monitor: emits a metric reporting the balances for the configured accounts.
37-
* Multisig Monitor: The multisig monitor reports the paused status of the OptimismPortal contract. "If set, reports the latest nonce of the configured Safe address and the latest presigned nonce stored in One Password.. The latest presigned nonce is identified by looking for items in the configured vault that follow a `ready-<nonce>.json` name. The highest nonce of this item name format is reported.
37+
* Multisig Monitor: The multisig monitor reports the paused status of the OptimismPortal contract. If set, reports the latest nonce of the configured Safe address and the latest presigned nonce stored in One Password.. The latest presigned nonce is identified by looking for items in the configured vault that follow a `ready-<nonce>.json` name. The highest nonce of this item name format is reported.
3838
* Drippie Monitor: tracks the execution and executability of drips within a Drippie contract.
3939
* Secrets Monitor: takes a Drippie contract as a parameter and monitors for any drips within that contract that use the `CheckSecrets` dripcheck contract. `CheckSecrets` is a dripcheck that allows a drip to begin once a specific secret has been revealed (after a delay period) and cancels the drip if a second secret is revealed. Monitoring these secrets is important, as their revelation may indicate that the secret storage platform has been compromised and someone is attempting to exfiltrate the ETH controlled by the drip.
4040

@@ -76,9 +76,9 @@ Chain operators can easily create their grafana dashboard for Dispute Monitor us
7676
## Offchain component monitoring
7777

7878
Offchain monitoring allows chain operators to monitor the operation and behavior of nodes and other offchain components. Some of the more common components that you'll likely want to monitor include `op-node`, `op-geth`, `op-proposer`, `op-batcher`, and `op-challenger`.
79-
The general steps for enabling offchain monitoring is pretty consistent for all the OP components:
79+
The general steps for enabling offchain monitoring are pretty consistent for all the OP components:
8080

81-
1. Expose the monitoring port by enabling the `-metrics.enabled` flag
81+
1. Expose the monitoring port by enabling the `--metrics.enabled` flag
8282
2. Customize the metrics port and address via the `--metrics.port` and `--metrics.addr` flags, respectively
8383
3. Use [Prometheus](https://prometheus.io/) to scrape data from the metrics port
8484
4. Save the data in `influxdb`

0 commit comments

Comments
 (0)