ethereum-optimism / docs Goto Github PK
View Code? Open in Web Editor NEWOptimism Developer Docs
Home Page: https://docs.optimism.io
Optimism Developer Docs
Home Page: https://docs.optimism.io
https://linear.app/optimism/issue/DEVRL-923/low-level-explanation-of-the-bridge
This is an explanation at the same depth as https://community.optimism.io/docs/protocol/txn-flow/, pointing to individual lines of code where relevant.
add twitter to upper right corner (top nav) — Link to OPLabs account, not foundations
Create a modular CODEOWNERS file so the respective pods can make reviews to their domain expertise in the documentation.
overview page will need to be updated with links and overall refresh
https://community.optimism.io/docs/developers/bedrock/differences/ contains a lot of bedrock information. This information should also be distributed in the reference docs to make sure it is easily available when bedrock is old news.
Is your doc request related to a problem or existing docs? Please describe.
changelog.optimism.io is no longer maintained
Describe the documentation you'd like
Additional context
Add any other context or screenshots about the feature request here.
Is your doc request related to a problem or existing docs? Please describe.
simple-optimism-node
will not be maintained by OPLabs so we should include a docker setup guide in our docs.
Describe the documentation you'd like
Take the configs from https://github.com/ethereum-optimism/developer-support/issues/64 and create a docker node setup guide. It should include: mainnet/testnet & full/archive details.
Additional context
Add any other context or screenshots about the feature request here.
Is your doc request related to a problem or existing docs? Please describe.
Goerli is being deprecated soon, we want to advise people to spin up their op-stack on Sepolia.
Describe the documentation you'd like
Update the op-stack getting started guide to provide sepolia specific instructions.
Additional context
We really need to do this for all of our docs.
Is your doc request related to a problem or existing docs? Please describe.
Create a landing page for the new documentation website that directs users to certain areas of the documentation. (i.e. getting started, running a node, etc.)
Describe the documentation you'd like
This will reflect a similar landing page to https://community.optimism.io/
Additional context
Add any other context or screenshots about the feature request here.
Is your doc request related to a problem or existing docs? Please describe.
Feedback from the hackathon:
Describe the documentation you'd like
Add specs to the docs.
Additional context
Add any other context or screenshots about the feature request here.
guides/centralized exchanges — add troubleshooting guide with binance stuff, depositing to unsupported network
Dev infra will be able to help with this. We'll want to be able to export the granfa metrics configuration json and distribute that. We may need to find and replace the op k8s specific labels with more generic ones.
Is your doc request related to a problem or existing docs? Please describe.
from the superhack DX research it says (next steps slide):
Write deployment guides for Foundry, HardHat, Remix and audit to make sure they provide a “just works” experience.
Describe the documentation you'd like
This is referring to the current tutorials. But we are currently migrating docs to the new site, so we are recording this is an issue.
Additional context
Add any other context or screenshots about the feature request here.
getting started/overview page
Port all existing documentation into the new repository:
Additional context
While moving documentation over to the new repository, we should perform QA, and update outdated information.
Details about any changes made during the content migration can be found in this google sheet
check external links throughout docs and fix/remove broken links
Is your doc request related to a problem or existing docs? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the documentation you'd like
https://community.optimism.io/docs/developers/build/differences/#opcode-differences
Context: mds1/evm-diff#21
The COINBASE opcode returns the priority-fee recipient address of the L2 block, which is always the same, set to the SequencerFeeVault predeploy address. This may change in future upgrades.
The DIFFICULTY opcode was renamed to PREVRANDAO with EIP-4399, and post-Bedrock exposes the PREVRANDAO value of the latest L1 block (matching the L1 block exposed in the L1BlockInfo predeploy).
Additional context
Add any other context or screenshots about the feature request here.
A lot of newer OP Chains are considering fast bridges, so this new page (content below) will hopefully provide more guidance for this process while encouraging those teams to work with us.
--------page content-------
Fast bridges are typically implemented in 2 ways:
Liquidity bridges are typically used for vanilla ERC20s that are minted by the rollup standard bridge, hence require liquidity to bypass the 7-day withdrawal.
Messaging bridges, however, mint and burn with their own messaging mechanism. Today, that messaging mechanism is likely a validator set or multisig.
(Note: ETH on OP Stack rollups are currently only mintable by the standard bridge, which has a 7-day withdrawal and is secured by the fault proof. Fast ETH withdrawals are only achievable by liquidity bridges today.)
Some messaging bridge token standards require a wrapping / full migration of these tokens to switch on and off of their security model. In Optimism’s roadmap, we plan to decentralize through ZK-proofs, which will one day provide fast(er) bridging secured by proofs instead of multisigs. We would advise to be cautious with bridge token standards that require full migrations to switch mint and burn models.
Expanding from above, apart from bridge neutrality, adding a fast bridge today, also means adding its trust assumptions. For most messaging bridges, this means a validator set that signs off on cross-chain messages. Evaluate the security of each bridge by what parties can “sign off” on a message passed on the bridge, and how those parties are secured.
Though we don’t yet have a comprehensive view of how much each bridge costs, the cost of liquidity bridges is usually higher than messaging bridges, as maintaining liquidity isn’t free.
We’re committed to building multiple proofs for the Superchain (1 fault proof and [2 ZK validity proof RFPs in progress](ethereum-optimism/ecosystem-contributions#61)). This means that OP Chains will be secured by diverse proofs, and are less likely to fail because of implementation bugs. With the ZK validity proofs and ZK proving optimizations, one day OP Chain bridging can be fast and trustless.
In the meantime, we understand developers want fast bridging sooner. We’re working with the [Grants Council to kickstart cross chain research](https://twitter.com/OptimismGrants/status/1699504801644699772) today, aiming to start working with existing bridges toward a unifying interface, allowing an upgrade to our multi-proof architecture later, while unlocking fast bridging now.
remove discord and twitter/X links at top of all pages (links embedded in page)
Is your doc request related to a problem or existing docs? Please describe.
One of our users lost their ERC20s by directly sending them to a bridge implementation contract.
Describe the documentation you'd like
Create new user documentation around bridging tokens and ether with multisig (Safe) wallets.
Additional context
Add any other context or screenshots about the feature request here.
Is your doc request related to a problem or existing docs? Please describe.
A developer reported that there's not an EIP165 requirement to go from L1 to L2, but there is to go from L2 to L1. Their Ethereum Mainnet token is a vanilla ERC20, but their implementation on OP Mainnet is not.
Describe the documentation you'd like
Clarify the ERC20 requirements to use the standard bridge.
Additional context
https://github.com/ethereum-optimism/developer-support/issues/141
Potentially good feedback from a very confused user around fees: https://github.com/ethereum-optimism/developer-support/issues/158
rethink the fees x docs flow... potentially a "pick your own adventure" of how to estimate fees easily
Likely a bad idea to encourage anything other than let the wallet set it IMO (sort of best practice to share with devs). the moment app devs start setting it we lose less control to be able to provide a universal good experience
Likely @eth-optimism/fee-estimation until op-viem ships is the best way
Once devs have estimated the gas fee with our library, What is the recommended way to send the transaction with viem? Devs asked if they need to, "need to specify price/basefee/priority fee? or just send and pray?"
answer on viem transactions: One reason we went with ‘’’estimateFees’’’ is because it's an action that will exist on non op chains. On ethereum estimateFees would just do ‘’’gasPrice * gasUsed’’’ whille on OP chains it's ‘’’gasPrice * gasUsed + L1GasFee’’’ but from developer/user point of view they don't have to think about that they just call ‘’’viemClient.estimateFees()’’’
Other FAQs to address: wouldn’t devs likely send their transaction directly with an ‘’’eth_sendRawTransaction’’’? Likely abstracted away with a library like viem?
Tools (pages/tools)
tools/monitoring/block explorers page — remove tenderly because its a dev platform not a block explorer
tools/monitoring/overview - remove status page and gas price tracker
tools/monitoring/overview - remove dune analytics and put on own page
review PRs for other monitoring tools that have come in to add to docs
guides/wallet developers, add troubleshooting guide: users overpaying for priority fees and estimating gas correctly
"getting stared" (https://stack.optimism.io/docs/build/getting-started/#generate-some-keys) tutorial and looking to understand what separates the Sequencer from the Batcher. In the tutorial, the Sequencer address is never funded or used, only lists addresses for the batcher and the proposer.
0x6887246668a3b87F54DeB3b94Ba47a6f63F32985- "Optimism: Sequencer" (should be updated now to show “OP Mainnet Batcher” in Etherscan)
0x473300df21D047806A082244b417f96b32f13A33- "Optimism: State Root Proposer"
Docs clarification to make:
Sequencer includes txs from mempool into new blocks, and shares these blocks offchain. Has a P2P-Sequencer-Key to sign these blocks before gossiping them.
Batcher takes blocks from sequencer op-geth, packages the inputs into batch data, and submits them to the L1 inbox for others to reproduce. Uses a special L1 account, other data txs in the inbox are ignored by verifiers.
Verifiers take unsafe blocks from sequencer via p2p gossip, and then later verify (or reconstruct, if they never received the offchain blocks gossip) the L2 blocks. If any tx is invalid, the block input as a whole is ignored, and alternative block inputs are awaited. L1 inputs take precedence if the gossiped block data is not the same.
Proposer runs an archive verifier node (or is directly attached to sequencer) and monitors it. Every N blocks (after they are finalized w.r.t. irreversible inputs that are finalized on L1) it constructs an “output root”, a claim about the L2 state. This is then submitted to L1. The L1 contract validates the output root is submitted from a specific authorized proposer account. In the future, once we have fault proof tech live, this proposal process will be permissionless (and possibly part of the user withdrawal-flow responsibilities).
Future: challenger monitors the onchain L1 claims from the proposer and other challengers, and counter-claims when necessary, as part of the fault-proof bisection game.
Is it possible to Update guide with addresses of all accounts so users can observe the txn flow end-to-end? Note that the addresses of the batcher and proposer may change, to enable key-rotation.
The SystemConfig contract on L1 (OP Mainnet: https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290 ) is the source of truth for the batcher. But yes, 0x6887246668a3b87f54deb3b94ba47a6f63f32985 is the current batcher address (it can be read from the batcherHash attribute in the contract).
And the proposer is defined in the ouput oracle contract on L1 (OP Mainnet: https://etherscan.io/address/0xdfe97868233d1aa22e815a266982f2cf17685a27 ), from the PROPOSER attribute in the contract). And yes, 0x473300df21D047806A082244b417f96b32f13A33 is the current proposer.
The p2p sequencer key is not used onchain, only for offchain execution-payload (L2 block gossip data) signing. It can be found in the L1 SystemConfig as well.
Covalent's asking to have a docs page added. We told them we've paused doing this but will consider their page if we add ecosystem guides back in to the redesign.
Request from Slack:
Hope all's been well and congrats on all the new exciting developments on the OP stack recently!
I’m reaching out to see if we could add a Covalent reference page to your docs site which contains relevant info on our developer tools and support for the Optimism ecosystem.
I have attached the docs page we tailored for Optimism in Markdown Code below. Please let me know what'd be the best way to collaborate on this!
# Covalent Indexing and Querying API
[Covalent](https://www.covalenthq.com/?utm_source=optimism&utm_medium=partner-docs) is a hosted blockchain data solution providing access to historical and current on-chain data for [100+ supported blockchains](https://www.covalenthq.com/docs/networks/?utm_source=optimism&utm_medium=partner-docs), including [Optimism](https://www.covalenthq.com/docs/networks/optimism/?utm_source=optimism&utm_medium=partner-docs).
Covalent maintains a full archival copy of every supported blockchain, meaning every balance, transaction, log event, and NFT asset data is available from the genesis block. This data is available via:
1. [Unified API](#unified-api) - Incorporate blockchain data into your app with a familiar REST API
2. [Increment](#increment) - Create and embed custom charts with no-code analytics
**Use Covalent if you need:**
* Structured and enhanced on-chain data well beyond what you get from RPC providers
* Broad and deep multi-chain data at scale
* Enterprise-grade performance
> **[Sign up to start building on Optimism](https://www.covalenthq.com/platform/?utm_source=optimism&utm_medium=partner-docs)**
## Unified API
[![example-api-response-json](https://www.datocms-assets.com/86369/1686182768-example-api-response-json-optimism.png)](https://www.covalenthq.com/docs/api/balances/get-token-balances-for-address/?utm_source=optimism&utm_medium=partner-docs)
The Covalent API is RESTful and offers the following for blockchain:
| **Features**| |
|---|---|
| Response Formats | JSON, CSV |
| Real-Time Data Latency | 2 blocks |
| Batch Data Latency | 30 minutes |
| Supported Networks (`chainName`, `chainId`) | Mainnet: `optimism-mainnet`, `10` <br> Testnet: `optimism-goerli`, `420` |
| API Tiers | [Free tier](https://www.covalenthq.com/docs/unified-api/pricing/?utm_source=optimism&utm_medium=partner-docs#free-tier) <br> [Premium tier](https://www.covalenthq.com/docs/unified-api/pricing/?utm_source=optimism&utm_medium=partner-docs#premium-tier) |
| API Categories | [Balances](https://www.covalenthq.com/docs/api/balances/get-token-balances-for-address/?utm_source=optimism&utm_medium=partner-docs) <br> [NFTs](https://www.covalenthq.com/docs/api/nft/get-nfts-for-address/?utm_source=optimism&utm_medium=partner-docs) <br> [Transactions](https://www.covalenthq.com/docs/api/transactions/get-transactions-for-address/?utm_source=optimism&utm_medium=partner-docs) <br> [Security](https://www.covalenthq.com/docs/api/security/get-token-approvals-for-address/?utm_source=optimism&utm_medium=partner-docs) <br> [Log Events & Others](https://www.covalenthq.com/docs/api/base/get-log-events-by-contract-address/?utm_source=optimism&utm_medium=partner-docs)
### Get started
- [API Key](https://www.covalenthq.com/platform/?utm_source=optimism&utm_medium=partner-docs) - sign up for free
- [Quickstart](https://www.covalenthq.com/docs/unified-api/quickstart/?utm_source=optimism&utm_medium=partner-docs) - summary of key resources to get you building immediately on blockchain
- [API Reference](https://www.covalenthq.com/docs/api/?utm_source=optimism&utm_medium=partner-docs) - try all the endpoints directly from your browser
- [Guides](https://www.covalenthq.com/docs/unified-api/guides/?utm_source=optimism&utm_medium=partner-docs) - learn how to build dapps, fetch data and extend your Web3 knowledge
## Increment
[![example-increment-chart](https://www.datocms-assets.com/86369/1684974544-increment-example-partner-docs.png)](https://www.covalenthq.com/platform/increment/#/?utm_source=optimism&utm_medium=partner-docs)
Increment is a novel no-code charting and reporting tool powered by Covalent, revolutionizing how the Web3 space approaches analytics. Many analytics tools let you write SQL to create charts, but *Increment is the only one to encode business logic - Reach, Retention, and Revenue - into an SQL compiler that can write valid SQL for you.*
### Use cases
Increment can be used for:
- [Analyzing Blockchain Networks](https://www.covalenthq.com/docs/increment/data-models/chain-gdp/?utm_source=optimism&utm_medium=partner-docs)
- [Analyzing DEXs](https://www.covalenthq.com/docs/increment/data-models/swap-land/?utm_source=optimism&utm_medium=partner-docs)
- [Analyzing NFT Marketplaces](https://www.covalenthq.com/docs/increment/data-models/jpeg-analysis/?utm_source=optimism&utm_medium=partner-docs)
For example, click on the following table to get the latest number of active wallets, transactions and tokens by day, week, month or year for Optimism:
[![example-network-status-increment](https://www.datocms-assets.com/86369/1686100924-example_network_status_increment_general.png)](https://www.covalenthq.com/docs/networks/optimism/?utm_source=optimism&utm_medium=partner-docs#network-status)
### Get started
- [Increment](https://www.covalenthq.com/platform/increment/#/?utm_source=optimism&utm_medium=partner-docs) - login via the Covalent Platform
- [Docs](https://www.covalenthq.com/docs/increment/?utm_source=optimism&utm_medium=partner-docs) - learn how to use Increment to build dynamic, custom charts
- [Data Models Demo](https://www.covalenthq.com/docs/increment/data-models/model-intro/?utm_source=optimism&utm_medium=partner-docs) - build analytics in 3 clicks
- [Explore Models. Seek Alpha.](https://www.covalenthq.com/platform/increment/#/pages/covalent/chain-gdp/?utm_source=optimism&utm_medium=partner-docs) - browse all data models
- [Use Models. Become Alpha.](https://www.covalenthq.com/platform/increment/#/sql/query_b6c88fd8604f49d5920ca86fa7/?utm_source=optimism&utm_medium=partner-docs) - use a data model
-
What can OP Chains do or configure that wouldn’t break homogeneity?
Their specific ask is for CSR, but in general they’re asking for more clarity on what would / wouldn’t break compatibility
this question keeps coming up for multiple teams
right now anything that's execution (geth changes) and settlement (bridging, deriving, 7-day withdrawal) breaks compatibility
Where do OP Chains need to update info in OP Stack repo (eg. token list)
Base told them there are a “dozen places” that Base had to update and they’re trying to find out what all those places are
this might be an eng question but feels like low hanging fruit to have a list to share with OP Chains
devX has a project that seeks to automate this! we'll start by compiling a list first, but on our minds
Super rough list: chainlist, ethers/viem, OP SDK, wallets (Metamask especially), various configs (superchain-registry to start)
Can we have some kind of bridge shared liquidity pool for OP Chains?
They are talking to teams like Hop but need to front liquidity. If there were a shared liquidity pool, it would reduce costs for fronting the liquidity
They are excited about LayerSwap bc they jumped on building out L2 to L2 bridging
The solution here is likely not exactly what people are thinking of. We'd want to be careful with the design and how we pay for that liquidity!
Stablecoin availability?
current thinking around this: either we create L2 to L2 messaging and they integrate with 1 hub chain (e.g OP Mainnet)
Or they integrate a seamless wrapped version that they own and can easily migrate once they deploy native. They said the Law of Chains is a blocker for this.
Is CSR something that has to be breaking protocol level changes?
devs can implement CSR out of protocol! there's a tweet around how (can find if it's helpful); this is a hackathon submission [https://ethglobal.com/showcase/shadow-rollup-k712d] implementing it in a slightly different way
this thread on CSR that would require an L3 on PGN? https://twitter.com/kelvinfichter/status/1624975097537654786
can reimburse periodically or “manual” reimbursement, may be cumbersome with scale
Per Superchain UXR, finding faucets is still a major pain point. We can improve this by placing faucets, in particular the Superchain Faucet, more front and center.
“For testnet we went with [Polygon] Mumbai because getting testnet tokens is super easy. And in my opinion, getting testnet tokens is actually like a big point of friction. So it just made sense to go with a chain that has like a tried and and true faucet.” - Dan, Blocksocks
“We were working on building an app on testnet but I just couldn't find the faucet easily.” - Kiru
Add Superchain Faucet callout on the docs site homepage. Begin measuring conversion and traffic to the faucet. Evaluate 2-3 additional low hanging fruit ways we can surface this.
Request via Vivian:
An onramp provider is adding ETH, , OP, USDC and USDT on OP to MetaMask.
They are asking for the verified contract address for all the tokens on OP Mainnet to do this.
( I feel like there’s a docs or github for this but I can’t seem to locate)
Answer via Proto:
All the data is in the token-list: https://github.com/ethereum-optimism/ethereum-optimism.github.io/tree/master/data
ETH is a special case: it's the native network currency, not a token.
There's WETH if they're looking for the ETH ERC20 wrapper.
The token list in general seems under-documented, so once there is bandwidth this should fend off a few Partner tickets per month.
A key finding of Superhack UXR was that developers found live support timely, but first would look for self service options to unblock themselves.
Rather than reaching out to live support, most developers tried to run down their errors by:
This proposal is for finding an automation or pattern that makes documenting, updating, and finding error messages easier.
Context from @roninjin10 :
It's hard. One of those things you need to think about up front and commit to to make wwork. Viem has a really good pattern https://viem.sh/docs/glossary/errors.html
When porting these tutorials we need to do QA that they're working as intended, updated for Bedrock, and the rpc provider is generalized.
https://github.com/ethereum-optimism/optimism-tutorial
Rework Resources section of docs
RPC Documentation for the following:
op-node:
1. optimism
namespace
1. Code: https://github.com/ethereum-optimism/optimism/blob/develop/op-node/node/api.go
2. Methods: optimism_syncStatus
, optimism_rollupConfig
, optimism_version
2. opp2p
namespace
1. Code/methods: see the API interface struct (each interface method translates to an RPC method that is prefixed with opp2p_
, and the first character after that is lower-case). https://github.com/ethereum-optimism/optimism/blob/c5732fc5c2da965066249a4eade6c4999e56f310/op-node/p2p/rpc_api.go#L44
3. admin
namespace
1. Code: https://github.com/ethereum-optimism/optimism/blob/develop/op-node/node/api.go
2. Methods: admin_resetDerivationPipeline
, admin_startSequencer
, admin_stopSequencer
, admin_sequencerActive
security/privileged roles needs to be updated for OP Sepolia https://docs.optimism.io/security/privileged-roles
glossary - pull in the glossary from
When we create the Glossary
page, add the following terms as outlined in the Product Naming Conventions doc.
Note that these will need to be adjusted to be public-facing. For instance, much of the Superchain definition probably should not be included.
No deadline set but once we do add the glossary, these will fit well there.
Additional context
Legal should review this before it goes live.
Is your doc request related to a problem or existing docs? Please describe.
Via PGN:
Describe the documentation you'd like
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.