[FINAL] Upgrade Proposal #3: Delta Network Upgrade

Executive Summary

  • Test in Prod proposes Delta network upgrade, which activates Span Batches for OP Mainnet and all other OP Chains.
  • Span Batches implement a new batching specification that reduces L1 costs by ~97% for inactive chains (165 ETH → 5 ETH).
  • We expect Span Batches to derisk launching new OP Chains by meaningfully reducing L1 costs for inactive chains.

Hello! This is Test in Prod, one of the core development teams of Optimism Collective.

This is a proposal for the Delta network upgrade, which activates Span Batches. Span Batches is a new batching spec from Test in Prod, building upon initial designs by Protolambda.

Span Batches removes the overhead of the current batching specs by encoding consecutive L2 blocks into one batch. This leads to reducing L1 costs by ~97% for inactive chains, and 6%~11% for performant chains like OP Mainnet or Base Mainnet based on our backtesting results.

Span Batches will support the adoption of the OP Stack by meaningfully reducing L1 costs for OP Chains, therefore reducing the risks of launching new L2s with the OP Stack.

Technical Summary

Specification

This upgrade (“Delta”) contains a single consensus-layer feature, Span Batches. Please refer to the following documents for the technical information on Span Batches:

Security Considerations

The Span Batch is a consensus-critical feature. It is not required to undergo a security audit according to the OP Labs Audit Framework; Span Batches impacts liveness & reputational quadrant, instead of existential & safety parts in the rubrics of the Audit Framework—specifically derivation aside from deposits and batching. The Audit Framework doesn’t suggest audits in the liveness & reputational quadrant, but rather testing via progressive real-world usage.

The Span Batch doesn’t have changes on the state transitions, so there is no possibility that users’ states can change in an unintended way. In the worst case, some transactions could be omitted.

Therefore, Test in Prod went through the following steps to ensure the safety of this proposal, focusing on the liveness parts:

1) Security review with OP Labs

Test in Prod passed a security review with OP Labs. Since the Delta upgrade isn’t related to user assets, but instead implements a consensus upgrade, we focused on reviewing cases where the consensus could fail and built contingency plans for the failure. Please refer to the Contingency Plans section in the current proposal for detailed contingency plans.

Throughout the review, we figured that the Span Batch deployment would be less likely to impact Sequencer’s pre-confirming block production—the unsafe head progression; we expect end users to be less likely to be impacted in the majority of failure scenarios.

2) Ran verification script on Superchain Devnet & Testnets

Test in Prod prepared the verification script for Span Batches. The script checks the entire consensus process from posting batches on L1 to deriving L2 blocks from L1. It tests if there’s a consensus failure by detecting unsafe reorgs—ensuring nodes derive the same state that the Sequencer originally calculated before posting batches. Please refer to the Functionality Verification Guide for more details.

The verification script works as follows:

  • Send various types of transactions to the L2.
  • Record the transactions’ hashes & included unsafe blocks’ hashes.
  • Poll if the included blocks are consolidated to safe.
  • Compare recorded unsafe blocks’ hashes to safe blocks that include transactions.
    • If same, it’s a success!

3) E2E tests & unit tests

Test in Prod prepared the e2e tests & unit tests for Span Batches. They cover a wide range of scenarios and check if the code operates as intended. Here are Github PRs for e2e tests: #1 #2 #3

Impact Summary

Performance Impact

Span Batch saves more L1 fees than the current state of the OP Stack, and savings increase the less active the chain is. Therefore, Test in Prod expects more savings on L1 fees for less-active chains; we expect to save L1 fees by ~97% for low-throughput chains and 6%~11% for high-throughput chains like OP Mainnet or Base Mainnet.

Test in Prod backtested several OP Chains and prepared the expected L1 fee savings in %. Please refer to the Expected Result section in the Design Docs for the result.

User Impact

Delta doesn’t include any direct impact on the users’ side. Also, Test in Prod doesn’t expect downtime for the Delta upgrade.

Node Impact

Nodes will be unable to sync the chain if nodes don’t perform the software update until the op-batcher operator starts posting Span Batches. Thus, nodes are required to update software versions to keep in sync with the OP Chains.

Please refer to the Guides for Nodes section in the current proposal for the upgrade details.

Upgrade Details

After Delta hard fork, Span Batches submission won’t be activated automatically; the op-batcher operators should restart their instance with the Span Batches enabled. Therefore, even though Delta hard fork time passes, nothing will happen until the op-batcher operator explicitly starts posting batches in the Span Batch.

OP Chains can use (post & derive) both Singular Batches and Span Batches after the Delta hard fork.

Action Plans

Timeline (including finished items)

Test in Prod proposes 00:00:00 Feb 22, 2024, UTC for the Delta hard fork time—1707922800 in Unix Timestamp. It’s three weeks after Voting Cycle #17 ends, and two weeks after the Citizens’ House veto period.

The Delta upgrade has already been activated on op-goerli, op-sepolia, base-goerli, base-sepolia, pgn-sepolia, zora-sepolia, and Superchain Devnet (operated by OP Labs, Base, and Conduit).

Here’s the list of the timeline for Delta including finished items:

  • Superchain Devnet activation at 00:00:00, Dec 08, 2023 UTC.
  • Goerli Testnets activation at 00:00:00, Dec 21, 2023 UTC.
  • Sepolia Testnets activation at 00:00:00, Dec 22, 2023 UTC.
  • Voting results are final & start to notify upgrading nodes at 19:00:00, Jan 31, 2024 UTC.
    • Including the one-week veto period.
  • (Proposed) Mainnet activation at 00:00:00, Feb 22, 2024 UTC.
    • Appended one week due to the veto period.

Contingency Plans

Our contingency plans for the unexpected failure of the Delta upgrade are as follows: op-batcher disables posting Span Batches, start posting legacy batches (Singular Batches), prepare the fix, and enable Span Batches again. In this way, we expect the impact on the user side will be minimized while resolving the issues—the sequencer would continue pre-confirming blocks as normal, but batch submission would be halted until the op-batcher restarts to push Singular Batches.

However, if there’s an unexpected critical issue where we need nodes’ action, we have prepared a way for nodes to disable the upgrade by using --override.delta flag on op-node. Test in Prod will work with OP Labs to monitor, communicate, and alert relevant parties upon the upgrade in such cases.

Software versions

The code for the Delta upgrade is ready in the following Optimism monorepo hash: 54a7dbf8aa9b982f9c6a54cbbe448be41c0b7bc7.

Nodes can manually set the Delta hard fork time with the preceding code. However, nodes will not automatically activate Delta on Mainnet as the Delta hard fork time is not embedded in the code; it cannot be embedded since Delta has not yet been approved by governance.

If the governance approves the Delta hard fork and finalizes the hard fork time, Test in Prod will work with OP Labs to prepare the new release that embeds the Mainnet hard fork time and notify the community. With the new release, nodes won’t have to manually set the Delta hard fork time; but they will automatically activate the Delta upgrade.

The following versions are deployed in the testnets:

Guides for Node Operators

Node operators are required to upgrade the software versions. Please refer to the following guides:

Conclusion

This proposal outlines the Delta upgrade that includes Span Batches. This upgrade reduces the size overheads of the current specs in a significant step for less-active chains, and it leads to alleviating the risks of launching new OP Stack L2s.

By reducing the L1 fees and risks with the Delta upgrade, we expect to alleviate burdens for less-active chains, help easier adoptions of the OP Stack, and head one step forward to the Superchain future.

We don’t expect sequencer downtime for the Delta hard fork & activating Span Batches.

22 Likes

wowow

this is super exciting!

4 Likes

Does this need an audit? Or was that included in the security review by Labs?

Also, it would be helpful if a Labs representative can confirm when a contributor team goes through a step like a collaborative security review. Just as a standard process going forward.

4 Likes

Hi good question!

Per the rationale outlined here, we do not believe an audit is warranted for this change.

We worked with Test in Prod on Failure Modes Analysis (FMA), which outlined the various risks posed by the changes, identifies mitigations, and ensures we have a plan for recovery in the event of each failure mode.

1 Like

I am an Optimism delegate with sufficient voting power and I believe this proposal is ready to move to a vote.

2 Likes

I am an Optimism delegate with sufficient voting power and I believe this proposal is ready to move to a vote.

1 Like

Hey! It’s great to see this proposal posted in the forum.

For now, I have a quick question about this sentence, in the worst case, some transactions could be omitted: is this when the proposer generates and posts a new state root, right? The proposer would just ignore the batch -or a portion of it-?. Is this the case, or are we talking about another situation in particular?

3 Likes

Ok, we’re ready to see this get a vote. Yes, we’re a delegate with sufficient voting power.

1 Like

Hi Joxes! Thanks for the question.

No. This case refers to when the op-batcher has an unexpected bug where it omits some transactions.

The proposer cannot omit any portion of the batch.

Let us know if you have any more questions!

4 Likes

@testinprod_io Thank you!

I see; I want to make sure I understand the worst case impact on users and services. So, in this case, does the sequencer provide the confirmation, but the batcher not include the actual tx in the batch?

Thank you again.

1 Like

I am one of the Synthetix Ambassadors, and a Optimism Badgeholder. I am an Optimism delegate [Delegate Commitments - #65 by mastermojo ] with sufficient voting power, and I believe this proposal is ready to move to a vote.

2 Likes

Yes. That is correct.

The worst-case impact on users & services is the L1-confirmed block reorgs (safe block), which are triggered by various situations–for example, when the batcher omits a transaction.

It won’t halt the sequencer’s pre-confirmed block progression. That’s why we expect end users to be less likely to be impacted in the majority of failure scenarios.

Please let us know if you have any more questions! Happy to answer :slight_smile:

2 Likes

Thank you for clarifying @testinprod_io. I will come with more questions if necessary.

I am an Optimism delegate with sufficient voting power and I believe this proposal is ready to move to a vote.

2 Likes

I am an Optimism delegate with sufficient voting power and I believe this proposal is ready to move to a vote.

3 Likes

Correction: it’s a Sequencer’s pre-confirmed blocks reorgs—unsafe head.

2 Likes

when can delta upgrade apply to OP Mainnet after vote passed?PGN is going to close their network,hope we can push this to PGN before the close

1 Like

Hello! We are proposing the Mainnet activation at 00:00:00, Feb 22, 2024 UTC.

7 Likes

Lots of technical jargons, but this is a clean run-down proposal. Sad I am not a delegate with no voting right for now, but I love it.

1 Like

Voting FOR this proposal.

The presented information and worst-case scenarios explained in the proposal indicate that the implementation is ready for going forward.

As always, we encourage any consideration that may arise before the implementation to be promptly communicated.

2 Likes

Voting for this proposal after getting technical input from my Scalar colleague Jordan.

1 Like