Commit b7087214 authored by norswap's avatar norswap Committed by GitHub

spec: derivation spec rework (#2855)

* batch derivation spec draft

* add diagrams, fix recovery-from-reorg wording

* update spec to cover channel ID timestamp

* specs: update batch derivation diagrams

* simplified overview draft + greatly expand glossary

* section on batch submission an encoding

* stages explanation

* edit resetting part of the spec

* rework pipeline description (& more)

* incorporate review feedback

* recover lost change

* rework payload attributes derivation section

* specs: toc fix

* specs: misc lint fixes

* specs/meta: toc fix
Co-authored-by: default avatarprotolambda <proto@protolambda.com>
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent aa707a47
This diff is collapsed.
This diff is collapsed.
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** **Table of Contents**
- [Standard Bridges](#standard-bridges) - [Token Depositing](#token-depositing)
- [Token Depositing](#token-depositing) - [Upgradability](#upgradability)
- [Upgradability](#upgradability)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
......
...@@ -22,22 +22,21 @@ with the authorization and validation conditions on L2. ...@@ -22,22 +22,21 @@ with the authorization and validation conditions on L2.
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** **Table of Contents**
- [Deposits](#deposits) - [The Deposited Transaction Type](#the-deposited-transaction-type)
- [The Deposited Transaction Type](#the-deposited-transaction-type) - [Source hash computation](#source-hash-computation)
- [Source hash computation](#source-hash-computation) - [Kinds of Deposited Transactions](#kinds-of-deposited-transactions)
- [Kinds of Deposited Transactions](#kinds-of-deposited-transactions) - [Validation and Authorization of Deposited Transactions](#validation-and-authorization-of-deposited-transactions)
- [Validation and Authorization of Deposited Transactions](#validation-and-authorization-of-deposited-transactions) - [Execution](#execution)
- [Execution](#execution) - [Nonce Handling](#nonce-handling)
- [Nonce Handling](#nonce-handling) - [L1 Attributes Deposited Transaction](#l1-attributes-deposited-transaction)
- [L1 Attributes Deposited Transaction](#l1-attributes-deposited-transaction) - [Special Accounts on L2](#special-accounts-on-l2)
- [Special Accounts on L2](#special-accounts-on-l2) - [L1 Attributes Depositor Account](#l1-attributes-depositor-account)
- [L1 Attributes Depositor Account](#l1-attributes-depositor-account) - [L1 Attributes Predeployed Contract](#l1-attributes-predeployed-contract)
- [L1 Attributes Predeployed Contract](#l1-attributes-predeployed-contract) - [L1 Attributes Predeployed Contract: Reference Implementation](#l1-attributes-predeployed-contract-reference-implementation)
- [L1 Attributes Predeployed Contract: Reference Implementation](#l1-attributes-predeployed-contract-reference-implementation) - [User-Deposited Transactions](#user-deposited-transactions)
- [User-Deposited Transactions](#user-deposited-transactions) - [Deposit Contract](#deposit-contract)
- [Deposit Contract](#deposit-contract) - [Address Aliasing](#address-aliasing)
- [Address Aliasing](#address-aliasing) - [Deposit Feed Contract: Reference Implementation](#deposit-feed-contract-reference-implementation)
- [Deposit Feed Contract: Reference Implementation](#deposit-feed-contract-reference-implementation)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
......
This diff is collapsed.
...@@ -4,18 +4,17 @@ ...@@ -4,18 +4,17 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** **Table of Contents**
- [L2 Execution Engine](#l2-execution-engine) - [Deposited transaction processing](#deposited-transaction-processing)
- [Deposited transaction processing](#deposited-transaction-processing) - [Deposited transaction boundaries](#deposited-transaction-boundaries)
- [Deposited transaction boundaries](#deposited-transaction-boundaries) - [Engine API](#engine-api)
- [Engine API](#engine-api) - [`engine_forkchoiceUpdatedV1`](#engine_forkchoiceupdatedv1)
- [`engine_forkchoiceUpdatedV1`](#engine_forkchoiceupdatedv1) - [Extended PayloadAttributesV1](#extended-payloadattributesv1)
- [Extended PayloadAttributesV1](#extended-payloadattributesv1) - [`engine_newPayloadV1`](#engine_newpayloadv1)
- [`engine_newPayloadV1`](#engine_newpayloadv1) - [`engine_getPayloadV1`](#engine_getpayloadv1)
- [`engine_getPayloadV1`](#engine_getpayloadv1) - [Networking](#networking)
- [Networking](#networking) - [Sync](#sync)
- [Sync](#sync) - [Happy-path sync](#happy-path-sync)
- [Happy-path sync](#happy-path-sync) - [Worst-case sync](#worst-case-sync)
- [Worst-case sync](#worst-case-sync)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
......
This diff is collapsed.
...@@ -4,10 +4,9 @@ ...@@ -4,10 +4,9 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** **Table of Contents**
- [Guaranteed Gas Fee Market](#guaranteed-gas-fee-market) - [Gas Stipend](#gas-stipend)
- [Gas Stipend](#gas-stipend) - [Limiting Guaranteed Gas](#limiting-guaranteed-gas)
- [Limiting Guaranteed Gas](#limiting-guaranteed-gas) - [Rationale for burning L1 Gas](#rationale-for-burning-l1-gas)
- [Rationale for burning L1 Gas](#rationale-for-burning-l1-gas)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
......
...@@ -4,21 +4,20 @@ ...@@ -4,21 +4,20 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** **Table of Contents**
- [Introduction](#introduction) - [Foundations](#foundations)
- [Foundations](#foundations) - [What is Ethereum scalability?](#what-is-ethereum-scalability)
- [What is Ethereum scalability?](#what-is-ethereum-scalability) - [What is an Optimistic Rollup?](#what-is-an-optimistic-rollup)
- [What is an Optimistic Rollup?](#what-is-an-optimistic-rollup) - [What is EVM Equivalence?](#what-is-evm-equivalence)
- [What is EVM Equivalence?](#what-is-evm-equivalence) - [🎶 All together now 🎶](#-all-together-now-)
- [🎶 All together now 🎶](#-all-together-now-) - [Protocol Guarantees](#protocol-guarantees)
- [Protocol Guarantees](#protocol-guarantees) - [Network Participants](#network-participants)
- [Network Participants](#network-participants) - [Users](#users)
- [Users](#users) - [Sequencers](#sequencers)
- [Sequencers](#sequencers) - [Verifiers](#verifiers)
- [Verifiers](#verifiers) - [Key Interaction Diagrams](#key-interaction-diagrams)
- [Key Interaction Diagrams](#key-interaction-diagrams) - [Depositing and Sending Transactions](#depositing-and-sending-transactions)
- [Depositing and Sending Transactions](#depositing-and-sending-transactions) - [Withdrawing](#withdrawing)
- [Withdrawing](#withdrawing) - [Next Steps](#next-steps)
- [Next Steps](#next-steps)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
......
...@@ -4,13 +4,12 @@ ...@@ -4,13 +4,12 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** **Table of Contents**
- [Cross Domain Messengers](#cross-domain-messengers) - [Message Passing](#message-passing)
- [Message Passing](#message-passing) - [Upgradability](#upgradability)
- [Upgradability](#upgradability) - [Message Versioning](#message-versioning)
- [Message Versioning](#message-versioning) - [Message Version 0](#message-version-0)
- [Message Version 0](#message-version-0) - [Message Version 1](#message-version-1)
- [Message Version 1](#message-version-1) - [Backwards Compatibility Notes](#backwards-compatibility-notes)
- [Backwards Compatibility Notes](#backwards-compatibility-notes)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
......
# Bedrock Local Devnet Setup # Bedrock Local Devnet Setup
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**
- [Bedrock Local Devnet Setup](#bedrock-local-devnet-setup)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
You can spin up a local devnet via `docker-compose`. You can spin up a local devnet via `docker-compose`.
For convenience, we have defined `make` targets to start and stop the devnet with a single command. For convenience, we have defined `make` targets to start and stop the devnet with a single command.
To run the devnet, you will need `docker` and `docker-compose` installed. To run the devnet, you will need `docker` and `docker-compose` installed.
......
# Versioning # Versioning
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**
- [Go modules](#go-modules)
- [versioning process](#versioning-process)
- [Typescript](#typescript)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Go modules ## Go modules
Go modules that are currently versioned: Go modules that are currently versioned:
......
...@@ -4,19 +4,18 @@ ...@@ -4,19 +4,18 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** **Table of Contents**
- [Optimism Overview](#optimism-overview) - [Architecture Design Goals](#architecture-design-goals)
- [Architecture Design Goals](#architecture-design-goals) - [Components](#components)
- [Components](#components) - [L1 Components](#l1-components)
- [L1 Components](#l1-components) - [L2 Components](#l2-components)
- [L2 Components](#l2-components) - [Transaction/Block Propagation](#transactionblock-propagation)
- [Transaction/Block Propagation](#transactionblock-propagation) - [Key Interactions In Depth](#key-interactions-in-depth)
- [Key Interactions In Depth](#key-interactions-in-depth) - [Deposits](#deposits)
- [Deposits](#deposits) - [Block Derivation](#block-derivation)
- [Block Derivation](#block-derivation) - [Overview](#overview)
- [Overview](#overview) - [Epochs and the Sequencing Window](#epochs-and-the-sequencing-window)
- [Epochs and the Sequencing Window](#epochs-and-the-sequencing-window) - [Block Derivation Loop](#block-derivation-loop)
- [Block Derivation Loop](#block-derivation-loop) - [Engine API](#engine-api)
- [Engine API](#engine-api)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
......
...@@ -4,21 +4,20 @@ ...@@ -4,21 +4,20 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** **Table of Contents**
- [Predeploys](#predeploys) - [Overview](#overview)
- [Overview](#overview) - [OVM\_L2ToL1MessagePasser](#ovm%5C_l2tol1messagepasser)
- [OVM\_L2ToL1MessagePasser](#ovm_l2tol1messagepasser) - [OVM\_DeployerWhitelist](#ovm%5C_deployerwhitelist)
- [OVM\_DeployerWhitelist](#ovm_deployerwhitelist) - [OVM\_ETH](#ovm%5C_eth)
- [OVM\_ETH](#ovm_eth) - [WETH9](#weth9)
- [WETH9](#weth9) - [L2CrossDomainMessenger](#l2crossdomainmessenger)
- [L2CrossDomainMessenger](#l2crossdomainmessenger) - [L2StandardBridge](#l2standardbridge)
- [L2StandardBridge](#l2standardbridge) - [SequencerFeeVault](#sequencerfeevault)
- [SequencerFeeVault](#sequencerfeevault) - [OptimismMintableERC20Factory](#optimismmintableerc20factory)
- [OptimismMintableERC20Factory](#OptimismMintableERC20Factory) - [L1BlockNumber](#l1blocknumber)
- [L1BlockNumber](#l1blocknumber) - [OVM\_GasPriceOracle](#ovm%5C_gaspriceoracle)
- [OVM\_GasPriceOracle](#ovm_gaspriceoracle) - [Reserved System Address 1](#reserved-system-address-1)
- [Reserved System Address 1](#reserved-system-address-1) - [Reserved System Address 2](#reserved-system-address-2)
- [Reserved System Address 2](#reserved-system-address-2) - [L1Block](#l1block)
- [L1Block](#l1block)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
......
...@@ -9,14 +9,13 @@ ...@@ -9,14 +9,13 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** **Table of Contents**
- [L2 Output Root Proposals Specification](#l2-output-root-proposals-specification) - [Proposing L2 Output Commitments](#proposing-l2-output-commitments)
- [Proposing L2 Output Commitments](#proposing-l2-output-commitments) - [L2 Output Commitment Construction](#l2-output-commitment-construction)
- [L2 Output Commitment Construction](#l2-output-commitment-construction) - [L2 Output Oracle Smart Contract](#l2-output-oracle-smart-contract)
- [L2 Output Oracle Smart Contract](#l2-output-oracle-smart-contract) - [Security Considerations](#security-considerations)
- [Security Considerations](#security-considerations) - [L1 Reorgs](#l1-reorgs)
- [L1 Reorgs](#l1-reorgs) - [Summary of Definitions](#summary-of-definitions)
- [Summary of Definitions](#summary-of-definitions) - [Constants](#constants)
- [Constants](#constants)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
......
...@@ -29,35 +29,34 @@ and are adopted by several other blockchains, most notably the [L1 consensus lay ...@@ -29,35 +29,34 @@ and are adopted by several other blockchains, most notably the [L1 consensus lay
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** **Table of Contents**
- [Rollup-node P2P interface](#rollup-node-p2p-interface) - [P2P configuration](#p2p-configuration)
- [P2P configuration](#p2p-configuration) - [Identification](#identification)
- [Identification](#identification) - [Discv5](#discv5)
- [Discv5](#discv5) - [Structure](#structure)
- [Structure](#structure) - [LibP2P](#libp2p)
- [LibP2P](#libp2p) - [Transport](#transport)
- [Transport](#transport) - [Dialing](#dialing)
- [Dialing](#dialing) - [NAT](#nat)
- [NAT](#nat) - [Peer management](#peer-management)
- [Peer management](#peer-management) - [Transport security](#transport-security)
- [Transport security](#transport-security) - [Protocol negotiation](#protocol-negotiation)
- [Protocol negotiation](#protocol-negotiation) - [Identify](#identify)
- [Identify](#identify) - [Ping](#ping)
- [Ping](#ping) - [Multiplexing](#multiplexing)
- [Multiplexing](#multiplexing) - [GossipSub](#gossipsub)
- [GossipSub](#gossipsub) - [Content-based message identification](#content-based-message-identification)
- [Content-based message identification](#content-based-message-identification) - [Message compression and limits](#message-compression-and-limits)
- [Message compression and limits](#message-compression-and-limits) - [Message ID computation](#message-id-computation)
- [Message ID computation](#message-id-computation) - [Heartbeat and parameters](#heartbeat-and-parameters)
- [Heartbeat and parameters](#heartbeat-and-parameters) - [Topic configuration](#topic-configuration)
- [Topic configuration](#topic-configuration) - [Topic validation](#topic-validation)
- [Topic validation](#topic-validation) - [Gossip Topics](#gossip-topics)
- [Gossip Topics](#gossip-topics) - [`blocks`](#blocks)
- [`blocks`](#blocks) - [Block encoding](#block-encoding)
- [Block encoding](#block-encoding) - [Block signatures](#block-signatures)
- [Block signatures](#block-signatures) - [Block validation](#block-validation)
- [Block validation](#block-validation) - [Block processing](#block-processing)
- [Block processing](#block-processing) - [Block topic scoring parameters](#block-topic-scoring-parameters)
- [Block topic scoring parameters](#block-topic-scoring-parameters)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
......
This diff is collapsed.
...@@ -33,19 +33,18 @@ finalization. ...@@ -33,19 +33,18 @@ finalization.
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** **Table of Contents**
- [Withdrawals](#withdrawals) - [Withdrawal Flow](#withdrawal-flow)
- [Withdrawal Flow](#withdrawal-flow) - [On L2](#on-l2)
- [On L2](#on-l2) - [On L1](#on-l1)
- [On L1](#on-l1) - [The L2ToL1MessagePasser Contract](#the-l2tol1messagepasser-contract)
- [The L2ToL1MessagePasser Contract](#the-l2tol1messagepasser-contract) - [Addresses are not Aliased on Withdrawals](#addresses-are-not-aliased-on-withdrawals)
- [Addresses are not Aliased on Withdrawals](#addresses-are-not-aliased-on-withdrawals) - [The Optimism Portal Contract](#the-optimism-portal-contract)
- [The Optimism Portal Contract](#the-optimism-portal-contract) - [Withdrawal Verification and Finalization](#withdrawal-verification-and-finalization)
- [Withdrawal Verification and Finalization](#withdrawal-verification-and-finalization) - [Security Considerations](#security-considerations)
- [Security Considerations](#security-considerations) - [Key Properties of Withdrawal Verification](#key-properties-of-withdrawal-verification)
- [Key Properties of Withdrawal Verification](#key-properties-of-withdrawal-verification) - [Handling Successfully Verified Messages That Fail When Relayed](#handling-successfully-verified-messages-that-fail-when-relayed)
- [Handling Successfully Verified Messages That Fail When Relayed](#handling-successfully-verified-messages-that-fail-when-relayed) - [Summary of Definitions](#summary-of-definitions)
- [Summary of Definitions](#summary-of-definitions) - [Constants](#constants)
- [Constants](#constants)
<!-- END doctoc generated TOC please keep comment here to allow auto update --> <!-- END doctoc generated TOC please keep comment here to allow auto update -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment