Skip to content

Commit 0796b91

Browse files
authored
Merge pull request #708 from PaulRBerg/docs/enhancements-and-typos
docs: enhancements and typos
2 parents eb9ef5d + 94f789a commit 0796b91

File tree

9 files changed

+58
-58
lines changed

9 files changed

+58
-58
lines changed

pages/chain/differences.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ In all other cases, the transaction sender address is set according to the same
5252

5353
### Transaction Fees
5454

55-
Transactions OP Mainnet must pay for an [L1 data fee](/stack/transactions/fees#the-l1-data-fee) on top of the standard [execution gas fee](/stack/transactions/fees#execution-gas-fee) you would expect on Ethereum.
55+
Transactions on OP Mainnet must pay for an [L1 data fee](/stack/transactions/fees#the-l1-data-fee) on top of the standard [execution gas fee](/stack/transactions/fees#execution-gas-fee) you would expect on Ethereum.
5656
Refer to the guide on [OP Mainnet Transaction Fees](/stack/transactions/fees) for more information.
5757

5858
### EIP-1559 Parameters

pages/stack/design-principles.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,4 @@ Extensibility is a key design principle that unlocks the superpower of collabora
115115

116116
The OP Stack is a decentralized software stack that anyone can contribute to.
117117
If you're interested in contributing to the OP Stack, check out [the Contributing section on our Community pages](https://community.optimism.io).
118-
Of course, software that has impact for the Optimism Collective is eligible to receive [Retroactive Public Goods Funding](https://app.optimism.io/retropgf).
119-
Build for the OP Stack — get rewarded for writing great open source software. What's not to love?
118+
Of course, software that has impact for the Optimism Collective is eligible to receive [Retroactive Public Goods Funding](https://app.optimism.io/retropgf). Build for the OP Stack — get rewarded for writing great open source software. What's not to love?

pages/stack/differences.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ In all other cases, the transaction sender address is set according to the same
5252

5353
### Transaction Fees
5454

55-
Transactions OP Stack chains must pay for an [L1 data fee](/stack/transactions/fees#the-l1-data-fee) on top of the standard [execution gas fee](/stack/transactions/fees#execution-gas-fee) you would expect on Ethereum.
55+
Transactions on OP Stack chains must pay for an [L1 data fee](/stack/transactions/fees#the-l1-data-fee) on top of the standard [execution gas fee](/stack/transactions/fees#execution-gas-fee) you would expect on Ethereum.
5656
Refer to the guide on [OP Stack Transaction Fees](/stack/transactions/fees) for more information.
5757

5858
### EIP-1559 Parameters

pages/stack/explainer.mdx

Lines changed: 31 additions & 27 deletions
Large diffs are not rendered by default.

pages/stack/protocol/outages.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Users may observe that the network appears to be "stuck" at a particular block h
3535
### Mitigation
3636

3737
Users can always bypass the Sequencer by sending L2 transactions directly to the [`OptimismPortal`](https://github.com/ethereum-optimism/optimism/blob/111f3f3a3a2881899662e53e0f1b2f845b188a38/packages/contracts-bedrock/src/L1/OptimismPortal.sol#L209) contract on L1.
38-
Refer to the [Bypassing the Sequencer](#bypassing-the-sequencer) section for more information about this functionality.
38+
Refer to the [Bypassing the Sequencer](#bypassing-the-sequencer) section below for more information about this functionality.
3939

4040
## Transaction Submission Outages
4141

pages/stack/protocol/rollup/deposit-flow.mdx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ Information is encapsulated in lower layer packets on the sending side and then
2323

2424
* `_target`, target address on L2.
2525
* `_message`, the L2 transaction's calldata, formatted as per the [ABI](https://docs.soliditylang.org/en/v0.8.19/abi-spec.html) of the target account.
26-
* `_minGasLimit`, the minimum gas limit allowed for the transaction on L2. Note that this is a *minimum* and the actual amount provided on L2 may be higher (but never lower) than the specified gas limit.
27-
Note that the actual amount provided on L2 will be higher, because the portal contract on L2 needs to do some processing before submitting the call to `_target`.
26+
* `_minGasLimit`, the minimum gas limit allowed for the transaction on L2. Note that this is a *minimum* and the actual amount provided on L2 may be higher (but never lower) than the specified gas limit. The actual amount provided on L2 is often higher because the portal contract on L2 performs some processing before submitting the call to `_target`.
2827

2928
2. The L1 cross domain messenger calls [its own `_send` function](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/L1/L1CrossDomainMessenger.sol#L42-L52).
3029
It uses these parameters:
@@ -52,15 +51,15 @@ Information is encapsulated in lower layer packets on the sending side and then
5251

5352
2. Next, `op-node` [converts](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/op-node/rollup/derive/deposits.go#L35-L51) those `TransactionDeposited` events into [deposit transactions](https://specs.optimism.io/protocol/deposits.html#user-deposited-transactions).
5453

55-
3. In most cases user deposit transactions call the [`relayMessage`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol#L291-L413) function of [`L2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol).
54+
3. In most cases, user deposit transactions call the [`relayMessage`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol#L291-L413) function of [`L2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol).
5655

5756
4. `relayMessage` runs a few sanity checks and then, if everything is good, [calls the real target contract with the relayed calldata](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol#L394).
5857

5958
## Denial of service (DoS) prevention
6059

6160
As with all other L1 transactions, the L1 costs of a deposit are borne by the transaction's originator.
6261
However, the L2 processing of the transaction is performed by the Optimism nodes.
63-
If there were no cost attached, an attacker could be able to submit a transaction that had high costs of run on L2, and that way perform a denial of service attack.
62+
If there were no cost attached, an attacker could submit a transaction that had high execution costs on L2, and that way perform a denial of service attack.
6463

6564
To avoid this DoS vector, [`depositTransaction`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/L1/OptimismPortal.sol#L422-L483), and the functions that call it, require a gas limit parameter.
6665
[This gas limit is encoded into the \[\]`TransactionDeposited` event](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/L1/OptimismPortal.sol#L469-L477), and used as the gas limit for the user deposit transaction on L2.
@@ -74,7 +73,7 @@ Deposits transactions can fail due to several reasons:
7473
* Not enough gas provided.
7574
* The state on L2 does not allow the transaction to be successful.
7675

77-
It is possible to replay a failed deposit, possibly with more gas,
76+
It is possible to replay a failed deposit, possibly with more gas.
7877

7978
### Replays in action
8079

@@ -124,7 +123,7 @@ To see how replays work, you can use [this contract on OP Sepolia](https://sepol
124123

125124
5. The next step is to find the hash of the failed relay.
126125
The easiest way to do this is to look in [the internal transactions of the destination contract](https://sepolia-optimism.etherscan.io/address/0xEF60cF6C6D0C1c755be104843bb72CDa3D778630#internaltx), and select the latest one that appears as a failure.
127-
It should be a call to L2CrossDomainMessenger at address `0x420...007`. This is the call you need to replay.
126+
It should be a call to `L2CrossDomainMessenger` at address `0x420...007`. This is the call you need to replay.
128127

129128
If the latest internal transaction is a success, it probably means your transaction hasn't relayed yet. Wait until it is, that may take a few minutes.
130129

@@ -185,10 +184,9 @@ To see how replays work, you can use [this contract on OP Sepolia](https://sepol
185184

186185
## Debugging
187186

188-
To debug deposit transactions you can ask the L2 cross domain messenger for the state of the transaction.
187+
To debug deposit transactions, you can ask the L2 cross domain messenger for the state of the transaction.
189188

190-
1. Look on Etherscan to see the `FailedRelayedMessage` event.
191-
Set `MSG_HASH` to that value.
189+
1. Look on Etherscan to see the `FailedRelayedMessage` event. Set `MSG_HASH` to that value.
192190

193191
2. To check if the message is listed as failed, run this:
194192

pages/stack/protocol/rollup/overview.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ Optimism block production is primarily managed by a single party, called the "se
3636
* Submitting user transactions to L1.
3737

3838
In Bedrock, the sequencer does have a mempool, similar to L1 Ethereum, but the mempool is private to avoid opening opportunities for MEV.
39-
In OP Mainnet blocks are produced every two seconds, regardless of whether they are empty (no transactions), filled up to the block gas limit with transactions, or anything in between.
39+
In OP Mainnet, blocks are produced every two seconds, regardless of whether they are empty (no transactions), filled up to the block gas limit with transactions, or anything in between.
4040

4141
Transactions get to the sequencer in two ways:
4242

43-
1. Transactions submitted on L1 (called *deposits*) are included in the chain in the appropriate L2 block.
43+
1. Transactions submitted directly to the sequencer.
44+
These transactions are a lot cheaper to submit, as they do not require the expense of a separate L1 transaction. However, they cannot be made censorship resistant since the sequencer is the only participant that knows about them.
45+
46+
2. Transactions submitted on L1 (called *deposits*) are included in the chain in the appropriate L2 block.
4447
Every L2 block is identified by the "epoch" (the L1 block to which it corresponds, which typically has happened a few minutes before the L2 block) and its serial number within that epoch.
4548
The first block of the epoch includes all the deposits that happened in the L1 block to which it corresponds.
46-
If the sequencer attempts to ignore a legitimate L1 transaction it ends up with a state that is inconsistent with the verifiers, same as if the sequencer tried to fake the state by other means.
49+
If the sequencer attempts to ignore a legitimate L1 transaction, it ends up with a state that is inconsistent with the verifiers, same as if the sequencer tried to fake the state by other means.
4750
This provides OP Mainnet with L1 Ethereum level censorship resistance.
4851
You can read more about this mechanism [in the protocol specifications](https://specs.optimism.io/protocol/derivation.html#deriving-the-transaction-list).
4952

50-
2. Transactions submitted directly to the sequencer.
51-
These transactions are a lot cheaper to submit, as they do not require the expense of a separate L1 transaction. However, they cannot be made censorship resistant since the sequencer is the only participant that knows about them.
52-
5353
For the moment, [The Optimism Foundation](https://www.optimism.io/) runs the only block producer on OP Mainnet. Refer to [Protocol specs](overview) section for more information about how we plan to decentralize the Sequencer role in the future.
5454

5555
## Block Execution
@@ -70,8 +70,8 @@ Optimism is designed so that users can send arbitrary messages between smart con
7070
This makes it possible to transfer ETH or tokens, including ERC20 tokens, between the two networks.
7171
The exact mechanism by which this communication occurs differs depending on the direction in which messages are being sent.
7272

73-
OP Mainnet uses this functionality in the Standard bridge to allow users to deposit tokens from Ethereum to OP Mainnet and also allow withdrawals of the same from OP Mainnet back to Ethereum.
74-
See the [developer documentation and examples](/builders/app-developers/bridging/standard-bridge) on details on the inner workings of the Standard bridge.
73+
OP Mainnet uses this functionality in the Standard bridge to allow users to deposit tokens from Ethereum to OP Mainnet and also allow withdrawals of the same tokens from OP Mainnet back to Ethereum.
74+
See the [developer documentation and examples](/builders/app-developers/bridging/standard-bridge) for details on the inner workings of the Standard bridge.
7575

7676
### Moving from Ethereum to OP Mainnet
7777

pages/stack/protocol/rollup/smart-contracts.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import { Callout } from 'nextra/components'
88

99
# Smart Contract Overview
1010

11-
This guide provides an overview of smart contract functionality
12-
for the smart contract components. You can also find [contract addresses](/chain/addresses) on OP Mainnet.
11+
This guide provides an overview of the functionality of the smart contract components. You can also find [contract addresses](/chain/addresses) on OP Mainnet.
1312

1413
## L1 contracts
1514

@@ -19,8 +18,8 @@ This contract enables a delay before a call is forwarded to a target contract,
1918
and during the delay period the call can be vetoed by the authorized vetoer.
2019
This contract does not support value transfers, only data is forwarded.
2120
Additionally, this contract cannot be used to forward calls with data beginning
22-
with the function selector of the queuedAt(bytes32) function. This is because
23-
of input validation checks which solidity performs at runtime on functions
21+
with the function selector of the `queuedAt(bytes32)` function. This is because
22+
of input validation checks performed by Solidity at runtime on functions
2423
which take an argument.
2524

2625
### [L1CrossDomainMessenger](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/L1CrossDomainMessenger.sol)
@@ -63,7 +62,7 @@ Users are encouraged to use the `L1CrossDomainMessenger` for a higher-level inte
6362

6463
### [ProtocolVersions](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/ProtocolVersions.sol)
6564

66-
The `ProtocolVersions` contract is used to manage superchain protocol version information.
65+
The `ProtocolVersions` contract is used to manage Superchain protocol version information.
6766

6867
### [ResourceMetering](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/ResourceMetering.sol)
6968

@@ -72,7 +71,7 @@ updates automatically based on current demand.
7271

7372
### [SuperchainConfig](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/SuperchainConfig.sol)
7473

75-
The `SuperchainConfig` contract is used to manage configuration of global superchain values.
74+
The `SuperchainConfig` contract is used to manage configuration of global Superchain values.
7675

7776
### [SystemConfig](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/L1/SystemConfig.sol)
7877

@@ -161,7 +160,7 @@ transaction processing and block production.
161160

162161
## Legacy Contracts
163162

164-
Those are legacy contracts from the old version of the OP Stack.
163+
These are legacy contracts from the old version of the OP Stack.
165164

166165
### [AddressManager](https://github.com/ethereum-optimism/optimism/blob/op-contracts/v1.3.0/packages/contracts-bedrock/src/legacy/AddressManager.sol)
167166

pages/stack/protocol/rollup/withdrawal-flow.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ In Optimism terminology, a *withdrawal* is a transaction sent from L2 (OP Mainne
1313
Withdrawals require the user to submit three transactions:
1414

1515
1. **Withdrawal initiating transaction**, which the user submits on L2.
16-
2. **Withdrawal proving transaction**, which the user submits on L1 to prove that the withdrawal is legitimate (based on a merkle patricia trie root that commits to the state of the `L2ToL1MessagePasser`'s storage on L2)
16+
2. **Withdrawal proving transaction**, which the user submits on L1 to prove that the withdrawal is legitimate (based on a Merkle-Patricia trie root that commits to the state of the `L2ToL1MessagePasser`'s storage on L2)
1717
3. **Withdrawal finalizing transaction**, which the user submits on L1 after the fault challenge period has passed, to actually run the transaction on L1.
1818

1919
<Callout type="info">
@@ -22,7 +22,7 @@ Withdrawals require the user to submit three transactions:
2222

2323
## Withdrawal initiating transaction
2424

25-
1. On L2 somebody (either an externally owned account (EOA) directly or a contract acting on behalf of an EOA) calls the [`sendMessage`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol#L249-L289) function of [`L2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol).
25+
1. On L2, a user, either an externally owned account (EOA) directly or a contract acting on behalf of an EOA, calls the [`sendMessage`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol#L249-L289) function of the [`L2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol) contract.
2626

2727
This function accepts three parameters:
2828

0 commit comments

Comments
 (0)