You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/chain/differences.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ In all other cases, the transaction sender address is set according to the same
52
52
53
53
### Transaction Fees
54
54
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.
56
56
Refer to the guide on [OP Mainnet Transaction Fees](/stack/transactions/fees) for more information.
Copy file name to clipboardExpand all lines: pages/stack/design-principles.mdx
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,5 +115,4 @@ Extensibility is a key design principle that unlocks the superpower of collabora
115
115
116
116
The OP Stack is a decentralized software stack that anyone can contribute to.
117
117
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?
Copy file name to clipboardExpand all lines: pages/stack/differences.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ In all other cases, the transaction sender address is set according to the same
52
52
53
53
### Transaction Fees
54
54
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.
56
56
Refer to the guide on [OP Stack Transaction Fees](/stack/transactions/fees) for more information.
Copy file name to clipboardExpand all lines: pages/stack/protocol/outages.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Users may observe that the network appears to be "stuck" at a particular block h
35
35
### Mitigation
36
36
37
37
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.
Copy file name to clipboardExpand all lines: pages/stack/protocol/rollup/deposit-flow.mdx
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,7 @@ Information is encapsulated in lower layer packets on the sending side and then
23
23
24
24
*`_target`, target address on L2.
25
25
*`_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`.
28
27
29
28
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).
30
29
It uses these parameters:
@@ -52,15 +51,15 @@ Information is encapsulated in lower layer packets on the sending side and then
52
51
53
52
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).
54
53
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).
56
55
57
56
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).
58
57
59
58
## Denial of service (DoS) prevention
60
59
61
60
As with all other L1 transactions, the L1 costs of a deposit are borne by the transaction's originator.
62
61
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.
64
63
65
64
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.
66
65
[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:
74
73
* Not enough gas provided.
75
74
* The state on L2 does not allow the transaction to be successful.
76
75
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.
78
77
79
78
### Replays in action
80
79
@@ -124,7 +123,7 @@ To see how replays work, you can use [this contract on OP Sepolia](https://sepol
124
123
125
124
5. The next step is to find the hash of the failed relay.
126
125
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.
128
127
129
128
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.
130
129
@@ -185,10 +184,9 @@ To see how replays work, you can use [this contract on OP Sepolia](https://sepol
185
184
186
185
## Debugging
187
186
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.
189
188
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.
192
190
193
191
2. To check if the message is listed as failed, run this:
Copy file name to clipboardExpand all lines: pages/stack/protocol/rollup/overview.mdx
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,20 +36,20 @@ Optimism block production is primarily managed by a single party, called the "se
36
36
* Submitting user transactions to L1.
37
37
38
38
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.
40
40
41
41
Transactions get to the sequencer in two ways:
42
42
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.
44
47
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.
45
48
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.
47
50
This provides OP Mainnet with L1 Ethereum level censorship resistance.
48
51
You can read more about this mechanism [in the protocol specifications](https://specs.optimism.io/protocol/derivation.html#deriving-the-transaction-list).
49
52
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
-
53
53
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.
54
54
55
55
## Block Execution
@@ -70,8 +70,8 @@ Optimism is designed so that users can send arbitrary messages between smart con
70
70
This makes it possible to transfer ETH or tokens, including ERC20 tokens, between the two networks.
71
71
The exact mechanism by which this communication occurs differs depending on the direction in which messages are being sent.
72
72
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.
Copy file name to clipboardExpand all lines: pages/stack/protocol/rollup/smart-contracts.mdx
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,7 @@ import { Callout } from 'nextra/components'
8
8
9
9
# Smart Contract Overview
10
10
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.
13
12
14
13
## L1 contracts
15
14
@@ -19,8 +18,8 @@ This contract enables a delay before a call is forwarded to a target contract,
19
18
and during the delay period the call can be vetoed by the authorized vetoer.
20
19
This contract does not support value transfers, only data is forwarded.
21
20
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
Copy file name to clipboardExpand all lines: pages/stack/protocol/rollup/withdrawal-flow.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ In Optimism terminology, a *withdrawal* is a transaction sent from L2 (OP Mainne
13
13
Withdrawals require the user to submit three transactions:
14
14
15
15
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)
17
17
3.**Withdrawal finalizing transaction**, which the user submits on L1 after the fault challenge period has passed, to actually run the transaction on L1.
18
18
19
19
<Callouttype="info">
@@ -22,7 +22,7 @@ Withdrawals require the user to submit three transactions:
22
22
23
23
## Withdrawal initiating transaction
24
24
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.
0 commit comments