diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..4c0f628973 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,35 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# Matches multiple files with brace expansion notation +# Set default charset +[*.{js,py}] +charset = utf-8 + +# 4 space indentation +[*.py] +indent_style = space +indent_size = 4 + +# Tab indentation (no size specified) +[Makefile] +indent_style = tab + +# Indentation override for all JS under lib directory +[lib/**.js] +indent_style = space +indent_size = 2 + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 + +trim_trailing_whitespace=true diff --git a/arbitrum-docs/arbos/l1-to-l2-messaging.mdx b/arbitrum-docs/arbos/l1-to-l2-messaging.mdx index 6ddcd56798..3b9655084c 100644 --- a/arbitrum-docs/arbos/l1-to-l2-messaging.mdx +++ b/arbitrum-docs/arbos/l1-to-l2-messaging.mdx @@ -27,17 +27,17 @@ Here we walk through the different stages of the lifecycle of a retryable ticket 1. Creating a retryable ticket is initiated with a call (direct or internal) to the `createRetryableTicket` function of the [`inbox` contract][inbox_link]. A ticket is guaranteed to be created if this call succeeds. Here, we describe parameters that need to be carefully set. Note that, this function forces the sender to provide a _reasonable_ amount of funds (at least enough to submitting, and _attempting_ to executing the ticket), but that doesn't guarantee a successful auto-redemption. -| Parameter | Description | -| :------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -| `l1CallValue (also referred to as deposit)` | Not a real function parameter, it is rather the callValue that is sent along with the transaction | -| `address to` | The destination L2 address | -| `uint256 l2CallValue` | The callvalue for retryable L2 message that is supplied within the deposit (l1CallValue) | -| `uint256 maxSubmissionCost` | The maximum amount of ETH to be paid for submitting the ticket. This amount is (1) supplied within the deposit (l1CallValue) to be later deducted from sender's L2 balance and is (2) directly proportional to the size of the retryable’s data and L1 basefee | -| `address excessFeeRefundAddress` | The unused gas cost and submssion cost will deposit to this address, formula is: `(gasLimit x maxFeePerGas - execution cost) + (maxSubmission - (autoredeem ? 0 : submission cost))`. (Note: excess deposit will transfer to the alias address of the parent chain tx's `msg.sender` rather than this address) | | -| `address callValueRefundAddress` | The L2 address to which the l2CallValue is credited if the ticket times out or gets cancelled (this is also called the `beneficiary`, who's got a critical permission to cancel the ticket) | -| `uint256 gasLimit` | Maximum amount of gas used to cover L2 execution of the ticket | -| `uint256 maxFeePerGas` | The gas price bid for L2 execution of the ticket that is supplied within the deposit (l1CallValue) | -| `bytes calldata data` | The calldata to the destination L2 address | +``` +- `l1CallValue (also referred to as deposit)`: Not a real function parameter, it is rather the callValue that is sent along with the transaction +- `address to`: The destination L2 address +- `uint256 l2CallValue`: The callvalue for retryable L2 message that is supplied within the deposit (l1CallValue) +- `uint256 maxSubmissionCost`: The maximum amount of ETH to be paid for submitting the ticket. This amount is (1) supplied within the deposit (l1CallValue) to be later deducted from sender's L2 balance and is (2) directly proportional to the size of the retryable’s data and L1 basefee +- `address excessFeeRefundAddress`: The L2 address to which the excess fee is credited (l1CallValue - (autoredeem ? ticket execution cost : submission cost) - l2CallValue) +- `address callValueRefundAddress`: The L2 address to which the l2CallValue is credited if the ticket times out or gets cancelled (this is also called the `beneficiary`, who's got a critical permission to cancel the ticket) +- `uint256 gasLimit`: Maximum amount of gas used to cover L2 execution of the ticket +- `uint256 maxFeePerGas`: The gas price bid for L2 execution of the ticket that is supplied within the deposit (l1CallValue) +- `bytes calldata data`: The calldata to the destination L2 address +``` 2. Sender's deposit must be enough to make the L1 submission succeed and for the L2 execution to be _attempted_. If provided correctly, a new ticket with a unique `TicketID` is created and added to retryable buffer. Also, funds (`submissionCost` + `l2CallValue`) are deducted from the sender and placed into the escrow for later use in redeeming the ticket. diff --git a/arbitrum-docs/arbitrum-bridge/images/getting_started_users_1.png b/arbitrum-docs/assets/getting_started_users_1.png similarity index 100% rename from arbitrum-docs/arbitrum-bridge/images/getting_started_users_1.png rename to arbitrum-docs/assets/getting_started_users_1.png diff --git a/arbitrum-docs/arbitrum-bridge/images/getting_started_users_2.png b/arbitrum-docs/assets/getting_started_users_2.png similarity index 100% rename from arbitrum-docs/arbitrum-bridge/images/getting_started_users_2.png rename to arbitrum-docs/assets/getting_started_users_2.png diff --git a/arbitrum-docs/arbitrum-bridge/images/getting_started_users_3.png b/arbitrum-docs/assets/getting_started_users_3.png similarity index 100% rename from arbitrum-docs/arbitrum-bridge/images/getting_started_users_3.png rename to arbitrum-docs/assets/getting_started_users_3.png diff --git a/arbitrum-docs/arbitrum-bridge/images/getting_started_users_4.png b/arbitrum-docs/assets/getting_started_users_4.png similarity index 100% rename from arbitrum-docs/arbitrum-bridge/images/getting_started_users_4.png rename to arbitrum-docs/assets/getting_started_users_4.png diff --git a/arbitrum-docs/arbitrum-bridge/images/getting_started_users_5.png b/arbitrum-docs/assets/getting_started_users_5.png similarity index 100% rename from arbitrum-docs/arbitrum-bridge/images/getting_started_users_5.png rename to arbitrum-docs/assets/getting_started_users_5.png diff --git a/arbitrum-docs/arbitrum-bridge/images/getting_started_users_6.png b/arbitrum-docs/assets/getting_started_users_6.png similarity index 100% rename from arbitrum-docs/arbitrum-bridge/images/getting_started_users_6.png rename to arbitrum-docs/assets/getting_started_users_6.png diff --git a/arbitrum-docs/arbitrum-bridge/images/getting_started_users_7.png b/arbitrum-docs/assets/getting_started_users_7.png similarity index 100% rename from arbitrum-docs/arbitrum-bridge/images/getting_started_users_7.png rename to arbitrum-docs/assets/getting_started_users_7.png diff --git a/arbitrum-docs/bold/assets/before-vs-after-with-bold.png b/arbitrum-docs/bold/assets/before-vs-after-with-bold.png deleted file mode 100644 index 9f040267dc..0000000000 Binary files a/arbitrum-docs/bold/assets/before-vs-after-with-bold.png and /dev/null differ diff --git a/arbitrum-docs/bold/assets/l2beat-pie-chart.png b/arbitrum-docs/bold/assets/l2beat-pie-chart.png deleted file mode 100644 index e3130742d6..0000000000 Binary files a/arbitrum-docs/bold/assets/l2beat-pie-chart.png and /dev/null differ diff --git a/arbitrum-docs/bold/assets/safer-withdrawals-with-bold.png b/arbitrum-docs/bold/assets/safer-withdrawals-with-bold.png deleted file mode 100644 index 471aaa6923..0000000000 Binary files a/arbitrum-docs/bold/assets/safer-withdrawals-with-bold.png and /dev/null differ diff --git a/arbitrum-docs/bold/bold-gentle-introduction.md b/arbitrum-docs/bold/bold-gentle-introduction.md deleted file mode 100644 index 473c7b7a0b..0000000000 --- a/arbitrum-docs/bold/bold-gentle-introduction.md +++ /dev/null @@ -1,159 +0,0 @@ ---- -title: 'A gentle introduction: BOLD' -sidebar_label: 'A gentle introduction' -description: 'An educational introduction that provides a high-level understanding of BOLD, a new dispute protocol to enable permissionless validation for Arbitrum chains.' -user_story: 'As a user or researcher of the Arbitrum product suite, I want to learn about BOLD, a next-generation dispute protocol that enables permissionless validation.' -content_type: gentle-introduction -author: leeederek -sme: leeederek ---- - -import PublicPreviewBannerPartial from './partials/_bold-public-preview-banner-partial.md'; - - - -This introduction is for those who want to learn about BOLD: a new dispute protocol for Optimistic Rollups that can enable **permissionless validation for Arbitrum chains**. BOLD stands for Bounded Liquidity Delay and is currently deployed on a public testnet for anyone to join and test how challenges will work. - -This next-generation dispute protocol technology will soon be available for any Arbitrum chain, and pending a governance vote, will eventually be made available on Arbitrum Sepolia, Arbitrum One, and Arbitrum Nova. - -BOLD will eventually replace the current, permissioned fraud proof mechanism that powers Arbitrum chains today. - -## In a nutshell: - -- Validation for Arbitrum One and Nova is currently is limited to a [permissioned set of parties maintained by the Arbitrum DAO](https://docs.arbitrum.foundation/state-of-progressive-decentralization#allowlisted-validators) to reduce the risks of _[delay attacks](https://medium.com/offchainlabs/solutions-to-delay-attacks-on-rollups-434f9d05a07a)_ - a class of attacks where malicious entities can open many disputes during the challenge period and delay confirmations of assertions by the amount of time needed to resolve those disputes. -- BOLD, an acronym for Bounded Liquidity Delay, is a new challenge resolution protocol for Arbitrum chains that enables permissionless validation by mitigating the risks of delay attacks against [rollups like Arbitrum](../inside-arbitrum-nitro/inside-arbitrum-nitro.mdx#arbitrum-rollup-protocol). This is possible because BOLD's design ensures disputes will be resolved within a fixed time window, currently set to equal 1 challenge period (~6.4 days) for Arbitrum One and Nova. If there is a dispute, BOLD guarantees the maximum total time to be equal to 2 challenge periods (1 for raising disputes, 1 for resolving disputes), 1 day grace period for the Security Council to intervene, and a small delta for computing challenges. -- Permissionless validation is a key milestone on [Arbitrum’s journey to becoming a Stage 2 Rollup](https://docs.arbitrum.foundation/state-of-progressive-decentralization) - the most advanced and mature rollup technology categorization. With BOLD, **any honest party can validate and bond their funds to post a correct L2 state assertions to win disputes against malicious entities.** -- BOLD is currently considered to be in `alpha` release and is deployed on a public testnet. [Follow this guide](https://github.com/OffchainLabs/bold-validator-starter-kit) to deploy a BOLD validator to test and explore, first hand, how BOLD works to secure Arbitrum chains. To learn more about BOLD, please check out the [BOLD whitepaper](https://arxiv.org/abs/2404.10491) and [BOLD's code and specifications on Github](https://github.com/OffchainLabs/bold). - -## What _exactly_ is BOLD? - -BOLD, an acronym for Bounded Liquidity Delay Protocol, is an upgrade to Arbitrum's existing dispute protocol. Specifically, BOLD changes some of the rules used by validators to open and resolve disputes about Arbitrum’s state to ensure only valid states get confirmed on an Arbitrum chain’s parent chain, such as Ethereum. - -The current dispute protocol has working fraud proofs and is used in production today by Arbitrum chains. The changes BOLD brings enables anyone to participate in the validation of the state of the chain and enhances security around withdrawals to L1. - -A bonded validator’s responsibilities are to: - -- Post claims about an Arbitrum chain’s state to Ethereum, -- Challenge invalid claims made by other validators, and -- Confirm valid claims - either by timing other validators out or by winning a challenge - -The goal of BOLD is to unlock permissionless validation by ensuring that disputes are resolved within a fixed period of time (currently equivalent to 2 challenge periods, plus a small grace period for the Security Council and a small delta for computation), effectively removing the risk of delay attacks and making withdrawals to the parent chain more secure. BOLD accomplishes this by introducing a new dispute system that lets any, one entity defend Arbitrum against malicious parties - effectively allowing anyone to validate Arbitrum’s state without needing permission to do so. - -## Why does Arbitrum need a new dispute protocol? - -While Arbitrum chains today have working fraud proofs to secure withdrawals, BOLD introduces a few subtle but innovative changes that let _anyone_ challenge and win disputes - all within a fixed time period. In other words, Arbitrum chains will continue to be secured with an interactive proving game between validators, but with the added benefit of this game being completely permissionless and time-bounded to the same length as 1 challenge period (currently set at 6.4 days). - -Under the hood, the reason why BOLD can offer time-bound, permissionless validation is because a correct Arbitrum state assertion is **not tied to the entity that bonds their capital to a claim**. This property, coupled with the fact that L2 states are completely deterministic and can eventually be proven on Ethereum, means that **any number of honest parties** can rely on BOLD to prove that their claim is correct. Lastly, a property that will not change with BOLD is the fact that there needs to only be 1 honest party defending Arbitrum. - -### BOLD brings Arbitrum closer to being recognized as a Stage 2 rollup - -Inspired by [Vitalik’s proposed milestones](https://ethereum-magicians.org/t/proposed-milestones-for-rollups-taking-off-training-wheels/11571), the team over at L2Beat has assembled a widely recognized framework for evaluating the development Ethereum Rollups. Both Vitalik and the [L2Beat framework](https://medium.com/l2beat/introducing-stages-a-framework-to-evaluate-rollups-maturity-d290bb22befe) refer to the the final stage of rollup development as _“Stage 2 - No Training Wheels”_. A critical criterion for being considered a Stage 2 rollup is to allow anyone to validate the L2 state and post fraud proofs to Ethereum without restraints. This is considered a key requirement for Stage 2 because it ensures _[“that the system is not controlled by a limited set of entities and instead is subject to the collective scrutiny of the entire community”](https://medium.com/l2beat/introducing-stages-a-framework-to-evaluate-rollups-maturity-d290bb22befe)._ - -BOLD enables permissionless validation by allowing _anyone_ to challenge incorrect Arbitrum state assertions and therefore unlocks new avenues for participation in securing the network, fostering greater inclusivity and resilience. This is made possible because BOLD guarantees that a single, honest entity who has their capital bonded to the correct Arbitrum state assertion will always win against malicious adversaries. The research and work to bring BOLD to life underscores Arbitrum's commitment to scaling Ethereum without compromising on security. - -![pie-slice](./assets/l2beat-pie-chart.png) - -With BOLD at its core, Arbitrum charts a course towards being recognized as a Stage 2 rollup by addressing the currently yellow (above) State Validation wedge in [L2Beat's risk analysis pie chart](https://l2beat.com/scaling/summary). BOLD contributes to a more decentralized, efficient, and robust rollup ecosystem. Additionally, BOLD will be available as an upgrade to all Orbit chains who wish to adopt it to reap the aforementioned benefits. - -### BOLD makes withdrawals to L1 Ethereum safer - -Today, there is a period of time, following a state assertion, called the “challenge period” where any validator can open a dispute on a given state - this is what makes Arbitrum an optimistic rollup. This challenge period is why you must wait ~1 week (6.4 days to be exact) to withdraw assets from Arbitrum One, for example. While this design is secured with working fraud proofs, it is susceptible to [delay attacks](https://medium.com/offchainlabs/solutions-to-delay-attacks-on-rollups-434f9d05a07a), where malicious actors continuously open disputes to extend that challenge period for as long as they’re willing to sacrifice bonds - effectively extending the challenge period indefinitely by an amount equal to the time it takes to resolve each dispute, one by one. This risk is not ideal nor safe and is why validation for Arbitrum One and Nova is confined to a permissioned set of entities overseen by the Arbitrum DAO. - -![bold-safer-withdrawals](./assets/safer-withdrawals-with-bold.png) - -BOLD addresses these challenges head-on by introducing a time limit on the existing rollup protocol for resolving disputes, effectively ensuring that challenges conclude within a 6.4-day window (this window can changed by the DAO for Arbitrum One and Nova). This is possible due to two reasons: (1) BOLD’s design allows for challenges between the honest party and any number of malicious adversaries to happen in parallel, and (2) the use of a time limit that will automatically confirm the honest party’s claims if the challenger fails to respond. - -To summarize with an analogy and the diagram below: Arbitrum’s current dispute protocol assumes that any assertion that gets challenged must be defended against each unique challenger sequentially, like in a _“1v1 tournament”_. BOLD, on the other hand, enables any single honest party to defend the correct state and be guaranteed to win, similar to an _“all-vs-all battle royale”_ where there must and will always be a single winner in the end. - -![before-and-after-with-bold](./assets/before-vs-after-with-bold.png) -_Note that the timer/clocks above are arbitrary and instead represent the duration of challenges and how challenges are sequential today but can take place in parallel with BOLD. The duration of challenges are independent from one another._ - -## How is this possible? - -The BOLD protocol provides the guardrails and rules for how validators challenge claims about the state of an Arbitrum chain. Since Arbitrum’s state is deterministic, there will always be only 1 correct state for a given input of on-chain operations and transactions. The beauty of BOLD’s design guarantees that disputes will be resolved within a fixed time window, removing the risk of delay attacks and ultimately enabling anyone to bond their funds to and successfully defend that singular correct state of Arbitrum. - -Let’s dive in to an overview of how BOLD actually works. - -1. **An assertion is made:** Validators begin by taking the most recent confirmed [RBlock](../inside-arbitrum-nitro/inside-arbitrum-nitro.mdx#the-rollup-chain), called `Block A`, and assert that some number of transactions afterwards, using Nitro’s deterministic State Transition Function (STF), will result in an end state, `Block Z`. If a validator claims that the end state represented by `Block Z` is correct, they will bond their funds to `Block Z` and propose that state to be posted to Ethereum. If nobody disagrees after a certain amount of time, known as the challenge period, then the state represented by the RBlock `Block Z` is confirmed as the correct state of an Arbitrum chain. However, if someone disagrees with the end state `Block Z`, they can submit a challenge. This is where BOLD comes in to play. -2. **A challenge is opened:** When another validator observes and disagrees with the end state represented by `Block Z`, they can permissionlessly open a challenge by asserting and bonding capital to a claim on a different end state, represented by an RBlock `Block Y`. At this point in time, there are now 2 asserted states: `Block A → Block Z` and `Block A → Block Y`. Each of these asserted states, at this point in time now that there's a challenge, are referred to _edges_ while a Merkle tree of asserted states from some start to end point (e.g. `Block A → Block Z`) is more formally known as a _history commitment._ It is important to note that Ethereum at this point in time has no notion of which edge(s) is correct or incorrect - edges are simply a portion of a claim made by a validator about the history of the chain from some end state all the way back to some initial state. Also note that because a bond put up by a validator is tied to an assertion rather than the party who put up that bond, there can be any number of honest, anonymous parties that can open challenges against incorrect claims. It is important to note that the bonds put up to open challenges are held in a Gnosis Safe multi-sig wallet controlled by the Arbitrum Foundation. -3. **Multi-level, interactive dissection begins:** To resolve the dispute, the disagreeing entities will need to come to an agreement on what the _actual, correct_ asserted state should be. [It would be tremendously expensive to re-execute](https://docs.arbitrum.io/inside-arbitrum-nitro/#why-interactive-proving-is-better) and compare everything from `Block A → Block Z` and `Block A → Block Y`, especially since there could be potentially millions of transactions in between `A`, `Z`, and `Y`. Instead, entities take turns bisecting their respective _history commitments_ until they arrive at a single step of instruction where an arbiter, like Ethereum, can declare a winner. Note that [this system is very similar to how challenges are resolved on Arbitrum chains today](https://docs.arbitrum.io/inside-arbitrum-nitro/#challenges) - BOLD only changes some minor, but important, details in the resolution process. Let’s dive into what happens next: - 1. **Block challenges**: when a challenge is opened, the edges are called _level-zero edges_ since they are at the granularity of Arbitrum blocks. The disputing parties take turns bisecting their history commitments until they identify the specific block that they disagree on. - 2. **Big-step challenges:** now that the parties have narrowed down their dispute to a single block, that we call `Block B`, the back-and-forth bisection exercise continues within that block. Note that `Block B` is claimed by all parties to be some state after the initial state `Block A` but before the final states `Block Z` and `Block Y`. This time however, the parties will narrow down on a specific _range_ of instructions for the state transition function within the block - essentially working towards identifying a set of instructions that their disagreement lies within. This range is currently defined to be 2^20 steps of WASM instructions, which is the assembly of choice for validating Arbitrum chains. - 3. **One-step challenge:** within that range of 2^20 instructions, the back and forth bisecting continues until all parties arrive at a single step of instruction that they disagree on. At this point in time, parties agree on the initial state of Arbitrum before the step but disagree on the end state 1 step immediately after. Remember that since Arbitrum’s state is entirely deterministic, there is only 1 correct end state. -4. **One-step proof:** Once a challenge is isolated down to a dispute about a single step, both parties run that step to produce, and then submit, a one-step proof to the OneStepProof smart contract on the parent chain (e.g. Ethereum). A one-step proof is a proof that a single step of computation results in a particular state. The smart contract on the parent chain will execute the disputed step to validate the correctness of a submitted proof from the two parties. It is at this point that the honest party's proof will be deemed valid and it's tree of edges will be confirmable by time, while the dishonest party has their edges rejected. -5. **Confirmation:** Once the honest one-step edge is confirmed, the protocol will work on confirming or rejecting the parent edges until it reaches the level-zero edge of the honest party. With the honest party’s level-zero edge now confirmed, the honest party’s assertion bond can be withdrawn. Meanwhile, the dishonest party has their bonds taken away to ensure the dishonest party is always punished. Reimbursements for the honest party's L1 gas costs and mini-bonds made at the other challenge levels are handled by the Arbitrum Foundation. - 1. There is another way that a level-zero edge can get confirmed: time. At each of the mini-stages of challenge (block challenge, big-step challenge, one-step challenge), there is a timer that increments upwards towards some challenge period, _T_ defined by BOLD. This timer begins ticking for a party when they submit their bisected history commitment until their challenger submits their bisected history commitment in response. An edge is automatically confirmed if the timer reaches _T._ - -That’s it! We’ve now walked through each of the steps that validators will take to dispute challenges with the BOLD protocol. One final note here is that each of the steps explained above can take place concurrently and this is one of the reasons why BOLD can guarantee that disputes are resolved within a fixed time frame. - -### BOLD's economics and spam protection - -Given that participation in BOLD is permissionless, it is recommended that the size of the bonds required to participate be high enough to disincentivize malicious actors from attacking Arbitrum One and Nova and to mitigate against spam (that would otherwise delay confirmations). High bonding values do not harm decentralization because (1) trustless bonding pools can be deployed permissionlessly to let the community open challenges and post assertions, and (2) any number of honest parties of unknown identities can emerge to bond their funds to the correct assertion and participate in the defense of Arbitrum at any time within a challenge. As with the current dispute resolution protocol, there are no protocol level incentives for parties who opt in to participate in validating Arbitrum One and Nova with BOLD. The bonds can be any ERC20 token and be set to any size for Arbitrum One and Nova, as determined by the ArbitrumDAO. - -The following link, [Economics of Disputes in Arbitrum BOLD](https://github.com/OffchainLabs/bold/blob/main/docs/research-specs/Economics.pdf), covers the rationale behind the design and recommended values for the bonds. Note that the ArbitrumDAO can change these values and the type of asset used for the bonds via a governance proposal. - -BOLD makes permissionless validation possible for Arbitrum rollup chains and marks a major step towards [full decentralization](https://docs.arbitrum.foundation/state-of-progressive-decentralization). This significant milestone also lays the groundwork for productive discussions about future economic incentives for those participating in the protocol since anyone can participate. - -### Reimbursements and penalities - -As mentioned above in Step 5, once all of a validator’s assertions are confirmed, a validator can withdraw their full assertion bond. Other costs, including the mini-bonds from both the malicious actor and honest party, will continue to be held in the Gnosis Safe multi-sig wallet controlled by the Arbitrum Foundation. - -The ArbitrumDAO has full discretion over: - -- How to reimburse the mini-bond and gas costs to honest parties, and -- What to do with the funds confiscated from a malicious actor (including, but not limited to, rewarding the honest parties with a portion of the confiscated funds, burning the confiscated funds in its entirety, or sending the confiscated funds to the DAO treasury). - -Note that honest parties are not automatically rewarded with the funds confiscated from malicious actors to avoid creating a situation where honest parties wastefully compete to be the first one to make each honest move in the interactive fraud proof game. Additionally, BOLD resolves disputes by determining which top-level assertion is correct, without necessarily being able to classify every move as “honest” or “malicious” as part of the interactive fraud proof game without off-chain knowledge. These two factors are the reason why the ArbitrumDAO has the final authority on what to do with the funds that are held in Gnosis Safe multi-sig wallet. - -## What can I do with BOLD today? - -Today, BOLD is deployed on a public testnet using Ethereum Sepolia as a base layer for anyone to experiment with and test on. The intent behind this testnet is purely to demonstrate, first-hand, how disputes can effectively resolved by a single party in a fixed challenge period on Arbitrum chains. Feedback gained from developers, users, and researchers will help improve and strengthen BOLD’s design. - -If you’re intrigued by what BOLD can unlock for Arbitrum chains, we encourage you to interact with BOLD by: - -- [Following this guide](https://github.com/OffchainLabs/bold-validator-starter-kit) to deploy a BOLD validator to test and explore, first hand, how BOLD works to secure Arbitrum chains. A [BOLD testnet block explorer](https://bold-explorer.arbitrum.io/) is also available for you to peruse! -- Checking out this [BOLD Technical Deep Dive](https://github.com/OffchainLabs/bold/blob/main/docs/research-specs/TechnicalDeepDive.pdf) to learn about BOLD's implementation, alongside [the BOLD source code on Github](https://github.com/OffchainLabs/bold) to understand how BOLD works under the hood. -- Reviewing the [Economics of Disputes in Arbitrum BOLD](https://github.com/OffchainLabs/bold/blob/main/docs/research-specs/Economics.pdf) to learn about rationale behind the design and recommended bonding values. -- Reading the formal specification and mathemtical proofs behind BOLD in the [BOLD whitepaper](https://arxiv.org/abs/2404.10491). - -## Wen mainnet? - -BOLD is in `alpha`, which means there are a lot of planned improvements on the roadmap. A few high-level next steps for BOLD's journey to being deployed to Arbitrum chains include: - -- A comprehensive, third-party audit of the [BOLD source code](https://github.com/OffchainLabs/bold) to ensure the effectiveness and safety of the design. -- Tools and frameworks for the smooth migration of existing validators and a seamless on-boarding for new validators to use BOLD for their respective Arbitrum chains. -- Monitoring stack for people to use to see on-going challenges on the testnet -- A mechanism for the community to pool funds together to bond capital to an assertions made by validators -- The launch of a public bounty program for white hat auditors and security professionals to help test and secure the BOLD protocol design. -- Proposing, to the Arbitrum DAO, that the BOLD protocol be adopted - first for Arbitrum Sepolia and then eventually for Arbitrum One and Arbitrum Nova. -- Cutting a GA release of Nitro that enables BOLD validation. - -## Frequently asked questions about BOLD (FAQ): - -**How does bonding work?** - -- The entities responsible for posting assertions about Arbitrum state to Ethereum are called validators. If posting assertions were free, anyone could create conflicting assertions to always delay withdrawals by 14 days instead of 7. As such, Arbitrum requires validators to put in a “security deposit”, known as a bond, to be allowed to post assertions. Validators can withdraw their bond as soon as their latest posted assertion has been confirmed, and end their responsibilities. These bonds can be any ERC20 token and should be set to a large enough value (e.g. 200 WETH) to make it economically infeasible for an advesary to attack an Arbitrum chain and to mitigate against spam (that would otherwise delay confirmations). Requiring a high bond to post assertions about Arbitrum seems centralizing, as we are replacing a whitelist of validators with instead a system that requires a lot of money to participate in. To address this, there is a [contract](https://github.com/OffchainLabs/bold/blob/main/contracts/src/assertionStakingPool/AssertionStakingPoolCreator.sol) that anyone can use to deploy a bonding pool as a way of crowdsourcing funds from others who wish to help defend Arbitrum but who may not individually be able to put up the large upfront bond itself. The use of bonding pools, coupled with the fact that there can be any number of honest anonymous parties ready to defend Arbitrum, means that these high bond values do not harm decenentralization. - -**What is the user flow for using the assertion bonding pool contract?** - -- Anyone can deploy an assertion bonding pool using [`AssertionStakingPoolCreator.sol`](https://github.com/OffchainLabs/bold/blob/main/contracts/src/assertionStakingPool/AssertionStakingPoolCreator.sol) as a means to crowdsource funds to put up a bond for an assertion. To defend Arbitrum using a bonding pool, an entity would first deploy this pool with the assertion that they believe is correct and wish to put up a bond to challenge an advesary's assertion. Then, anyone can verify that the claimed assertion is correct by running the inputs through their node's State Transition Function (STF). If other parties agree on the assertion being correct, then they can deposit their funds into the contract. When enough funds have been deposited, anyone can permissionlessly trigger the creation of the assertion on-chain to start the challenge. Finally, once the honest parties' assertion is confirmed by the dispute protocol, all involved entities can get their funds reimbursed and can withdraw. - -**Are there any incentives to run a BOLD validator to secure Arbitrum chains?** - -- Running a BOLD validator secures their respective Arbitrum chain and protects the assets on the chain from malicious actors - all you need is 1 honest party. Other than this critical piece, there are currently no financial incentives for parties to run a BOLD validator. Any future decisions or changes to this design can be proposed to and voted on by the Arbitrum DAO. - -**What type of hardware will be necessary to run a BOLD validator?** - -- The minimum hardware requirements for running a BOLD validator is still being researched and finalized. The goal, however, is that regular consumer hardware (i.e. laptop) can effectively be used by an honest party to secure an Arbitrum chain using BOLD in the average case. - -**How do BOLD validators communicate with one another? Is it over a P2P network?** - -- BOLD validators for Arbitrum chains communicate directly with smart contracts on L1 Ethereum. This means that opening challenges, submitting bisected history commitments, one-step proofs, and confirmations are all refereed on Ethereum. There is no p2p between validators. - -**For an L3 Orbit chain, secured using BOLD, that settles to Arbitrum One, does the one-step proof happen on Arbitrum One?** - -- Yes - -**Does implementing BOLD reduce the scope or remove the need for the Arbitrum Security Council?** - -- BOLD can limit the scope of Arbitrum One and Nova’s reliance on the Security Council as it takes Arbitrum chains one-step closer to full decentralization. diff --git a/arbitrum-docs/bold/concepts/public-preview-expectations.md b/arbitrum-docs/bold/concepts/public-preview-expectations.md deleted file mode 100644 index fa999be650..0000000000 --- a/arbitrum-docs/bold/concepts/public-preview-expectations.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: 'Public preview: What to expect' -sidebar_label: 'Public preview' -description: 'BOLD is currently tagged as an `alpha` release supported by *public preview* documentation. This concept document explains what this means, and what to expect.' -author: symbolpunk -sidebar_position: 10 ---- - -BOLD, Arbitrum's new dispute protocol, is currently tagged as an `alpha` release supported by _public preview_ documentation. This concept document explains what "public preview" means, what to expect from public preview capabilities, and how to engage with our team as you tinker. - -### How products are developed at Offchain Labs - -Offchain Labs builds products in a way that aligns loosely with the spirit of "building in public". We like to release things **early and often** so that we can capture feedback and iterate in service of your needs, as empirically as possible. - -To do this, some of our product offerings are documented with **public preview** disclaimers that look like this: - -import PublicPreviewBannerPartial from '../partials/_bold-public-preview-banner-partial.md'; - - - -This banner's purpose is to set expectations while inviting readers like you to express your needs so that we can incorporate them into the way that we iterate on product. - -### What to expect when using public preview offerings - -As you tinker and provide feedback, we'll be listening. Sometimes, we'll learn something non-obvious that will result in a significant change. More commonly, you'll experience incremental improvements to the developer experience as the offering grows out of its **public preview** status, towards **stable** status. - -Public preview offerings are evolving rapidly, so don't expect the degree of release notes discipline that you'd expect from a stable offering. Keep your eyes open for notifications regarding patch, minor, and major changes, along with corresponding relnotes that highlight breaking changes and new capabilities. - -### How to provide feedback - -Our product team primarily uses three feedback channels while iterating on public preview capabilities: - -1. **Docs**: Click on the `Request an update` button located in the top-right corner of any document to provide feedback on the docs and/or developer experience. This will lead you to a prefilled Github issue that members of our product team periodically review. -2. **Discord**: [Join the Arbitrum Discord](https://discord.gg/arbitrum) to engage with members of the Arbitrum community and product team. -3. **Google form**: Complete [this form](http://bit.ly/3yy6EUK) to ask for support. - -### What to expect when providing feedback - -Our ability to respond to feedback is determined by our ever-evolving capacity and priorities. We can't guarantee responses to all feedback submissions, but our small-but-mighty team is listening, and we'll try our best to acknowledge and respond to your feedback. No guarantees though! - -_PS, [our small-but-mighty team is hiring](https://jobs.lever.co/offchainlabs)._ - -### Thank you! - -Thanks for helping us build things that meet your needs! We're excited to engage with OGs and newcomers alike; please don't hesitate to reach out. diff --git a/arbitrum-docs/bold/partials/_bold-public-preview-banner-partial.md b/arbitrum-docs/bold/partials/_bold-public-preview-banner-partial.md deleted file mode 100644 index 7e792827cf..0000000000 --- a/arbitrum-docs/bold/partials/_bold-public-preview-banner-partial.md +++ /dev/null @@ -1,8 +0,0 @@ -:::caution ALPHA RELEASE, PUBLIC PREVIEW DOCS - -The BOLD dispute protocol is currently deployed on a public testnet and tagged as an `alpha` release. The code has not been audited and **should not be used in production scenarios**. -Please note that the public testnet is intended for Arbitrum users and researchers to test and experiment with the BOLD dispute protocol for the purposes of education and hardening the protocol via the surfacing of bugs. The public testnet may be paused and its parameters updated at any time in response to scenarios that impact the network and its ability to fulfill its function as a working, reliable test environment. This documentation is currently in [public preview](../concepts/public-preview-expectations.md). - -To provide feedback, click the _Request an update_ button at the top of this document, [join the Arbitrum Discord](https://discord.gg/arbitrum), or reach out to our team directly by completing [this form](http://bit.ly/3yy6EUK). - -::: diff --git a/arbitrum-docs/arbitrum-bridge/02-usdc-arbitrum-one.md b/arbitrum-docs/bridge-tokens/concepts/usdc-concept.md similarity index 100% rename from arbitrum-docs/arbitrum-bridge/02-usdc-arbitrum-one.md rename to arbitrum-docs/bridge-tokens/concepts/usdc-concept.md diff --git a/arbitrum-docs/bridge-tokens/gentle-introduction-bridge.md b/arbitrum-docs/bridge-tokens/gentle-introduction-bridge.md new file mode 100644 index 0000000000..88bdbbad30 --- /dev/null +++ b/arbitrum-docs/bridge-tokens/gentle-introduction-bridge.md @@ -0,0 +1,16 @@ +--- +title: 'A gentle introduction to the Arbitrum Bridge' +description: 'The Arbitrum Bridge lets you transfer assets between Ethereum L1 and Arbitrum L2. This guide introduces you to the Arbitrum suite of products and explains how the Arbitrum Bridge relates to each of them.' +--- + +import UnderConstructionPartial from '../partials/_under-construction-banner-partial.md'; + + + + diff --git a/arbitrum-docs/build-decentralized-apps/arbitrum-vs-ethereum/04-solidity-support.md b/arbitrum-docs/build-decentralized-apps/arbitrum-vs-ethereum/04-solidity-support.md index 310ac03e98..884f1ca038 100644 --- a/arbitrum-docs/build-decentralized-apps/arbitrum-vs-ethereum/04-solidity-support.md +++ b/arbitrum-docs/build-decentralized-apps/arbitrum-vs-ethereum/04-solidity-support.md @@ -15,12 +15,12 @@ This page compiles a list of functions and properties that return a different re Although Arbitrum supports Solidity code, there are differences in the effects of a few operations, including language features that don't make much sense in the Layer 2 context. -| Operation | Description | -| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Operation | Description | +| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `blockhash(x)` | Returns a cryptographically insecure, pseudo-random hash for `x` within the range `block.number - 256 <= x < block.number`. If `x` is outside of this range, `blockhash(x)` will return `0`. This includes `blockhash(block.number)`, which always returns `0` just like on Ethereum. The hashes returned do not come from L1. ⚠️ Arbitrum's L2 block hashes should not be relied on as a secure source of randomness. | -| `block.coinbase` | Returns the designated internal address `0xA4b000000000000000000073657175656e636572` if the message was posted by a sequencer. If it's a delayed message, it returns the address of the delayed message's poster (Note: the handling of delayed message's `block.coinbase` will likely be changed in a future ArbOS version). | -| `block.difficulty` | Returns the constant 1. | -| `block.prevrandao` | Returns the constant 1. | -| `block.number` | Returns an "estimate" of the L1 block number at which the sequencer received the transaction. For more information, see [Block numbers and time](/build-decentralized-apps/arbitrum-vs-ethereum/02-block-numbers-and-time.md). | -| `msg.sender` | Works the same way it does on Ethereum for regular L2 to L2 transactions. For transactions submitted via the delayed inbox, it will return the L2 address alias of the L1 contract that triggered the message. For more information, see [address aliasing](/arbos/l1-to-l2-messaging.mdx#address-aliasing). | -| OPCODE `PUSH0` | This OPCODE was added as part of ArbOS 11 and is now supported. | +| `block.coinbase` | Returns the designated internal address `0xA4b000000000000000000073657175656e636572` if the message was posted by a sequencer. If it's a delayed message, it returns the address of the delayed message's poster (Note: the handling of delayed message's `block.coinbase` will likely be changed in a future ArbOS version). | +| `block.difficulty` | Returns the constant 1. | +| `block.prevrandao` | Returns the constant 1. | +| `block.number` | Returns an "estimate" of the L1 block number at which the sequencer received the transaction. For more information, see [Block numbers and time](/build-decentralized-apps/arbitrum-vs-ethereum/02-block-numbers-and-time.md). | +| `msg.sender` | Works the same way it does on Ethereum for regular L2 to L2 transactions. For transactions submitted via the delayed inbox, it will return the L2 address alias of the L1 contract that triggered the message. For more information, see [address aliasing](/arbos/l1-to-l2-messaging.mdx#address-aliasing). | +| OPCODE `PUSH0` | This OPCODE was added as part of ArbOS 11 and is now supported. | diff --git a/arbitrum-docs/build-decentralized-apps/token-bridging/02-token-bridge-ether.md b/arbitrum-docs/build-decentralized-apps/token-bridging/02-token-bridge-ether.md index c6e4102e60..8f9944948d 100644 --- a/arbitrum-docs/build-decentralized-apps/token-bridging/02-token-bridge-ether.md +++ b/arbitrum-docs/build-decentralized-apps/token-bridging/02-token-bridge-ether.md @@ -40,4 +40,4 @@ Upon withdrawing, the Ether balance is burnt on the Arbitrum side, and will late The following diagram depicts the process that funds follow during a withdraw operation. - + \ No newline at end of file diff --git a/arbitrum-docs/build-decentralized-apps/token-bridging/03-token-bridge-erc20.md b/arbitrum-docs/build-decentralized-apps/token-bridging/03-token-bridge-erc20.md index bfa2de14df..1ff8469a97 100644 --- a/arbitrum-docs/build-decentralized-apps/token-bridging/03-token-bridge-erc20.md +++ b/arbitrum-docs/build-decentralized-apps/token-bridging/03-token-bridge-erc20.md @@ -140,4 +140,4 @@ Our [How to bridge tokens](/build-decentralized-apps/token-bridging/bridge-token ## A word of caution on bridges (aka, "I've got a bridge to sell you") -Cross chain bridging is an exciting design space; alternative bridge designs can potentially offer faster withdrawals, interoperability with other chains, different trust assumptions with their own potentially valuable UX tradeoffs, etc. They can also potentially be completely insecure and/or outright scams. Users should treat other, non-canonical bridge applications the same way they treat any application running on Arbitrum, and exercise caution and due diligence before entrusting them with their value. +Cross chain bridging is an exciting design space; alternative bridge designs can potentially offer faster withdrawals, interoperability with other chains, different trust assumptions with their own potentially valuable UX tradeoffs, etc. They can also potentially be completely insecure and/or outright scams. Users should treat other, non-canonical bridge applications the same way they treat any application running on Arbitrum, and exercise caution and due diligence before entrusting them with their value. \ No newline at end of file diff --git a/arbitrum-docs/build-decentralized-apps/token-bridging/partials/_token-compatibility.md b/arbitrum-docs/build-decentralized-apps/token-bridging/partials/_token-compatibility.md index feb5c4b647..543a68c467 100644 --- a/arbitrum-docs/build-decentralized-apps/token-bridging/partials/_token-compatibility.md +++ b/arbitrum-docs/build-decentralized-apps/token-bridging/partials/_token-compatibility.md @@ -4,4 +4,4 @@ If you want your token to be compatible out of the box with all the tooling avai For example, if an allowance check is added to the `bridgeBurn()` function, the token will not be easily withdrawable through the Arbitrum bridge UI, as the UI does not prompt an approval transaction of tokens by default (it expects the tokens to follow the recommended L2GatewayToken implementation). -::: +::: \ No newline at end of file diff --git a/arbitrum-docs/for-devs/third-party-docs/Covalent/covalent.md b/arbitrum-docs/for-devs/third-party-docs/Covalent/covalent.md index 731b1463e2..019fd60f39 100644 --- a/arbitrum-docs/for-devs/third-party-docs/Covalent/covalent.md +++ b/arbitrum-docs/for-devs/third-party-docs/Covalent/covalent.md @@ -6,7 +6,7 @@ sme: harishraisinghani sidebar_label: 'Covalent' --- -[Covalent](https://www.covalenthq.com/?utm_source=arbitrum&utm_medium=partner-docs) is a hosted blockchain data solution providing access to historical and current onchain data for [200+ supported blockchains](https://www.covalenthq.com/docs/networks/?utm_source=arbitrum&utm_medium=partner-docs), including Arbitrum One, Nova and Orbit chains. +[Covalent](https://www.covalenthq.com/?utm_source=arbitrum&utm_medium=partner-docs) is a hosted blockchain data solution providing access to historical and current onchain data for [200+ supported blockchains](https://www.covalenthq.com/docs/networks/?utm_source=arbitrum&utm_medium=partner-docs), including Arbitrum One, Nova and Orbit chains. Covalent maintains a full replica of every supported blockchain, meaning you have access to: @@ -68,48 +68,46 @@ There are 3 primary developer tools for using the APIs: 1. [**Unified API**](https://www.covalenthq.com/docs/api/?utm_source=arbitrum&utm_medium=partner-docs) - enterprise-grade endpoints to use with any programming language. Switch blockchains with one path parameter. - ``` - curl -X GET https://api.covalenthq.com/v1/arbitrum-mainnet/address/0xf977814e90da44bfa03b6295a0616a897441acec/balances_v2/ \ - -H 'Content-Type: application/json' \ - -u YOUR_API_KEY: - ``` + ``` + curl -X GET https://api.covalenthq.com/v1/arbitrum-mainnet/address/0xf977814e90da44bfa03b6295a0616a897441acec/balances_v2/ \ + -H 'Content-Type: application/json' \ + -u YOUR_API_KEY: + ``` 2. [**Client SDKs**](https://www.covalenthq.com/docs/unified-api/sdk/?utm_source=arbitrum&utm_medium=partner-docs) - official client libraries including TypeScript, Go and Python. - TypeScript example: - - ``` - npm install @covalenthq/client-sdk - ``` - - or: - - ``` - yarn add @covalenthq/client-sdk - ``` - - ``` - import { CovalentClient } from "@covalenthq/client-sdk"; - - (async () => { - try { - const client = new CovalentClient("YOUR_API_KEY"); - const transactions = client.TransactionService.getAllTransactionsForAddress("arbitrum-mainnet", "0xf977814e90da44bfa03b6295a0616a897441acec"); - - for await (const tx of transactions) { - console.log("tx", tx); - } - } catch (error) { - console.log(error.message); - } - })(); - ``` + TypeScript example: + ``` + npm install @covalenthq/client-sdk + ``` + or: + ``` + yarn add @covalenthq/client-sdk + ``` + + ``` + import { CovalentClient } from "@covalenthq/client-sdk"; + + (async () => { + try { + const client = new CovalentClient("YOUR_API_KEY"); + const transactions = client.TransactionService.getAllTransactionsForAddress("arbitrum-mainnet", "0xf977814e90da44bfa03b6295a0616a897441acec"); + + for await (const tx of transactions) { + console.log("tx", tx); + } + } catch (error) { + console.log(error.message); + } + })(); + ``` 3. [**GoldRush Kit**](https://github.com/covalenthq/goldrush-kit/?utm_source=arbitrum&utm_medium=partner-docs) - beautifully designed React components for your dApp frontend - [![GoldRush Component Example](https://www.datocms-assets.com/86369/1711147954-goldrush_wallet_ui_example.png)](https://goldrush-wallet-portfolio-ui.vercel.app/dashboard/balance/0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de/transfers/eth-mainnet/0xf8c3527cc04340b208c854e985240c02f7b7793f) + [![GoldRush Component Example](https://www.datocms-assets.com/86369/1711147954-goldrush_wallet_ui_example.png)](https://goldrush-wallet-portfolio-ui.vercel.app/dashboard/balance/0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de/transfers/eth-mainnet/0xf8c3527cc04340b208c854e985240c02f7b7793f) ## Get started - **[API Key](https://www.covalenthq.com/platform/auth/register/?utm_source=arbitrum&utm_medium=partner-docs)** - sign up for free - [**Docs**](https://www.covalenthq.com/docs/unified-api/?utm_source=arbitrum&utm_medium=partner-docs) - comprehensive knowledge base for all things Covalent - **[Guides](https://www.covalenthq.com/docs/unified-api/guides/?utm_source=arbitrum&utm_medium=partner-docs)** - learn how to build for various use cases and expand your onchain knowledge + diff --git a/arbitrum-docs/for-devs/third-party-docs/Moralis/moralis.md b/arbitrum-docs/for-devs/third-party-docs/Moralis/moralis.md index 65ac7f5e87..7e377f0f6f 100644 --- a/arbitrum-docs/for-devs/third-party-docs/Moralis/moralis.md +++ b/arbitrum-docs/for-devs/third-party-docs/Moralis/moralis.md @@ -9,12 +9,11 @@ sidebar_label: 'Moralis' **[Moralis](https://moralis.io/?utm_source=arbitrum-docs&utm_medium=partner-docs)** is a blockchain data platform that provides developers with all the data they need to build better blockchain applications. From NFT data, token data and price data, through to raw blockchain data and RPC nodes, Moralis offers a wide range of products that cover all major crypto and blockchain use cases, and it supports Arbitrum together with all other major EVM chains. ## Quickstart Guide - -Get started with Moralis APIs on Arbitrum by checking out our [Get Started Guide](https://docs.moralis.io/web3-data-api/evm/get-your-api-key/?utm_source=arbitrum-docs&utm_medium=partner-docs), or watch some of our popular [Youtube tutorials](https://www.youtube.com/@MoralisWeb3/featured). +Get started with Moralis APIs on Arbitrum by checking out our [Get Started Guide](https://docs.moralis.io/web3-data-api/evm/get-your-api-key/?utm_source=arbitrum-docs&utm_medium=partner-docs), or watch some of our popular [Youtube tutorials](https://www.youtube.com/@MoralisWeb3/featured). ## Moralis APIs -All Moralis APIs have support for Arbitrum and across all other major EVM blockchains. All endpoints have powerful filtering capabilities. +All Moralis APIs have support for Arbitrum and across all other major EVM blockchains. All endpoints have powerful filtering capabilities. :::info Endpoints @@ -24,16 +23,16 @@ Please check out the [Moralis API Reference](https://docs.moralis.io/ ### Wallet API -With Moralis [Wallet API](https://moralis.io/api/wallet/?utm_source=arbitrum-docs&utm_medium=partner-docs) you can get Wallet balances for tokens, NFTs and native assets, get full wallet history, net worth and a lot more. +With Moralis [Wallet API](https://moralis.io/api/wallet/?utm_source=arbitrum-docs&utm_medium=partner-docs) you can get Wallet balances for tokens, NFTs and native assets, get full wallet history, net worth and a lot more. ### NFT API -With Moralis [NFT API](https://moralis.io/api/nft/?utm_source=arbitrum-docs&utm_medium=partner-docs) you can get NFT data like collections, owners, prices, images and metadata. +With Moralis [NFT API](https://moralis.io/api/nft/?utm_source=arbitrum-docs&utm_medium=partner-docs) you can get NFT data like collections, owners, prices, images and metadata. ### Token API -With Moralis [Token API](https://moralis.io/api/token/?utm_source=arbitrum-docs&utm_medium=partner-docs) you can get ERC20 token data like prices, ownership, metadata, transfers, approvals, liquidity, mints and burns. +With Moralis [Token API](https://moralis.io/api/token/?utm_source=arbitrum-docs&utm_medium=partner-docs) you can get ERC20 token data like prices, ownership, metadata, transfers, approvals, liquidity, mints and burns. ### RPC Nodes -Get access to powerful RPC nodes on all major chains with [Moralis Nodes](https://moralis.io/nodes/?utm_source=arbitrum-docs&utm_medium=partner-docs). +Get access to powerful RPC nodes on all major chains with [Moralis Nodes](https://moralis.io/nodes/?utm_source=arbitrum-docs&utm_medium=partner-docs). diff --git a/arbitrum-docs/for-devs/third-party-docs/SubQuery/subquery.md b/arbitrum-docs/for-devs/third-party-docs/SubQuery/subquery.md deleted file mode 100644 index 6a7cd9dfb4..0000000000 --- a/arbitrum-docs/for-devs/third-party-docs/SubQuery/subquery.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: 'Indexing Arbitrum data with SubQuery' -description: 'Fast, flexible, universal, open source and decentralised APIs for Arbitrum' -author: subquery-team -sidebar_label: 'SubQuery Indexer' ---- - -SubQuery is a leading blockchain data indexer that provides developers with fast, flexible, universal, open source and decentralised APIs for web3 projects. SubQuery SDK allows developers to get rich indexed data and build intuitive and immersive decentralised applications in a faster and more efficient way. SubQuery supports 100+ ecosystems including Arbitrum, Ethereum, Polkadot, Algorand, NEAR, and Avalanche. - -Another one of SubQuery's competitive advantages is the ability to aggregate data not only within a chain but across multiple blockchains all within a single project. This allows the creation of feature-rich dashboard analytics and multi-chain block scanners. - -Other advantages include superior performance with multiple RPC endpoint configurations, multi-worker capabilities and a configurable caching architecture. To find out more, visit our [documentation](https://academy.subquery/). - -## Useful resources - -- SubQuery docs: [SubQuery Academy (Documentation)](https://academy.subquery.network/) -- Intro quick start guide: [1. Create a New Project](https://academy.subquery.network/quickstart/quickstart.html) -- [Arbitrum Quick Start Guide](https://academy.subquery.network/quickstart/quickstart_chains/arbitrum.html) -- [Arbitrum's starter projects directory](https://github.com/subquery/ethereum-subql-starter/tree/main/Arbitrum) - -For technical questions and support reach out to us `start@subquery.network` - -## Running and hosting your Arbitrum SubQuery APIs - -SubQuery is open-source, meaning you have the freedom to run it in the following three ways: - -- Locally on your own computer (or a cloud provider of your choosing), [view the instructions on how to run SubQuery Locally](https://academy.subquery.network/run_publish/run.html). - -- You can publish it to SubQuery's enterprise-level [Managed Service](https://managedservice.subquery.network/), where we'll host your SubQuery project in production ready services for mission critical data with zero-downtime blue/green deployments. There even is a generous free tier. [Find out how](https://academy.subquery.network/run_publish/publish.html). - -- You can publish it to the decentralised [SubQuery Network](https://subquery.network/network), the most open, performant, reliable, and scalable data service for dApp developers. The SubQuery Network indexes and services data to the global community in an incentivised and verifiable way and supports Arbitrum from launch. diff --git a/arbitrum-docs/for-devs/troubleshooting-building.md b/arbitrum-docs/for-devs/troubleshooting-building.md index 4343128bd9..b866fda734 100644 --- a/arbitrum-docs/for-devs/troubleshooting-building.md +++ b/arbitrum-docs/for-devs/troubleshooting-building.md @@ -5,8 +5,6 @@ user_story: As a developer, I want to understand how to troubleshoot common issu content_type: troubleshooting --- -import FAQStructuredDataJsonLd from '@site/src/components/FAQStructuredData'; -import FAQQuestions from '../partials/_troubleshooting-building-partial.md'; +import FAQStructuredData from '@site/src/components/FAQStructuredData'; - - + diff --git a/arbitrum-docs/arbitrum-bridge/03-troubleshooting.md b/arbitrum-docs/for-users/troubleshooting-users.md similarity index 54% rename from arbitrum-docs/arbitrum-bridge/03-troubleshooting.md rename to arbitrum-docs/for-users/troubleshooting-users.md index ee16f23ead..30686a856d 100644 --- a/arbitrum-docs/arbitrum-bridge/03-troubleshooting.md +++ b/arbitrum-docs/for-users/troubleshooting-users.md @@ -6,8 +6,6 @@ user_story: As an Arbitrum bridge user, I want to understand how to troubleshoot content_type: troubleshooting --- -import FAQStructuredDataJsonLd from '@site/src/components/FAQStructuredData'; -import FAQQuestions from '../partials/_troubleshooting-bridging-partial.md'; +import FAQStructuredData from '@site/src/components/FAQStructuredData'; - - + diff --git a/arbitrum-docs/arbitrum-bridge/01-quickstart.md b/arbitrum-docs/getting-started-users.mdx similarity index 91% rename from arbitrum-docs/arbitrum-bridge/01-quickstart.md rename to arbitrum-docs/getting-started-users.mdx index 748b6d9aff..0cf68ed8ee 100644 --- a/arbitrum-docs/arbitrum-bridge/01-quickstart.md +++ b/arbitrum-docs/getting-started-users.mdx @@ -28,7 +28,7 @@ There are several ways to obtain the native currency: You'll also need to add the desired chain's RPC endpoint to your wallet. Here we provide an example for doing this using MetaMask, although the process should be similar for other wallets. You need to first click on the MetaMask extension on your browser, click the network selector dropdown on the top-left corner, and then click the `Add Network` button at the bottom. Click "Add a network manually" and then provide the information corresponding to the chain you want to send your assets to. -![Add the desired destination network to your MetaMask wallet](images/getting_started_users_1.png) +![Add the desired destination network to your MetaMask wallet](assets/getting_started_users_1.png) Here we display the information of the most common Arbitrum chains, but you can find a more exhaustive list in our [RPC endpoints and providers](/build-decentralized-apps/reference/01-node-providers.md) page. @@ -50,11 +50,11 @@ Note that testnets like Arbitrum Sepolia only appear if you are connected to the ::: -![Add the desired network to your web3 wallet](images/getting_started_users_2.png) +![Add the desired network to your web3 wallet](assets/getting_started_users_2.png) Select the token you want to bridge in the token drop-down menu. You can also enable/disable the token lists by clicking `Manage token lists` button on the bottom right corner of the drop-down menu. -![Select the token to bridge](images/getting_started_users_3.png) +![Select the token to bridge](assets/getting_started_users_3.png) Enter the amount of ETH or ERC-20 tokens you want to bridge over in the **From** box and then press `Move funds`. Follow the prompts on your web3 wallet. @@ -64,7 +64,7 @@ Please make sure you leave enough ETH on your wallet to pay for the transaction, ::: -![Enter the amount of tokens to bridge](images/getting_started_users_4.png) +![Enter the amount of tokens to bridge](assets/getting_started_users_4.png) After you submit the transaction through your web3 wallet you can expect your funds to arrive on the destination chain within roughly 15-30 minutes (depending on the chain congestion). @@ -74,7 +74,7 @@ Also make sure your wallet is set to the destination chain so you can see your f :::info There's at least a 7 day withdrawal period for Arbitrum One and Nova networks Once you withdraw your funds from Arbitrum One or Nova through the Arbitrum bridge, you will have to wait for at least 7 days to receive them on Ethereum mainnet. -For more details, see [Arbitrum Bridge: Troubleshooting](/arbitrum-bridge/03-troubleshooting.md#how-long-does-it-take-before-i-receive-my-funds-when-i-initiate-withdrawal-from-arbitrum-chains-one-and-nova). +For more details, see [here](https://docs.arbitrum.io/for-users/troubleshooting-users#how-long-does-it-take-before-i-receive-my-funds-when-i-initiate-withdrawal-from-arbitrum-chains-one-and-nova). ::: @@ -86,7 +86,7 @@ Note that testnets like Ethereum Sepolia only appear if you are connected to the ::: -![Select the token to withdraw](images/getting_started_users_5.png) +![Select the token to withdraw](assets/getting_started_users_5.png) Select the token you want to bridge in the token drop-down menu. You can also enable/disable the token lists by clicking `Manage token lists` button on the bottom right corner of the drop-down menu. Enter the amount of ETH or ERC-20 tokens you want to bridge over in the **from** box and then press `Move funds`. Follow the prompts on your web3 wallet. @@ -96,13 +96,13 @@ Please make sure you leave enough ETH on your wallet to pay for the transaction, ::: -![Enter the amount of token to withdraw](images/getting_started_users_6.png) +![Enter the amount of token to withdraw](assets/getting_started_users_6.png) A countdown will pop up stating that you’ll get your funds in 7-8 days. You can check the status of your withdrawal by clicking on your profile on the top right and opening the `Transactions` tab, and claim it there when it’s ready. -![See the transaction history](images/getting_started_users_7.png) +![See the transaction history](assets/getting_started_users_7.png) Once the countdown is done, switch to the destination network on your wallet and press the `Claim` button, that has now turned blue, to receive your funds! diff --git a/arbitrum-docs/inside-arbitrum-nitro/inside-arbitrum-nitro.mdx b/arbitrum-docs/inside-arbitrum-nitro/inside-arbitrum-nitro.mdx index f414504317..1b6af38d37 100644 --- a/arbitrum-docs/inside-arbitrum-nitro/inside-arbitrum-nitro.mdx +++ b/arbitrum-docs/inside-arbitrum-nitro/inside-arbitrum-nitro.mdx @@ -200,7 +200,7 @@ We believe strongly that interactive proving is the superior approach, for the f ### Interactive proving drives the design of Arbitrum -Much of the design of Arbitrum is driven by the opportunities opened up by interactive proving. If you're reading about some feature of Arbitrum, and you're wondering why it exists, two good questions to ask are: "How does this support interactive proving?" and "How does this take advantage of interactive proving?" The answers to most "why" questions about Arbitrum relate to interactive proving. +Much of the design of Arbitrum is driven by the opportunities opened up by interactive proving. If you're reading about some feature of Arbitrum, and you're wondering why it exists, two good questions to ask are: "How does this support interactive proving?" and "How does this take advantage of interactive proving?" The answers to most "why questions" about Arbitrum relate to interactive proving. ## Arbitrum Rollup Protocol @@ -231,12 +231,12 @@ Each RBlock contains: - the RBlock number - the predecessor RBlock number: RBlock number of the last RBlock before this one that is (claimed to be) correct - the number of L2 blocks that have been created in the chain's history -- the number of inbox messages that have been consumed in the chain’s history +- the number of inbox messages have been consumed in the chain’s history - a hash of the outputs produced over the chain’s history. Except for the RBlock number, the contents of the RBlock are all just claims by the RBlock's proposer. Arbitrum doesn’t know at first whether any of these fields are correct. If all of these fields are correct, the protocol should eventually confirm the RBlock. If one or more of these fields are incorrect, the protocol should eventually reject the RBlock. -An RBlock is implicitly claiming that its predecessor RBlock is correct. This implies, transitively, that an RBlock implicitly claims the correctness of a complete history of the chain: a sequence of ancestor RBlocks that reaches all the way back to the birth of the chain. +An RBlock is implicitly claiming that its predecessor RBlock is correct. This implies, transitively, that an RBlock implicitly claims the correctness of a complete history of the chain: a sequence of ancestor RBlock that reaches all the way back to the birth of the chain. An RBlock is also implicitly claiming that its older siblings (older RBlocks with the same predecessor), if there are any, are incorrect. If two RBlocks are siblings, and the older sibling is correct, then the younger sibling is considered incorrect, even if everything else in the younger sibling is true. diff --git a/arbitrum-docs/launch-orbit-chain/concepts/custom-gas-token-sdk.md b/arbitrum-docs/launch-orbit-chain/concepts/custom-gas-token-sdk.md index c1fbd03554..b42bdf33dd 100644 --- a/arbitrum-docs/launch-orbit-chain/concepts/custom-gas-token-sdk.md +++ b/arbitrum-docs/launch-orbit-chain/concepts/custom-gas-token-sdk.md @@ -9,7 +9,7 @@ sidebar_position: 2 Arbitrum SDK is a TypeScript library for client-side interactions with Arbitrum. It provides common helper functionality as well as access to the underlying smart contract interfaces. -import PublicPreviewBannerPartial from '../partials/_orbit-public-preview-banner-partial.md'; +import PublicPreviewBannerPartial from '../partials/\_orbit-public-preview-banner-partial.md'; diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/arbos-upgrade.md b/arbitrum-docs/launch-orbit-chain/how-tos/arbos-upgrade.md index 396d5097c9..796f903bcc 100644 --- a/arbitrum-docs/launch-orbit-chain/how-tos/arbos-upgrade.md +++ b/arbitrum-docs/launch-orbit-chain/how-tos/arbos-upgrade.md @@ -10,7 +10,7 @@ sidebar_position: 3 This how-to provides step-by-step instructions for Orbit chain operators who want to upgrade ArbOS on their Orbit chain(s). Familiarity with ArbOS, Orbit, and [chain ownership](../concepts/chain-ownership.md) is expected. Note that Orbit chain owners have full discretion over when and whether to upgrade their ArbOS version. -The specific upgrade requirements for each ArbOS release are located under each reference page for that specific [ArbOS release](/run-arbitrum-node/arbos-releases/01-overview.md#list-of-available-arbos-releases). +The specific upgrade requirements for each ArbOS release are located under each reference page for that specific [ArbOS release](../../node-running/reference/arbos-software-releases/overview.mdx#list-of-available-arbos-releases). import PublicPreviewBannerPartial from '../../node-running/partials/_upgrade-cadence-recommendations-partial.mdx'; @@ -18,7 +18,7 @@ import PublicPreviewBannerPartial from '../../node-running/partials/_upgrade-cad #### Step 1: Update Nitro on nodes and validators -Refer to the [requirements for the targeted ArbOS release](/run-arbitrum-node/arbos-releases/01-overview.md) to identify the specific [Nitro release](https://github.com/OffchainLabs/nitro/releases/) that supports the ArbOS version that you're upgrading to. For example, if your upgrade targets ArbOS 20, you'd use Nitro `v2.3.1` (Docker image: `offchainlabs/nitro-node:v2.3.1-26fad6f`) or higher. This is the version of the Nitro stack that needs to be running on each of your Orbit chain's nodes. A list of [all Nitro releases can be found on Github](https://github.com/OffchainLabs/nitro/releases). +Refer to the [requirements for the targeted ArbOS release](../../node-running/reference/arbos-software-releases/overview.mdx) to identify the specific [Nitro release](https://github.com/OffchainLabs/nitro/releases/) that supports the ArbOS version that you're upgrading to. For example, if your upgrade targets ArbOS 20, you'd use Nitro `v2.3.1` (Docker image: `offchainlabs/nitro-node:v2.3.1-26fad6f`) or higher. This is the version of the Nitro stack that needs to be running on each of your Orbit chain's nodes. A list of [all Nitro releases can be found on Github](https://github.com/OffchainLabs/nitro/releases). Begin by upgrading your validator node(s) to the specified Nitro version, then update each remaining Orbit node to match this version. @@ -27,10 +27,9 @@ Note that upgrading your node version _must occur_ before the deadline establish #### Step 2: Upgrade the Wasm module root & your chain's Nitro contracts While every ArbOS upgrade will require an update to the Wasm module root, not every ArbOS upgrade will require an upgrade to the chain's `nitro-contracts` version. +If necessary, as defined in the release notes for each ArbOS release, you may need to deploy new versions of some (or all) of the Nitro contracts to the parent chain of your Orbit chain. These contracts include the rollup logic, bridging logic, fraud proof contracts, and interfaces for interacting with Nitro precompiles. -If necessary, as defined in the release notes for each ArbOS release, you may need to deploy new versions of some (or all) of the Nitro contracts to the parent chain of your Orbit chain. These contracts include the rollup logic, bridging logic, fraud proof contracts, and interfaces for interacting with Nitro precompiles. To verify the current version of your Nitro contracts, follow [these instructions](https://github.com/OffchainLabs/orbit-actions/blob/main/README.md#check-version-and-upgrade-path) while replacing the inbox contract address and network name with that of your Orbit chain. This information will allow you to find the correct upgrade path for your Nitro contracts. - -To update the Wasm module root and deploy your chain's Nitro contracts to the parent chain for the most recent ArbOS release, you will need the following inputs (obtained from the [requirements for the targeted ArbOS release](/run-arbitrum-node/arbos-releases/01-overview.md)): +To update the Wasm module root and deploy your chain's Nitro contracts to the parent chain for the most recent ArbOS release, you will need the following inputs (obtained from the [requirements for the targeted ArbOS release](../../node-running/reference/arbos-software-releases/overview.mdx)): - The WASM module root, and if necessary, - The required `nitro-contracts` version @@ -72,8 +71,8 @@ When scheduling the ArbOS upgrade through `ArbOwner.scheduleArbOSUpgrade` you mu #### Step 4: Enable ArbOS specific configurations or feature flags (not always required) -For some ArbOS upgrades, such as [ArbOS 20 Atlas](/run-arbitrum-node/arbos-releases/arbos20.md), there may be additional requirements or steps that need to be satisified to ensure your Orbit chain can use all of the new features and improvements made available in that particular ArbOS release. +For some ArbOS upgrades, such as [ArbOS 20 Atlas](../../node-running/reference/arbos-software-releases/arbos20.mdx), there may be additional requirements or steps that need to be satisified to ensure your Orbit chain can use all of the new features and improvements made available in that particular ArbOS release. -If there are additional requirements for the targeted ArbOS release you're attempting to upgrade to, the additional requirements will be listed on the reference pages for [the targeted ArbOS release](/run-arbitrum-node/arbos-releases/01-overview.md#list-of-available-arbos-releases). For example, the additional requirements for Orbit chains upgrading to ArbOS 20 can be found [here on the ArbOS 20 docs](/run-arbitrum-node/arbos-releases/01-overview.md#additional-requirements-for-arbitrum-orbit-chain-operators). +If there are additional requirements for the targeted ArbOS release you're attempting to upgrade to, the additional requirements will be listed on the reference pages for [the targeted ArbOS release](../../node-running/reference/arbos-software-releases/overview.mdx#list-of-available-arbos-releases). For example, the additional requirements for Orbit chains upgrading to ArbOS 20 can be found [here on the ArbOS 20 docs](../../node-running/reference/arbos-software-releases/arbos20.mdx#additional-requirements-for-arbitrum-orbit-chain-operators). Congratulations! You've upgraded your Orbit chain(s) to the specified ArbOS version. diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/customize-precompile.mdx b/arbitrum-docs/launch-orbit-chain/how-tos/customize-precompile.mdx index 7b89fe3295..6f8bf244ba 100644 --- a/arbitrum-docs/launch-orbit-chain/how-tos/customize-precompile.mdx +++ b/arbitrum-docs/launch-orbit-chain/how-tos/customize-precompile.mdx @@ -56,7 +56,7 @@ Next, follow the steps in [How to customize your Orbit chain's behavior](./custo :::info -Note that the instructions provided in [How to run a full node](/run-arbitrum-node/03-run-full-node.md) **will not** work with your Orbit node. See [Optional parameters (Orbit)](/node-running/how-tos/running-an-orbit-node.mdx#optional-parameters) for Orbit-specific CLI flags. +Note that the instructions provided in [How to run a full node](/node-running/how-tos/running-a-full-node.mdx) **will not** work with your Orbit node. See [Optional parameters (Orbit)](/node-running/how-tos/running-an-orbit-node.mdx#optional-parameters) for Orbit-specific CLI flags. ::: @@ -131,7 +131,7 @@ Next, follow the steps in [How to customize your Orbit chain's behavior](./custo :::info -Note that the instructions provided in [How to run a full node](/run-arbitrum-node/03-run-full-node.md) **will not** work with your Orbit node. See [Optional parameters (Orbit)](/node-running/how-tos/running-an-orbit-node.mdx#optional-parameters) for Orbit-specific CLI flags. +Note that the instructions provided in [How to run a full node](/node-running/how-tos/running-a-full-node.mdx) **will not** work with your Orbit node. See [Optional parameters (Orbit)](/node-running/how-tos/running-an-orbit-node.mdx#optional-parameters) for Orbit-specific CLI flags. ::: @@ -228,7 +228,7 @@ docker run --rm -it -v /some/local/dir/arbitrum:/home/user/.arbitrum -p 0.0.0.0 :::info -Note that the instructions provided in [How to run a full node](/run-arbitrum-node/03-run-full-node.md) **will not** work with your Orbit node. See [Optional parameters (Orbit)](/node-running/how-tos/running-an-orbit-node.mdx#optional-parameters) for Orbit-specific CLI flags. +Note that the instructions provided in [How to run a full node](/node-running/how-tos/running-a-full-node) **will not** work with your Orbit node. See [Optional parameters (Orbit)](/node-running/how-tos/running-an-orbit-node.mdx#optional-parameters) for Orbit-specific CLI flags. ::: @@ -312,7 +312,7 @@ docker run --rm -it -v /some/local/dir/arbitrum:/home/user/.arbitrum -p 0.0.0.0 :::info -Note that the instructions provided in [How to run a full node](/run-arbitrum-node/03-run-full-node.md) **will not** work with your Orbit node. See [Optional parameters (Orbit)](/node-running/how-tos/running-an-orbit-node.mdx#optional-parameters) for Orbit-specific CLI flags. +Note that the instructions provided in [How to run a full node](/node-running/how-tos/running-a-full-node) **will not** work with your Orbit node. See [Optional parameters (Orbit)](/node-running/how-tos/running-an-orbit-node.mdx#optional-parameters) for Orbit-specific CLI flags. ::: diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/customize-stf.mdx b/arbitrum-docs/launch-orbit-chain/how-tos/customize-stf.mdx index 96829f7112..1e398f69e5 100644 --- a/arbitrum-docs/launch-orbit-chain/how-tos/customize-stf.mdx +++ b/arbitrum-docs/launch-orbit-chain/how-tos/customize-stf.mdx @@ -133,7 +133,7 @@ docker run --rm -it -v /path/to/your/node/dir:/home/user/.arbitrum -p 0.0.0.0:84 :::info -Note that the instructions provided in [How to run a full node](/run-arbitrum-node/03-run-full-node.md) **will not** work with your Orbit node. See [Optional parameters (Orbit)](/node-running/how-tos/running-an-orbit-node.mdx#optional-parameters) for Orbit-specific CLI flags. +Note that the instructions provided in [How to run a full node](/node-running/how-tos/running-a-full-node.mdx) **will not** work with your Orbit node. See [Optional parameters (Orbit)](/node-running/how-tos/running-an-orbit-node.mdx#optional-parameters) for Orbit-specific CLI flags. ::: diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/manage-fee-collectors.md b/arbitrum-docs/launch-orbit-chain/how-tos/manage-fee-collectors.md deleted file mode 100644 index a9f177a018..0000000000 --- a/arbitrum-docs/launch-orbit-chain/how-tos/manage-fee-collectors.md +++ /dev/null @@ -1,306 +0,0 @@ ---- -title: 'How to manage the fee collector addresses of your Orbit chain' -description: 'Learn how to manage the fee collector addresses of your Orbit chain' -author: jose-franco -sme: jose-franco -sidebar_position: 6 -content_type: how-to ---- - -import PublicPreviewBannerPartial from '../partials/_orbit-public-preview-banner-partial.md'; - - - -As part of the activity of an Orbit chain, different fees are collected with every transaction. These fees are collected as a single amount (the transaction fees) but are internally split into different components depending on their purpose. Each component can also be transferred to a different fee collector address that can be configured on your chain. - -This guide describes the different fees that are collected, and explains how to specify the fee collector address on your chain for each fee type. - -## What fees are collected on an Orbit chain? - -There are four fee types that are collected on every transaction of an Orbit chain: - -- **Orbit base fee**: fees paid for executing the transaction on the chain based on the minimum base price configured. - -- **Orbit surplus fee**: if the chain is congested (i.e., the base price paid for the transaction is higher than the minimum base price), these fees account for executing the transaction on the chain based on any gas price paid above the minimum base price configured. - -- **Parent chain base fee**: relative fees paid for posting the transaction on the parent chain. This amount is calculated based on the transaction's estimated size and the current view of the parent chain's base fee. - -- **Parent chain surplus fee**: if configured, these are extra fees rewarded to the batch poster. - -You can find more detailed information about these fee types in these pages: - -- [L2 fees](/arbos/gas.mdx) for the Orbit base fee and surplus fee -- [L1 fees](/arbos/l1-pricing.mdx) for the Parent chain base fee and surplus fee - -## How to configure the fee collector addresses? - -Let's now look at how to configure the collector addresses for each fee type. - -### Orbit base fee - -Orbit base fees are paid to the `infraFeeAccount` configured in your chain. You can retrieve the current configured address by calling the method `getInfraFeeAccount()` of the [ArbOwnerPublic](/build-decentralized-apps/precompiles/02-reference.md#arbownerpublic) precompile. For example: - -```shell -cast call --rpc-url $ORBIT_CHAIN_RPC 0x000000000000000000000000000000000000006B "getInfraFeeAccount() (address)" -``` - -_Note: The [ArbOwner](/build-decentralized-apps/precompiles/02-reference.md#arbowner) precompile also has a `getInfraFeeAccount()` method that can be used, but only by the owner of the chain._ - -Alternatively, you can use the Orbit SDK to retrieve the current address configured as `infraFeeAccount`, by calling the [ArbOwner](/build-decentralized-apps/precompiles/02-reference.md#arbowner) precompile: - -```typescript -const orbitChainClient = createPublicClient({ - chain: , - transport: http(), -}).extend(arbOwnerPublicActions); - -const infraFeeAccount = await orbitChainClient.arbOwnerReadContract({ - functionName: 'getInfraFeeAccount', -}); -``` - -To set a new `infraFeeAccount`, use the method `setInfraFeeAccount(address)` of the [ArbOwner](/build-decentralized-apps/precompiles/02-reference.md#arbowner) precompile. For example: - -```shell -cast send --rpc-url $ORBIT_CHAIN_RPC --private-key $OWNER_PRIVATE_KEY 0x0000000000000000000000000000000000000070 "setInfraFeeAccount(address) ()" $NEW_INFRAFEEACCOUNT_ADDRESS -``` - -Or using the Orbit SDK: - -```typescript -const owner = privateKeyToAccount(); -const orbitChainClient = createPublicClient({ - chain: , - transport: http(), -}).extend(arbOwnerPublicActions); - -const transactionRequest = await orbitChainClient.arbOwnerPrepareTransactionRequest({ - functionName: 'setInfraFeeAccount', - args: [], - upgradeExecutor: false, - account: owner.address, -}); - -await orbitChainClient.sendRawTransaction({ - serializedTransaction: await owner.signTransaction(transactionRequest), -}); -``` - -### Orbit surplus fee - -Orbit surplus fees are paid to the `networkFeeAccount` configured in your chain. You can retrieve the current configured address by calling the method `getNetworkFeeAccount()` of the [ArbOwnerPublic](/build-decentralized-apps/precompiles/02-reference.md#arbownerpublic) precompile. For example: - -```shell -cast call --rpc-url $ORBIT_CHAIN_RPC 0x000000000000000000000000000000000000006B "getNetworkFeeAccount() (address)" -``` - -_Note: The [ArbOwner](/build-decentralized-apps/precompiles/02-reference.md#arbowner) precompile also has a `getNetworkFeeAccount()` method that can be used, but only by the owner of the chain._ - -Alternatively, you can use the Orbit SDK to retrieve the current address configured as `networkFeeAccount`, by calling the [ArbOwner](/build-decentralized-apps/precompiles/02-reference.md#arbowner) precompile: - -```typescript -const orbitChainClient = createPublicClient({ - chain: , - transport: http(), -}).extend(arbOwnerPublicActions); - -const networkFeeAccount = await orbitChainClient.arbOwnerReadContract({ - functionName: 'getNetworkFeeAccount', -}); -``` - -To set a new `networkFeeAccount`, use the method `setNetworkFeeAccount(address)` of the [ArbOwner](/build-decentralized-apps/precompiles/02-reference.md#arbowner) precompile. For example: - -```shell -cast send --rpc-url $ORBIT_CHAIN_RPC --private-key $OWNER_PRIVATE_KEY 0x0000000000000000000000000000000000000070 "setNetworkFeeAccount(address) ()" $NEW_NETWORKFEEACCOUNT_ADDRESS -``` - -Or using the Orbit SDK: - -```typescript -const owner = privateKeyToAccount(); -const orbitChainClient = createPublicClient({ - chain: , - transport: http(), -}).extend(arbOwnerPublicActions); - -const transactionRequest = await orbitChainClient.arbOwnerPrepareTransactionRequest({ - functionName: 'setNetworkFeeAccount', - args: [], - upgradeExecutor: false, - account: owner.address, -}); - -await orbitChainClient.sendRawTransaction({ - serializedTransaction: await owner.signTransaction(transactionRequest), -}); -``` - -### Parent chain base fee - -:::info ArbAggregator currently not supported in the Orbit SDK - -Reading information from the `ArgAggregator` precompile or using it to set new information is currently not supported by the Orbit SDK but will be added soon. So, for now, this subsection will only show examples using `cast call` and `cast send`. - -::: - -Parent chain base fees are paid to the fee collector of the active batch poster configured in your chain. The current configured batch posters can be obtained by calling the method `getBatchPosters()` of the [ArbAggregator](/build-decentralized-apps/precompiles/02-reference.md#arbaggregator) precompile. For example: - -```shell -cast call --rpc-url $ORBIT_CHAIN_RPC 0x000000000000000000000000000000000000006D "getBatchPosters() (address[])" -``` - -This list has to also be verified against the `SequencerInbox` contract living on the parent chain. This contract needs to have any of those addresses in its `isBatchPoster` mapping. To verify a specific address, you can check the mapping directly like this: - -```shell -cast call --rpc-url $PARENT_CHAIN_RPC $SEQUENCER_INBOX_ADDRESS "isBatchPoster(address) (bool)" $BATCH_POSTER_ADDRESS -``` - -Once you have the current batch poster, you can obtain the fee collector address configured for that batch poster by calling the method `getFeeCollector(address)` of the [ArbAggregator](/build-decentralized-apps/precompiles/02-reference.md#arbaggregator) precompile and passing the address of the batch poster. - -```shell -cast call --rpc-url $ORBIT_CHAIN_RPC 0x000000000000000000000000000000000000006D "getFeeCollector(address) (address)" $BATCH_POSTER_ADDRESS -``` - -To set a new fee collector for a specific batch poster, use the method `setFeeCollector(address, address)` of the [ArbAggregator](/build-decentralized-apps/precompiles/02-reference.md#arbaggregator) precompile and pass the address of the batch poster and the address of the new fee collector. - -```shell -cast send --rpc-url $ORBIT_CHAIN_RPC --private-key $OWNER_PRIVATE_KEY 0x000000000000000000000000000000000000006D "setFeeCollector(address,address) ()" $BATCH_POSTER_ADDRESS $NEW_FEECOLLECTOR_ADDRESS -``` - -Finally, if you want to set a new batch poster, you can call the method `addBatchPoster(address)` of the of the [ArbAggregator](/build-decentralized-apps/precompiles/02-reference.md#arbaggregator) precompile and pass the address of the new batch poster, and later call the method `setIsBatchPoster(address,bool)` of the SequencerInbox contract on the parent chain. - -```shell -cast send --rpc-url $ORBIT_CHAIN_RPC --private-key $OWNER_PRIVATE_KEY 0x000000000000000000000000000000000000006D "addBatchPoster(address) ()" $NEW_BATCH_POSTER_ADDRESS -``` - -```shell -cast send --rpc-url $PARENT_CHAIN_RPC --private-key $OWNER_PRIVATE_KEY $SEQUENCER_INBOX_ADDRESS "setIsBatchPoster(address,bool) ()" $NEW_BATCH_POSTER_ADDRESS true -``` - -_Note: When setting a new batch poster, its fee collector will be configured to the same address by default._ - -### Parent chain surplus fee - -Parent chain surplus fees are paid to a specific `L1RewardRecipient` address that is configured individually per chain. The current fee collector address can be obtained by calling the method `getL1RewardRecipient()` of the [ArbGasInfo](/build-decentralized-apps/precompiles/02-reference.md#arbgasinfo) precompile. For example: - -```shell -cast call --rpc-url $ORBIT_CHAIN_RPC 0x000000000000000000000000000000000000006C "getL1RewardRecipient() (address)" -``` - -To get the amount of rewards that are being paid to this fee collector, you can call the method `getL1RewardRate()` of the [ArbGasInfo](/build-decentralized-apps/precompiles/02-reference.md#arbgasinfo) precompile. This function will return the amount of wei per gas unit paid to the `L1RewardRecipient` configured. For example: - -```shell -cast call --rpc-url $ORBIT_CHAIN_RPC 0x000000000000000000000000000000000000006C "getL1RewardRate() (uint64)" -``` - -Alternatively, you can obtain this information using the Orbit SDK: - -```typescript -const orbitChainClient = createPublicClient({ - chain: , - transport: http(), -}).extend(arbGasInfoPublicActions); - -const parentChainRewardRecipient = await orbitChainClient.arbGasInfoReadContract({ - functionName: 'getL1RewardRecipient', -}); - -const parentChainRewardRate = await orbitChainClient.arbGasInfoReadContract({ - functionName: 'getL1RewardRate', -}); -``` - -To set a new `L1RewardRecipient` address, you can call the method `setL1PricingRewardRecipient(address)` of the [ArbOwner](/build-decentralized-apps/precompiles/02-reference.md#arbowner) precompile, and pass the address of the new reward recipient. For example: - -```shell -cast send --rpc-url $ORBIT_CHAIN_RPC --private-key $OWNER_PRIVATE_KEY 0x0000000000000000000000000000000000000070 "setL1PricingRewardRecipient(address) ()" $NEW_L1REWARDRECIPIENT_ADDRESS -``` - -Alternatively, you can use the Orbit SDK to set the new address: - -```typescript -const owner = privateKeyToAccount(); -const orbitChainClient = createPublicClient({ - chain: , - transport: http(), -}).extend(arbOwnerPublicActions); - -const transactionRequest = await orbitChainClient.arbOwnerPrepareTransactionRequest({ - functionName: 'setL1PricingRewardRecipient', - args: [], - upgradeExecutor: false, - account: owner.address, -}); - -await orbitChainClient.sendRawTransaction({ - serializedTransaction: await owner.signTransaction(transactionRequest), -}); -``` - -To change the reward rate, you can use the method `setL1PricingRewardRate(uint64)` of the [ArbOwner](/build-decentralized-apps/precompiles/02-reference.md#arbowner) precompile and pass the amount of wei per gas unit to reward. For example: - -```shell -cast send --rpc-url $ORBIT_CHAIN_RPC --private-key $OWNER_PRIVATE_KEY 0x0000000000000000000000000000000000000070 "setL1PricingRewardRate(uint64) ()" $NEW_REWARD_RATE -``` - -Or using the Orbit SDK: - -```typescript -const owner = privateKeyToAccount(); -const orbitChainClient = createPublicClient({ - chain: , - transport: http(), -}).extend(arbOwnerPublicActions); - -const transactionRequest = await orbitChainClient.arbOwnerPrepareTransactionRequest({ - functionName: 'setL1PricingRewardRate', - args: [], - upgradeExecutor: false, - account: owner.address, -}); - -await orbitChainClient.sendRawTransaction({ - serializedTransaction: await owner.signTransaction(transactionRequest), -}); -``` - -## How to use the fee distribution contracts? - -For now, we've described how to set the individual collector addresses for each fee type. Some chains may require multiple addresses to receive the collected fees of any of the available types. In those cases, there's the possibility of using a distributor contract that can gather all fees of a specific type and distribute those among multiple addresses. - -This section shows how to configure a distributor contract to manage the fees of a specific type. - -:::info Distributor contracts currently not supported in the Orbit SDK - -Currently, the Orbit SDK doesn't support deploying and configuring distribution contracts, but it will soon be added. So, for now, this section will only show examples using `cast send`. - -::: - -### Step 1. Deploy the distributor contract - -An example implementation of a distributor contract can be found [here](https://github.com/OffchainLabs/fund-distribution-contracts/blob/main/src/RewardDistributor.sol). You'll have to deploy this contract on your Orbit chain. - -### Step 2. Set the contract address as the desired fee type collector address - -Use the instructions provided in the previous section to set the address of the deployed distributor contract as the collector of the desired fee type. For example, if you want the distributor contract to manage the Orbit surplus fees, set the `networkFeeAccount` to the address of the deployed contract. - -### Step 3. Configure the recipients of fees in the contract - -Now you can set the different addresses that will be receiving fees from that distributor contract. To do that, you can call the method `setRecipients(address[], uint256[])` of the distributor contract, and specify the list of addresses that will be receiving fees, and the proportion of fees for each address. - -For example, if you want to set two addresses as receivers, with the first one receiving 80% of the fees and the second one receiving 20% of the fees, you'll use the following parameters: - -```shell -cast send --rpc-url $ORBIT_CHAIN_RPC --private-key $OWNER_PRIVATE_KEY $DISTRIBUTOR_CONTRACT_ADDRESS "setRecipients(address[],uint256[]) ()" "[$RECEIVER_1, $RECEIVER_2]" "[8000, 2000]" -``` - -### Step 4. Trigger the distribution of fees - -With the recipients configured in the distributor contract, and with the contract having collected some fees, you can now trigger the distribution of fees to the recipients by using the method `distributeRewards(address[], uint256[])` of the distributor contract, and specifying the list of addresses that are configured, and the proportion of fees for each address. The parameters passed must match the information that is set in the contract (i.e., you can't specify different addresses or proportions than what's been configured beforehand). - -For example, if you want to distribute the fees to the two addresses specified before, you'll use the following parameters: - -```shell -cast send --rpc-url $ORBIT_CHAIN_RPC --private-key $OWNER_PRIVATE_KEY $DISTRIBUTOR_CONTRACT_ADDRESS "distributeRewards(address[],uint256[]) ()" "[$RECEIVER_1, $RECEIVER_2]" "[8000, 2000]" -``` diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-chain-finality.md b/arbitrum-docs/launch-orbit-chain/how-tos/orbit-chain-finality.md deleted file mode 100644 index 3334249177..0000000000 --- a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-chain-finality.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: 'How to configure delayed inbox finality' -description: 'Learn how to configure delayed inbox finality on your Orbit chain.' -author: leartulaj -sme: leartulaj -user_story: As an Orbit chain deployer, I want to understand how to fine-tune parameters associated with delayed inbox finality on my Orbit chain. -content_type: how-to ---- - -## Child chain transactions - -Generally, transactions executed through the sequencer on Orbit chains [achieve finality](/tx-lifecycle.mdx) equivalent to their parent chain once the relevant transaction data has been [posted in a batch](/sequencer.mdx). This means that transactions on Orbit chains are considered final in minutes. - -## Parent chain → child chain transactions - -Messages being sent through the delayed inbox of a parent chain as [retryable tickets](/arbos/l1-to-l2-messaging.mdx#retryable-tickets), including deposits through token bridges, are released by the [sequencer](/inside-arbitrum-nitro/inside-arbitrum-nitro.mdx#if-the-sequencer-is-well-behaved) once it has reasonable confidence of finality on the parent chain. For example, on an L2 chain settling to Ethereum, the sequencer will release delayed messages to the inbox after 40 blocks. Following this, the transaction must complete another finality period for the Ethereum transaction that promoted it to achieve finality. - -Orbit L3s may configure the finality of transactions executed through the delayed inbox to depend on different layers of finality. By default, Orbit chains will rely on the number of L1 block confirmations, effectively finalizing an L3 deposit as soon as L1 finalizes the batch posted by Arbitrum One or when a DACert is posted by Arbitrum Nova. This would be on the order of tens of minutes. - -However, in the instance of an L3 settling to Arbitrum One or Nova an L3 may also choose to rely only on L2 finality by configuring their sequencer as follows: - -``` ---node.delayed-sequencer.use-merge-finality=false -``` - -Additionally, the delay in L3 finalization can be decreased to achieve extremely fast (<1 min) deposits by configuring the sequencer to wait for fewer L2 block confirmations: - -``` ---node.delayed-sequencer.finalize-distance=1 -``` - -Note, however, that if you choose to enable fast bridging, a re-org of un-finalized blocks on the L3 may occur if Arbitrum One/Nova (or the settlement chain of choice) experiences a re-org. - -## Child chain → parent chain transactions - -Normally, [outgoing transactions](/arbos/l2-to-l1-messaging.mdx) must wait until the assertion that includes their L2 message is confirmed (~one week) before a client can execute the message on L1. However, in the near future [Anytrust](/inside-anytrust.mdx) chains will be able to leverage their DAC to enable fast confirmations of withdrawals through the native token bridge. By immediately confirming assertions that have been signed by the DAC, finality can be reduced to ~fifteen minutes. diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-configuring-orbit-chain.md b/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-configuring-orbit-chain.md deleted file mode 100644 index 516b0faa7e..0000000000 --- a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-configuring-orbit-chain.md +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: 'How to configure your Orbit chain using the Orbit SDK' -sidebar_label: 'Configure your chain' -description: 'How to configure an Orbit chain using the Orbit SDK ' -author: GreatSoshiant -sme: GreatSoshiant -target_audience: 'Developers deploying and maintaining Orbit chains.' -sidebar_position: 6 ---- - -In this how-to, you'll learn how to configure your Orbit chain using the Orbit SDK. This includes **parent chain**, **node**, and **child chain parameter** configuration. - -:::caution UNDER CONSTRUCTION - -This document is under construction and may change significantly as we incorporate [style guidance](/for-devs/contribute#document-type-conventions) and feedback from readers. Feel free to request specific clarifications by clicking the `Request an update` button at the top of this document. - -::: - -## 1. Parent Chain Configuration - -Configuring the parent chain is an essential initial step in setting up your Orbit chain. Most of these configurations are specified during the setup phase. Detailed instructions can be found in the [Rollup Deployment Parameters](orbit-sdk-deploying-rollup-chain#rollup-deployment-parameter) section of the rollup deployment guide. - -After the initial setup, the chain owner can modify configurations as needed. For instance, the validator set can be updated by invoking the [`setValidKeyset`](https://github.com/OffchainLabs/nitro-contracts/blob/90037b996509312ef1addb3f9352457b8a99d6a6/src/bridge/SequencerInbox.sol#L751) function with a new set of validators. This adaptability facilitates continuous optimization and management of the chain. - -## 2. Node Configuration - -This category includes settings adjustable within the `nodeConfig.json` file, directly impacting the operation of the chain's nodes, including special nodes like validators and sequencers. These settings are vital for tailoring the node's functionality to specific requirements or performance criteria. The chain owner can modify these configurations during the node config generation process, ensuring that each node operates with the desired settings from the start. For more information, refer to the [Node Configuration Preparation](orbit-sdk-preparing-node-config.md) documentation. - -## 3. Child Chain Parameter Configuration - -The final configuration type involves setting parameters on the child chain. This level of configuration is primarily achieved through the [ArbOwner precompile](https://github.com/OffchainLabs/nitro-contracts/blob/main/src/precompiles/ArbOwner.sol) on the child chain. These configurations are typically applied post-chain initialization and after the deployment of the token bridge. This guide will help you configure child chain parameters using the Orbit SDK, providing insights into effective management and optimization strategies for your child chain operations. - -The child chain configuration can be performed after the chain initialization. These parameters are configurable via setter functions in the [ArbOwner precompile](https://github.com/OffchainLabs/nitro-contracts/blob/main/src/precompiles/ArbOwner.sol). Additionally, there are various getter functions in the ArbOwner precompile that you can use to read the current configuration. Below, we explain several methods in the ArbOwner precompile that you can use to configure the parameters or read their current state. - -### Setter Functions - -You can use these setter functions to configure the child chain parameters: - -| Parameter | Description | -| :--------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `addChainOwner` | Allows you to add a new chain owner to your Orbit chain. | -| `removeChainOwner` | Enables you to remove an existing owner from the list of chain owners. | -| `setMinimumL2BaseFee` | Sets the minimum base fee on the child chain. The minimum base fee is the lowest amount that the base fee on the child chain can ever be. For example, the current minimum base fee on Arbitrum One and Arbitrum Nova is 0.01 gwei. | -| `setSpeedLimit` | The fee mechanism on the Arbitrum Nitro stack differs from the Ethereum blockchain. The Nitro stack has a parameter called the speed limit, which targets the number of gas consumed on the child chain per second. If the amount of gas per second exceeds this pre-specified amount, the base fee on the child chain will increase, and vice versa. The current speed limit on Arbitrum One is 7 million gas per second, meaning if the Arbitrum One chain consumes more than 7 million gas per second, its base fee will increase. For more information on the speed limit, please refer to this [document explaining the concept of speed limit in the Nitro stack](https://docs.arbitrum.io/inside-arbitrum-nitro/#the-speed-limit). | -| `setInfraFeeAccount` | Sets the infrastructure fee account address, which receives all fees collected on the child chain. It is meant to receive the minimum base fee, with any amount above that going to the network fee account. | -| `setNetworkFeeAccount` | Sets the network fee account address. As mentioned, this address collects all fees above the base fee. Note that if you set this amount to the 0 address on your chain, all fees will be deposited into the infrastructure fee account. | -| `scheduleArbOSUpgrade` | If you plan to upgrade the ArbOS version of your chain, this method can help you schedule the upgrade. For a complete guide on this matter, please refer to the explanation of the [arbos upgrade](arbos-upgrade.md). | -| `setChainConfig` | We discussed the chainConfig in the [Rollup deployment guide](orbit-sdk-deploying-rollup-chain.md#chain-config-parameter) in detail. If you wish to change any field of the `chainConfig`, you need to use this method on the child chain. | - -### Getter Functions - -| Parameter | Description | -| :--------------------- | :--------------------------------------------------------------------- | -| `getAllChainOwners` | Provides the list of all current chain owners. | -| `isChainOwner` | Allows you to check whether an address is on the list of chain owners. | -| `getInfraFeeAccount` | Returns the infrastructure fee account address. | -| `getNetworkFeeAccount` | Returns the network fee account address. | - -### Configuring the Child Chain Using the Orbit SDK - -In the Orbit SDK, we use the [Client Extension](https://viem.sh/docs/clients/custom#extending-with-actions-or-configuration) feature of Viem to extend the public client. In the Orbit SDK, we defined `arbOwnerPublicActions` to use it and extend the client on Viem. An example of creating a public client extended with arbOwner public actions is: - -```js -import { createPublicClient, http } from 'viem'; -import { arbOwnerPublicActions } from '@arbitrum/orbit-sdk'; - -const client = createPublicClient({ - chain: arbitrumLocal, - transport: http(), -}).extend(arbOwnerPublicActions); -``` - -With `arbOwnerPublicActions` and the public client in the Orbit SDK, we've added two new methods to the public clients: - -#### 1. arbOwnerReadContract - -This method can be used to read the parameters of the child chain discussed in the [previous section](#getter-functions). An example of using this method with the `client` defined in the previous section is: - -```js -const result = await client.arbOwnerReadContract({ - functionName: 'getAllChainOwners', -}); -``` - -Changing the function names in the list in [the Getter functions section](#getter-functions) will give you the other parameters. - -#### 2. `arbOwnerPrepareTransactionRequest` - -This method can be used to configure the parameters on the ArbOwner precompile, which are listed in [the Setter functions section](#setter-functions). An example of utilizing this method to configure parameters using the `client` defined in the previous section is: - -```js -// Adding a random address as chain owner using the upgrade executor -const transactionRequest = await client.arbOwnerPrepareTransactionRequest({ - functionName: 'addChainOwner', - args: [randomAccountAddress], - upgradeExecutor: false, - account: owner.address, -}); - -// Submitting the transaction to add a chain owner -await client.sendRawTransaction({ - serializedTransaction: await owner.signTransaction(transactionRequest), -}); -``` - -To use this method as shown in the example above, some inputs need to be defined: - -| Parameter | Description | -| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `functionName` | The name of the method you want to use to set the parameter, which can be found in [the Setter functions section](#setter-functions). | -| `args` | The arguments for the defined function. | -| `upgradeExecutor` | Specifies whether an `upgradeExecutor` contract governs your chain. If it is not using an `upgradeExecutor`, you can set it to `false`, similar to the example above. | -| `account` | Defines the chain owner if an `upgradeExecutor` does not govern the chain. | - -If an `upgradeExecutor` contract governs your chain, then you need to use the `arbOwnerPrepareTransactionRequest` method, similar to the example below: - -```js -// Adding a random address as chain owner using the upgrade executor -const transactionRequest = await client.arbOwnerPrepareTransactionRequest({ - functionName: 'addChainOwner', - args: [randomAccountAddress], - upgradeExecutor: upgradeExecutorAddress, - account: owner.address, -}); - -// Submitting the transaction to add a chain owner -await client.sendRawTransaction({ - serializedTransaction: await owner.signTransaction(transactionRequest), -}); -``` - -In this example, all the fields are the same as in the first example, except the `upgradeExecutor` field, which you need to set to the `upgradeExecutor` address, and the `account` parameter, which needs to be set to the owner of the `upgradeExecutor` contract. diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-anytrust-chain.md b/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-anytrust-chain.md deleted file mode 100644 index 28291a82b7..0000000000 --- a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-anytrust-chain.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: 'How to Deploy an AnyTrust chain using the Orbit SDK' -sidebar_label: 'Deploy an AnyTrust chain' -description: 'How to deploy an AnyTrust chain using the Orbit SDK ' -author: GreatSoshiant -sme: GreatSoshiant -target_audience: 'Developers deploying and maintaining Orbit chains.' -sidebar_position: 2 ---- - -This section explains how to to initiate an AnyTrust Orbit chain using [Arbitrum's Orbit SDK](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/main/examples/set-valid-keyset/index.ts). - -:::caution UNDER CONSTRUCTION - -This document is under construction and may change significantly as we incorporate [style guidance](/for-devs/contribute#document-type-conventions) and feedback from readers. Feel free to request specific clarifications by clicking the `Request an update` button at the top of this document. - -::: - -:::info - -See the ["set-valid-keyset" example](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/main/examples/set-valid-keyset/index.ts) in the Orbit SDK repository for additional guidance. - -::: - -### About AnyTrust Orbit - -AnyTrust chains follow a different model than Rollup chains, offering unique features and deployment processes. For a comprehensive understanding of the general principles of Orbit chains and the differences between Orbit chain types, please refer to the [Orbit SDK introduction](../orbit-sdk-introduction.md) page. - -### Deployment Steps - -The deployment process of AnyTrust chains is very similar to that of [Rollup chain](orbit-sdk-deploying-rollup-chain.md#rollup-config-param) but with some differences that we'll go through in this guide. - -Here are the steps involved in the deployment process: - -1. **[Setting Up the Chain Parameters](#1-setting-up-the-chain-parameters)** -2. **[Deploying Your AnyTrust chain](#2-deploying-your-anytrust-chain)** -3. **Getting the AnyTrust Orbit Chain Information After Deployment** -4. **Setting Valid Keyset on Parent Chain** - -The deployment of an AnyTrust Orbit chain involves defining and setting up the `Data Availability Committee (DAC)` keyset. This keyset, comprising keys from the appointed members of the DAC, is essential for ensuring data availability and integrity. Once you have selected your committee members and gathered their keys, these keys are then configured into a keyset using the Orbit SDK. This keyset is subsequently embedded into the chain, serving as a verification mechanism to maintain the trust and security of the AnyTrust chain. The proper configuration and deployment of this keyset are vital for the effective operation and reliability of the AnyTrust model within the Arbitrum Orbit framework. - -Let's go through each step: - -### 1. Setting Up the Chain Parameters - -Similarly to the Rollup chain, you'll need to prepare the AnyTrust chain configuration, including the core contracts and operational parameters that govern the chain's functionality, focusing on parameters that are specific to AnyTrust chains. - -```solidity -struct Config { - uint64 confirmPeriodBlocks; - uint64 extraChallengeTimeBlocks; - address stakeToken; - uint256 baseStake; - bytes32 wasmModuleRoot; - address owner; - address loserStakeEscrow; - uint256 chainId; - string chainConfig; - uint64 genesisBlockNum; - ISequencerInbox.MaxTimeVariation sequencerInboxMaxTimeVariation; -} -``` - -The `chainConfig` parameter within the `Config` structure is an essential element for tailoring your Orbit chain according to specific needs. This parameter is particularly significant when setting up an AnyTrust Orbit chain, as it includes configurations that distinguish it from a Rollup chain. The key parameter that differentiates an AnyTrust chain in this context is the `DataAvailabilityCommittee`. - -Start by setting up the chain configuration parameters. This includes defining key elements like: - -| Parameter | Description | -| :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- | -| `chainId` | Your Orbit chain's unique identifier. It differentiates your chain from others in the ecosystem. | -| `DataAvailabilityCommittee` | Set to `false`, this boolean makes your chain as a Rollup, set to `true` configures it as an AnyTrust chain. | -| `InitialChainOwner` | Identifies who owns and controls the chain. | -| `MaxCodeSize ` | Sets the maximum size for contract bytecodes on the Orbit chain. e.g. Ethereum mainnet has a limit of 24,576 Bytes. | -| `MaxInitCodeSize` | Similar to `MaxCodeSize`, defines the maximum size for your Orbit chain's **initialization** code. e.g. Ethereum mainnet limit is 49,152 Bytes. | - -For an AnyTrust chain, you need to set the `DataAvailabilityCommittee` to **true**. This setting is crucial as it indicates the chain's reliance on a committee for data availability, which is a hallmark of the AnyTrust model. - -Here’s an example of how to configure the `chainConfig` for an AnyTrust chain using the Orbit SDK: - -```js -import { prepareChainConfig } from '@arbitrum/orbit-sdk'; - -const chainConfig = prepareChainConfig({ - chainId: Some_Chain_ID, - arbitrum: { InitialChainOwner: deployer_address, DataAvailabilityCommittee: true }, -}); -``` - -In this example, you set up the chain configuration with a specific `chainId`, the `InitialChainOwner` as the deployer's address, and importantly, you configure the `DataAvailabilityCommittee` as `true`. This configuration ensures that your Orbit chain is set up as an AnyTrust chain, utilizing the unique features and operational model of the AnyTrust system within the Arbitrum Orbit framework. - -These parameters tailor the chain to your specific requirements and operational context. - -The Orbit SDK has a helper to execute this part: - -For an easier config preparation, the Orbit SDK provides the `prepareChainConfig` API, which takes config parameters as arguments and returns a `chainConfig` `JSON` string. Any parameters not provided will default to standard values, which are detailed in the [Orbit SDK documentation](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/1f251f76a55bc1081f50938b0aa9f7965660ebf7/src/prepareChainConfig.ts#L3-L31). - -### 2. Deploying Your AnyTrust Chain - -After configuring your chain with the `createRollupPrepareConfig` API, the next step is to use the `createRollupPrepareTransactionRequest` API. This API is designed to take the parameters defined in the `RollupDeploymentParams`, along with the configuration generated by the `createRollupPrepareConfig` API, to prepare a transaction request. This request is then used to invoke the `createRollup` function of the `RollupCreator` contract, which effectively deploys and initializes the core contracts of your AnyTrust Orbit chain. - -For instance, to deploy using the Orbit SDK with a Config equal to `config`, a `batchPoster`, and a set of validators such as `[validator]`, the process would look like this: - -```js -import { createRollupPrepareTransactionRequest } from '@arbitrum/orbit-sdk'; - -const request = await createRollupPrepareTransactionRequest({ - params: { - config, - batchPoster, - validators: [validator], - }, - account: deployer_address, - publicClient, -}); -``` - -After creating the raw transaction, you can sign and broadcast it to the network. - -### 3. Getting the AnyTrust Orbit Chain Information After Deployment - -To extract detailed information about your AnyTrust Orbit chain post-deployment, you will use the same API and steps as you would for a Rollup Orbit chain. Here's a reminder of the example: - -```js -import { createRollupPrepareTransactionReceipt } from '@arbitrum/orbit-sdk'; - -const data = createRollupPrepareTransactionReceipt(txReceipt); -``` - -In this example, `txReceipt` refers to the transaction receipt you received after deploying the AnyTrust chain. By inputting this receipt into the `createRollupPrepareTransactionReceipt` function, you can access comprehensive data about your deployment, including details about the core contracts and configuration settings. - -### 4. Setting Valid Keyset on Parent Chain: - -The final step in deploying your AnyTrust Orbit chain is to set up the valid keyset for your Data Availability Committee (DAC) on the parent chain. This keyset is essential for ensuring the integrity of the certificates that the DAC signs when storing Orbit chain's data. The process of generating keys and the keyset for your committee is comprehensively explained in our documentation. Once you have your keyset, it needs to be established on the `SequencerInbox` contract of your Orbit chain on the parent chain. - -To facilitate this, we provide an API in Orbit SDK named `setValidKeysetPrepareTransactionRequest`. This API aids in setting the keyset on the parent chain. To use this API, you need specific information that you gathered in step 3. This includes the `upgradeExecutor` and `sequencerInbox` addresses of your Orbit chain, the generated keyset for your committee, and the account of the owner. - -Here's an example of how you can use the Orbit SDK to set the keyset: - -```js -const txRequest = await setValidKeysetPrepareTransactionRequest({ - coreContracts: { - upgradeExecutor: 'upgradeExecutor_address', - sequencerInbox: 'sequencerInbox_address', - }, - keyset, - account: deployer.address, - publicClient: parentChainPublicClient, -}); -``` - -In this example, `upgradeExecutor_address` and `sequencerInbox_address` are placeholders for the actual addresses of the respective contracts in your Orbit chain. `keyset` is the keyset you generated for your committee, and `deployer.address` refers to the owner's account address. - -After you create the transaction request using the above API, the next step is to sign and send the transaction. This action will effectively set the keyset on the parent chain, allowing it to recognize and verify the valid keyset for your AnyTrust Orbit chain. This step is crucial for the operational integrity and security of your AnyTrust chain, ensuring that the data verified by the DAC is recognized and accepted by the parent chain. diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-custom-gas-token-chain.md b/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-custom-gas-token-chain.md deleted file mode 100644 index c9c6f28ebc..0000000000 --- a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-custom-gas-token-chain.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: 'How to deploy a custom gas token chain using the Orbit SDK' -sidebar_label: 'Deploy a custom gas token chain' -description: 'How to deploy a custom gas token chain using the Orbit SDK' -author: GreatSoshiant -sme: GreatSoshiant -target_audience: 'Developers deploying and maintaining Orbit chains.' -sidebar_position: 3 -user_story: As a current or prospective Orbit chain deployer, I need to understand how to deploy a custom gas token chain using the Orbit SDK. -content_type: how-to ---- - -:::caution UNDER CONSTRUCTION - -This document is under construction and may change significantly as we incorporate [style guidance](/for-devs/contribute#document-type-conventions) and feedback from readers. Feel free to request specific clarifications by clicking the `Request an update` button at the top of this document. - -::: - -:::info - -See the ["create a rollup custom fee token" example](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/main/examples/create-rollup-custom-fee-token/index.ts) in the Orbit SDK repository for additional guidance. - -::: - -This guide will help you configure and deploy a custom gas token Orbit chain. - -Custom gas token orbit chains let participants pay transaction fees in `ERC-20` token instead of `ETH`, which is ideal for use cases requiring this feature and low transaction fees. You can learn more on our page covering [custom gas token requirements and configuration](use-a-custom-gas-token.mdx). - -Deploying a custom gas token Orbit chain is similar to deploying an AnyTrust Orbit chain but with additional steps. To take advantage of all the chains configurations supported by Orbit, we recommend reading our short guides about [Rollup](orbit-sdk-deploying-rollup-chain.md) and [AnyTrust](orbit-sdk-deploying-anytrust-chain.md) configuration. - -:::note - -- Custom gas tokens are **not supported yet** on Rollup Orbit chains, only on Orbit AnyTrust chains. -- `ERC-20` tokens need 18 decimals to operate as gas tokens on Orbit chains. - -::: - -## 1. Custom gas token specification - -The difference between custom gas token chains and other Orbit chains is the use of an `ERC-20` token as gas. Enabling this feature requires that you select an existing `ERC-20` token or deploy a new one on the parent chain. - -## 2. Chain configuration - -You can configure your Orbit chain using the [`prepareChainConfig`](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/1f251f76a55bc1081f50938b0aa9f7965660ebf7/src/prepareChainConfig.ts#L3-L31) method and assigning it to a `chainConfig` variable. - -Example: - -```js -import { prepareChainConfig } from '@arbitrum/orbit-sdk'; - -const chainConfig = prepareChainConfig({ - chainId: Some_Chain_ID, - nativeToken: yourERC-20TokenAddress, - DataAvailabilityCommittee: true, -}); -``` - -To use the `prepareChainConfig` method as shown in the example above, some inputs need to be defined: - -| Parameter | Type | Description | -| --------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `chainId` | `number` | Your Orbit chain's `chainId`. | -| `nativeToken` | `Address` | The contract address on the parent chain of the `ERC-20` token your chain will use for `gas` fees. It needs to have 18 decimals to be accepted on Orbit chains. | -| `DataAvailabilityCommittee` | `boolean` | Should be set to `true` since only AnyTrust chains can accept `ERC-20` tokens. | - -## 3. Token approval before deployment process - -In Custom gas token Orbit chains, the owner needs to give allowance to the `rollupCreator` contract before starting the deployment process so that `rollupCreator` can spend enough tokens for the deployment process. For this purpose, we defined two APIs on the Orbit SDK: - -#### A. createRollupEnoughCustomFeeTokenAllowance - -This API gets related inputs and checks if the `rollupCreator` contract has enough token `Allowance` from the owner: - -```js -import {createRollupEnoughCustomFeeTokenAllowance} from '@arbitrum/orbit-sdk'; - -const allowanceParams = { -nativeToken, -account: deployer.address, -publicClient: parentChainPublicClient, -}; - -const enough Allowance = createRollupEnoughCustomFeeTokenAllowance(allowanceParams) -``` - -To build the `allowanceParams` object as shown in the example above, you need to provide with the following: - -| Parameter | Type | Description | -| -------------- | -------------- | ----------------------------------------------------------------------------------------------------- | -| `nativeToken` | `Address` | The contract address on the parent chain of the `ERC-20` token your chain will use for `gas` fees. | -| `account` | `Address` | The address of the Orbit chain's deployer. | -| `publicClient` | `PublicClient` | The `PublicClient` object [as defined by the Viem library](https://viem.sh/docs/clients/public.html). | - -#### B. createRollupPrepareCustomFeeTokenApprovalTransactionRequest - -This API gets related inputs and creates the transaction request to secure enough allowance from the owner to the `RollupCreator` to spend `nativeToken` on the deployment process. - -Example: - -```js -import { createRollupEnoughCustomFeeTokenAllowance } from '@arbitrum/orbit-sdk'; - -const allowanceParams = { - nativeToken, - account: deployer.address, - publicClient: parentChainPublicClient, -}; - -const approvalTxRequest = await createRollupPrepareCustomFeeTokenApprovalTransactionRequest( - allowanceParams, -); -``` - -## 4. Deployment process - -The overall deployment process, including the use of APIs like `createRollupPrepareConfig` and `createRollupPrepareTransactionRequest`, remains similar to the [AnyTrust deployment](orbit-sdk-deploying-anytrust-chain.md) process. However, attention must be given to incorporating the `ERC-20` token details into these configurations. - -:::note - -When using the API, you also need to specify `nativeToken` as a param. - -::: - -Example: - -```js -const txRequest = await createRollupPrepareTransactionRequest({ - params: { - config, - batchPoster, - validators: [validator], - nativeToken, - }, - account: deployer.address, - publicClient: parentChainPublicClient, -}); -``` - -All other parts would be the same as explained in the [Rollup Orbit chain deployment page](orbit-sdk-deploying-rollup-chain.md). diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-rollup-chain.md b/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-rollup-chain.md deleted file mode 100644 index 5ff7ed42d8..0000000000 --- a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-rollup-chain.md +++ /dev/null @@ -1,236 +0,0 @@ ---- -title: 'How to Deploy a Rollup chain using the Orbit SDK' -sidebar_label: 'Deploy a Rollup chain' -description: 'How to deploy a Rollup chain using the Orbit SDK ' -author: GreatSoshiant -sme: GreatSoshiant -target_audience: 'Developers deploying and maintaining Orbit chains.' -sidebar_position: 1 ---- - -This document explains how to use the Orbit SDK to deploy a `Rollup Orbit chain`. - -:::caution UNDER CONSTRUCTION - -This document is under construction and may change significantly as we incorporate [style guidance](/for-devs/contribute#document-type-conventions) and feedback from readers. Feel free to request specific clarifications by clicking the `Request an update` button at the top of this document. - -::: - -:::info - -See the ["create-rollup-eth" example](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/main/examples/create-rollup-eth/index.ts) in the Orbit SDK repository for additional guidance. - -::: - -The main benefit of the Orbit SDK lies in facilitating the deployment and fine-tuning of Orbit chains core Smart-Contracts. - -These contracts are deployed on `parent chains`, they are: - -- Rollup contracts -- Bridge contracts -- Contracts handling fraud proofs - -Core contracts are the backbone of Arbitrum's Nitro stack, ensuring its robust and efficient operation. You can explore their code in the [nitro-contracts GitHub repository](https://github.com/OffchainLabs/nitro-contracts). - -### Rollup Deployment Parameters Configuration - -The `createRollup` function in the [`RollupCreator` contract](https://github.com/OffchainLabs/nitro-contracts/blob/acb0ef919cce9f41da531f8dab1b0b31d9860dcb/src/rollup/RollupCreator.sol#L107) takes a complex input named `deployParams`, structured to encapsulate various configurable parameters customizing the Orbit chain. - -Breaking down the structure of these parameters: - -#### 1. RollupDeploymentParams Struct - -```solidity -struct RollupDeploymentParams { - Config config; - address batchPoster; - address[] validators; - uint256 maxDataSize; - address nativeToken; - bool deployFactoriesToL2; - uint256 maxFeePerGasForRetryables; -} -``` - -This Solidity `struct` includes key settings like the chain configuration (`Config`), validator addresses, maximum data size, the native token of the chain, and more. - -#### 2. Config Struct - -```solidity -struct Config { - uint64 confirmPeriodBlocks; - uint64 extraChallengeTimeBlocks; - address stakeToken; - uint256 baseStake; - bytes32 wasmModuleRoot; - address owner; - address loserStakeEscrow; - uint256 chainId; - string chainConfig; - uint64 genesisBlockNum; - ISequencerInbox.MaxTimeVariation sequencerInboxMaxTimeVariation; -} -``` - -The `Config` `struct` defines the chain's core settings, including block confirmation periods, stake parameters, and the chain ID. - -#### 3. MaxTimeVariation Struct - -```solidity -struct MaxTimeVariation { - uint256 delayBlocks; - uint256 futureBlocks; - uint256 delaySeconds; - uint256 futureSeconds; -} -``` - -This nested `struct` within `Config` specifies time variations related to block sequencing, providing control over block delay and future block settings. - -#### 4. chainConfig - -The `chainConfig` parameter within the `Config` `struct` allow you to customize your Orbit chain. It's a stringified `JSON` object containing various configuration options that dictate how the Orbit chain behaves and interacts with the parent chain network. - -Here's a brief overview of `chainConfig`: - -```json -{ - chainId: number; - homesteadBlock: number; - daoForkBlock: null; - daoForkSupport: boolean; - eip150Block: number; - eip150Hash: string; - eip155Block: number; - eip158Block: number; - byzantiumBlock: number; - constantinopleBlock: number; - petersburgBlock: number; - istanbulBlock: number; - muirGlacierBlock: number; - berlinBlock: number; - londonBlock: number; - clique: { - period: number; - epoch: number; - }; - arbitrum: { - EnableArbOS: boolean; - AllowDebugPrecompiles: boolean; - DataAvailabilityCommittee: boolean; - InitialArbOSVersion: number; - InitialChainOwner: Address; - GenesisBlockNum: number; - MaxCodeSize: number; - MaxInitCodeSize: number; - }; -} -``` - -Out of these parameters, a few are particularly important and are likely to be configured by the chain owner: `chainId`, `DataAvailabilityCommittee`, `InitialChainOwner`, `MaxCodeSize`, and `MaxInitCodeSize`. While part of the `chainConfig`, the other parameters typically use default values and are less frequently modified. We will detail these parameters in the [Rollup Configuration Parameters](#rollup-configuration-parameters) section. Additionally, we'll guide you through using the Orbit SDK to effectively set and customize these configurations, ensuring that your Orbit chain is tailored to your specific requirements and operational needs. - -All the parameters explained in this section are customizable, allowing the chain deployer to stick with default settings or specify new values. In the upcoming sections, we will dive deeper into what each parameter represents and how you can utilize the Orbit SDK to configure them effectively for your Orbit chain deployment. - -For an easier config preparation, the Orbit SDK provides the `prepareChainConfig` API, which takes config parameters as arguments and returns a `chainConfig` `JSON` string. Any parameters not provided will default to standard values, which are detailed in the [Orbit SDK documentation](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/1f251f76a55bc1081f50938b0aa9f7965660ebf7/src/prepareChainConfig.ts#L3-L31). - -Here are the parameters you can use with `prepareChainConfig`: - -| Parameter | Description | -| :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- | -| `chainId` | Your Orbit chain's unique identifier. It differentiates your chain from others in the ecosystem. | -| `DataAvailabilityCommittee` | Set to `false`, this boolean makes your chain as a Rollup, set to `true` configures it as an AnyTrust chain. | -| `InitialChainOwner` | Identifies who owns and controls the chain. | -| `MaxCodeSize ` | Sets the maximum size for contract bytecodes on the Orbit chain. e.g. Ethereum mainnet has a limit of 24,576 Bytes. | -| `MaxInitCodeSize` | Similar to `MaxCodeSize`, defines the maximum size for your Orbit chain's **initialization** code. e.g. Ethereum mainnet limit is 49,152 Bytes. | - -Below is an example of how to use `prepareChainConfig` to set up a Rollup chain with a specific `chainId`, an `InitialChainOwner` (named as `deployer_address`): - -```js -import { prepareChainConfig } from '@arbitrum/orbit-sdk'; - -const chainConfig = prepareChainConfig({ - chainId: Some_Chain_ID, - arbitrum: { InitialChainOwner: deployer_address, DataAvailabilityCommittee: false }, -}); -``` - -### Rollup Configuration Parameters - -In this section, we'll provide detailed explanations of the various chain configuration parameters used in the deployment of Orbit chains. Understanding these parameters is critical to customizing your Orbit chain to suit your needs. - -| Parameter | Description | -| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `batchPoster` | Sets the batch poster address of your Orbit chain. The batch poster account batches and compresses transactions on the Orbit chain and transmits them back to the parent chain. | -| `validators` | Array of validator addresses. Validators are responsible for validating the chain state and posting Rollup Blocks (`RBlocks`) back to the parent chain. They also monitor the chain and initiate challenges against potentially faulty RBlocks submitted by other validators. | -| `nativeToken` | Determines the token used for paying gas fees on the Orbit chain. It can be set to `ETH` for regular chains or to any `ERC-20` token for **gas fee token network** Orbit chains. | -| `confirmPeriodBlocks` | Sets the challenge period in terms of blocks, which is the time allowed for validators to dispute or challenge state assertions. On Arbitrum One and Arbitrum Nova, this is currently set to approximately seven days in block count. `confirmPeriodBlocks` is measured in L1 blocks, we recommend a value of `45818` | -| `baseStake` | Orbit chain validator nodes must stake a certain amount to incentivize honest participation. The `basestake` parameter specifies this amount. | -| `stakeToken` | Token in which the `basestake` is required. It represents the token's address on the parent chain. Can be `ETH` or a `ERC-20`token. Note that the use of an `ERC-20` token as the `stakeToken` is currently not supported by Nitro, but will be soon. | -| `owner` | Account address responsible for deploying, owning, and managing your Orbit chain's base contracts on its parent chain. | -| `chainId` | Sets the unique chain ID of your Orbit chain. | - -:::note - -`chainId` and owner parameters must be equal to the chain ID and `InitialOwner` defined in the `chainConfig` section. - -::: - -While other configurable parameters exist, they are set to defaults, and it's generally not anticipated that a chain deployer would need to modify them. However, if you believe there's a need to alter any other parameters not listed here, please feel free to [contact us on our Discord server](https://discord.com/channels/585084330037084172/1116812793606328340/1205801459518804018) for further details and support. - -### Configuration of Rollup Params and Deployment on Orbit SDK - -The Orbit SDK provides two APIs, `createRollupPrepareConfig` and `createRollupPrepareTransactionRequest` to facilitate the configuration and deployment of Rollup parameters for an Orbit chain. These APIs simplify the process of setting up and deploying the core contracts necessary for an Orbit chain. - -#### **createRollupPrepareConfig API**: - -This API is designed to take parameters defined in the Config struct and fill in the rest with default values. It outputs a complete Config struct that is ready for use. - -For example, to create a Config struct with a specific chain ID (`chainId`), an owner address (`deployer_address`), and a `chainConfig` as described in the [previous section](#chain-config-parameter), you would use the Orbit SDK as follows: - -```js -import { createRollupPrepareConfig } from '@arbitrum/orbit-sdk'; - -const config = createRollupPrepareConfig({ - chainId: BigInt(chainId), - owner: deployer.address, - chainConfig, -}); -``` - -#### **createRollupPrepareTransactionRequest API**: - -This API accepts parameters defined in the `RollupDeploymentParams` struct, applying defaults where necessary, and generates the `RollupDeploymentParams`. This struct is then used to create a raw transaction which calls the `createRollup` function of the `RollupCreator` contract. As discussed in previous sections, this function deploys and initializes all core Orbit contracts. - -For instance, to deploy using the Orbit SDK with a Config equal to `config`, a `batchPoster`, and a set of validators such as `[validator]`, the process would look like this: - -```js -import { createRollupPrepareTransactionRequest } from '@arbitrum/orbit-sdk'; - -const request = await createRollupPrepareTransactionRequest({ - params: { - config, - batchPoster, - validators: [validator], - }, - account: deployer_address, - publicClient, -}); -``` - - After creating the raw transaction, you need to sign and broadcast it to the network. - -### Getting the Orbit Chain Information After Deployment - -Once you've successfully deployed your Orbit chain, the next step is to retrieve detailed information about the deployment. The Orbit SDK provides a convenient way to do this through the `createRollupPrepareTransactionReceipt` API. - -After sending the signed transaction and receiving the transaction receipt, you can use the `createRollupPrepareTransactionReceipt` API to parse this receipt and extract the relevant data. This process will provide comprehensive details about the deployed chain, such as contract addresses, configuration settings, and other information. - -Here's an example of how to use the Orbit SDK to get data from a deployed Orbit chain: - -```js -import { createRollupPrepareTransactionReceipt } from '@arbitrum/orbit-sdk'; - -const data = createRollupPrepareTransactionReceipt(txReceipt); -``` - -In this example, `txReceipt` refers to the transaction receipt you received after deploying the chain. By passing this receipt to the `createRollupPrepareTransactionReceipt` function, you can easily access a wealth of information about your Orbit chain. This feature of the Orbit SDK simplifies the post-deployment process, allowing you to quickly and efficiently gather all necessary details about your chain for further use or reference. diff --git a/arbitrum-docs/launch-orbit-chain/infra-options-orbit-chains.md b/arbitrum-docs/launch-orbit-chain/infra-options-orbit-chains.md deleted file mode 100644 index 2a1394840d..0000000000 --- a/arbitrum-docs/launch-orbit-chain/infra-options-orbit-chains.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: 'Third-party Orbit infrastructure providers' -description: 'A high-level overview of third-party Orbit chain infrastructure providers for production-grade chains.' -author: leartulaj -sme: leartulaj -user_story: As an Orbit chain deployer, I want to know what third-party infrastructure options are available that will help me deploy and maintain a production-grade Orbit chain. -content_type: overview ---- - -This document provides an overview of third-party Orbit chain infrastructure providers that support production-grade Orbit chain deployments. Note that this list is not exhaustive, and will be continuously updated as the Orbit ecosystem evolves. - -## Rollup-as-a-Service (RaaS) providers - -For most production use-cases, we encourage Orbit chain operators to work with one of the following RaaS (Rollup as a Service) providers. These providers manage the infrastructure required to maintain high-performance, secure Orbit chain deployments: - -- [Caldera](https://www.caldera.xyz/) -- [Conduit](https://conduit.xyz/) -- [AltLayer](https://altlayer.io/) -- [Gelato](https://www.gelato.network/) - -## Chain explorers - -Chain explorers let you view transactions, blocks, addresses, and network activity associated with your Orbit chain. The following explorers support Orbit chains, and can be used to monitor and analyze your chain's activity: - -- [Blockscout](https://www.blockscout.com/) -- [Socialscan](https://socialscan.io/) -- [Lore](https://www.lorescan.com/) -- [Routescan](https://routescan.io/) - -Additionally, Orbit chains leveraging blobs for data availability may use tools like [Blobscan](https://blobscan.com/) to see which blob/block includes a given transaction. - -## Bridges - -You can easily launch an Orbit chain with a canonical token bridge, which allows transfers to and from the chain via Arbitrum One, Nova, or the parent chain to which your Orbit chain settles transactions. - -For applications that require the ability to transfer assets to chains outside of the Orbit ecosystem or in an expedited manner (without waiting for complete finality), the following third-party bridging providers can be used: - -- [LayerZero](https://layerzero.network/) -- [Connext](https://www.connext.network/) -- [Hyperlane](https://www.hyperlane.xyz/) -- [Axelar](https://axelar.network/) -- [Across](https://across.to/) - -## Data availability - -One way to reduce transaction fees for Orbit chains is to configure a Data Availability (DA) solution that stores chain data off-chain. Although the AnyTrust protocol offers native support for this functionality (and is configurable by default on Orbit AnyTrust chains), the following third-party providers give you another way to store data off-chain. Note that using these services will limit your chain's ability to leverage AnyTrust protocol improvements as they relate to transaction fee and DA configurability: - -- [Celestia](https://celestia.org/) -- [EigenDA](https://www.eigenlayer.xyz/) -- [Avail](https://www.availproject.org/) (coming soon) -- [Near](https://near.org/data-availability) (coming soon) - -## Indexers - -Indexers provide a convenient way to retrieve historic or application-specific data without having to interface with your chain through an RPC endpoint. The following third-party providers offer indexing services that can be used with Orbit chains: - -- [Alchemy](https://www.alchemy.com/) -- [The Graph](https://thegraph.com/) -- [Goldsky](https://goldsky.com/) -- [Ormi](https://www.ormilabs.xyz/) - -## Oracles - -The following Oracle providers can be used to integrate off-chain data with your Orbit chain's smart contracts: - -- [Chainlink](https://chain.link/) -- [Pyth](https://pyth.network/) -- [Redstone](https://redstone.finance/) -- [Randomizer](http://Randomizer.ai) (VRF only) -- [Supra](https://supra.com/) - -## RPC endpoints - -RPC endpoints are the primary interface through which users and developers interact with any chain, whether it be for transaction submission, reading state, or indexing historical data. The following third-party providers offer RPC endpoint services compatible with Orbit chains: - -- [Alchemy](https://www.alchemy.com/) -- [Ankr](https://www.ankr.com/) -- [Chainstack](https://chainstack.com/) -- [QuickNode](https://www.quicknode.com/) diff --git a/arbitrum-docs/launch-orbit-chain/orbit-sdk-deploying-orbit-chain.md b/arbitrum-docs/launch-orbit-chain/orbit-sdk-deploying-orbit-chain.md new file mode 100644 index 0000000000..9c99fb2f90 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/orbit-sdk-deploying-orbit-chain.md @@ -0,0 +1,34 @@ +--- +title: 'How to Deploy an Orbit chain using the Orbit SDK' +sidebar_label: 'Introduction' +description: 'How to Deploy an Orbit chain using the Orbit SDK' +author: anegg0 +sme: anegg0 +target_audience: 'Developers deploying and maintaining Orbit chains.' +sidebar_position: 1 +user_story: As a current or prospective Orbit chain deployer, I need to configure and deploy an Orbit chain using the Orbit SDK. +content_type: how-to +--- + +This document explains how to use the Orbit SDK to deploy a `Orbit chain`. + +:::caution UNDER CONSTRUCTION + +This document is under construction and may change significantly as we incorporate [style guidance](/for-devs/contribute#document-type-conventions) and feedback from readers. Feel free to request specific clarifications by clicking the `Request an update` button at the top of this document. + +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import MultidimensionalContentControlsPartial from './partials/_multidimensional-content-controls-deploy-orbit-chain-partial.md'; + +The Arbitrum Orbit SDK lets you programmatically create and manage your own `Orbit chain(s)`. Its capabilities include: + +- Configuration and deployment of your Orbit chain's core contracts +- Initialization of your chain and management of its configuration post-deployment + +## Select a chain type + +There are three types of Orbit chains. Select the chain type that best fits your needs: + + diff --git a/arbitrum-docs/launch-orbit-chain/orbit-sdk-introduction.md b/arbitrum-docs/launch-orbit-chain/orbit-sdk-introduction.md deleted file mode 100644 index 42fcef768f..0000000000 --- a/arbitrum-docs/launch-orbit-chain/orbit-sdk-introduction.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: 'Get started with the Arbitrum Orbit SDK' -sidebar_label: 'Get started' -description: 'Learn how to deploy and manage your Orbit chain with the Arbitrum Orbit SDK.' -author: GreatSoshiant -sme: GreatSoshiant -user_story: As a current or prospective Orbit chain owner, I need to onboard into the Orbit SDK by understanding the available onboarding paths, and how to select the path that meets my needs. -content_type: get-started ---- - -import PublicPreviewBannerPartial from './partials/_orbit-public-preview-banner-partial.md'; - - - -The Arbitrum Orbit SDK lets you programmatically create and manage your own Orbit chain(s). Its capabilities include: - -- Configuration and deployment of your Orbit chain's core contracts -- Initialization of your chain and management of its configuration post-deployment - -## 1. Select a chain type - -There are three types of Orbit chains. Review the following table to determine which type best fits your needs: - -| Chain Type | Description | Use Case | -| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| **Rollup** | Offers Ethereum-grade security by batching, compressing, and posting data to the parent chain, similarly to [Arbitrum One](https://arbitrum.io/). | Ideal for applications that require high security guarantees. | -| **AnyTrust** | Implements the [AnyTrust protocol](/inside-arbitrum-nitro/#inside-anytrust), relying on an external [Data Availability Committee (DAC)](/intro/glossary#data-availability-committee-dac) to store data and provide it on-demand instead of using their [parent chain](/intro/glossary/#parent-chain) as the Data Availability (DA) layer. | Suitable for applications that require lower transaction fees. | -| **Custom gas token** | An AnyTrust Orbit chain with the ability to specify a custom `ERC-20` gas token. | Ideal for applications that require custom gas fee tokens and lower transaction fees. | - -## 2. Deploy your chain - -After selecting a chain type, you need to deploy your Orbit chain. Visit the deployment guide for your selected chain type: - -- [Deploy a Rollup Orbit chain](/launch-orbit-chain/how-tos/orbit-sdk-deploying-rollup-chain.md) -- [Deploy an AnyTrust Orbit chain](/launch-orbit-chain/how-tos/orbit-sdk-deploying-anytrust-chain.md) -- [Deploy a Custom Gas Token Orbit chain](/launch-orbit-chain/how-tos/orbit-sdk-deploying-custom-gas-token-chain.md) - -## 3. Configure your Orbit chain's node - -After selecting a chain type, you need to specify your Orbit chain's node configuration by creating a `JSON` file. Visit [Configure your Orbit chain's node](/launch-orbit-chain/how-tos/orbit-sdk-preparing-node-config.md), then proceed to the next step. - -## 4. Deploy your Orbit chain's token bridge - -Your Orbit chain's token bridge contracts allow ERC-20 tokens to move between your Orbit chain and its underlying parent chain. See [Deploy your Orbit chain's token bridge](/launch-orbit-chain/how-tos/orbit-sdk-deploying-token-bridge.md), then proceed to the next step. - -## 5. Configure your Orbit chain - -With your node configuration specified and token bridge deployed, you'll be ready to configure your Orbit chain. Visit [Configure your Orbit chain](/launch-orbit-chain/how-tos/orbit-sdk-configuring-orbit-chain.md) to complete this final step. - -## See also - -- Learn more about the [AnyTrust consensus mechanism](/inside-arbitrum-nitro/inside-arbitrum-nitro.mdx#inside-anytrust) -- Learn more about the [`ERC-20` token bridge architecture](/build-decentralized-apps/token-bridging/03-token-bridge-erc20.md) diff --git a/arbitrum-docs/launch-orbit-chain/partials/_approve-erc20-token-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_approve-erc20-token-partial.md new file mode 100644 index 0000000000..521b6c8cbe --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_approve-erc20-token-partial.md @@ -0,0 +1,33 @@ +## Approve ERC-20 token + +Initiating the deployment of a token bridge for **[Custom Fee Token](/launch-orbit-chain/concepts/custom-gas-token-sdk.md)** on orbit chains begins with ensuring the `TokenBridgeCreator` contract is granted sufficient approvals of the native token. To facilitate this process, the Orbit SDK provides two APIs: + +1. **`createTokenBridgeEnoughCustomFeeTokenAllowance`**: This method verifies that the deployer's address has enough allowance to pay for the fees associated with the token bridge deployment. +2. **`createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest`**: This function assists in generating the raw transaction required to approve the native token for the `TokenBridgeCreator` contract. + +The following example demonstrates how to leverage these APIs effectively to check for and, if necessary, grant approval to the `TokenBridgeCreator` contract: + +```js +const allowanceParams = { + nativeToken, + owner: rollupOwner.address, + publicClient: parentChainPublicClient, +}; +if (!(await createTokenBridgeEnoughCustomFeeTokenAllowance(allowanceParams))) { + const approvalTxRequest = await createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest( + allowanceParams, + ); +} +``` + +In this scenario, `allowanceParams` includes: + +- The native token's details: `nativeToken`. +- The Rollup owner's address: `rollupOwner.address`. +- The parent chain's publicClient: `parentChainPublicClient`. + +First, `createTokenBridgeEnoughCustomFeeTokenAllowance` checks if the deployer has been granted enough allowance. + +If the allowance is insufficient, `createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest` is called to create the necessary approval transaction. + +Please note that after generating the raw transaction, the deployer must still sign and broadcast it to the network to finalize the approval process. diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-preparing-node-config.md b/arbitrum-docs/launch-orbit-chain/partials/_config-anytrust-node-partial.md similarity index 66% rename from arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-preparing-node-config.md rename to arbitrum-docs/launch-orbit-chain/partials/_config-anytrust-node-partial.md index 5bc9d78de8..e7ac62206a 100644 --- a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-preparing-node-config.md +++ b/arbitrum-docs/launch-orbit-chain/partials/_config-anytrust-node-partial.md @@ -1,29 +1,4 @@ ---- -title: "How to configure your Orbit chain's node using the Orbit SDK" -sidebar_label: "Configure your chain's node" -description: 'How to configure a node using the Orbit SDK' -author: GreatSoshiant -sme: GreatSoshiant -target_audience: 'Developers deploying and maintaining Orbit chains.' -user_story: As a current or prospective Orbit chain deployer, I need to understand how to configure a node using the Orbit SDK. -content_type: how-to ---- - -This guide will walk you through configuring an Orbit node supporting a Rollup or AnyTrust chain. - -:::caution UNDER CONSTRUCTION - -This document is under construction and may change significantly as we incorporate [style guidance](/for-devs/contribute#document-type-conventions) and feedback from readers. Feel free to request specific clarifications by clicking the `Request an update` button at the top of this document. - -::: - -:::info - -See the ["prepare-node-config" example](https://github.com/OffchainLabs/arbitrum-orbit-sdk/tree/main/examples/prepare-node-config) in the Orbit SDK repository for additional guidance. - -::: - -- Prerequisite: having deployed an Orbit chain. If you haven't done so yet, you can find detailed instructions in the [Rollup Deployment Parameters](orbit-sdk-deploying-rollup-chain) section of the rollup deployment guide. +## Configure a Node running your AnyTrust Orbit chain Once you have successfully deployed and initialized the Orbit core contracts, the next step is configuring and running your Orbit chain using a Node Config `JSON` file describing all the configurations for the Arbitrum Node, including settings for the Batch-poster, Validator, and the chain itself. @@ -124,15 +99,15 @@ const nodeConfig = prepareNodeConfig({ Here are some details about the parameters used in the example above: -| Parameters | Description | -| :------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `chainName` | The name you have chosen for your Orbit chain. | -| `chainConfig` | Configuration used for [chain deployment](orbit-sdk-deploying-rollup-chain#4-chainconfig), returned from the [createRollupPrepareTransactionReceipt](orbit-sdk-deploying-rollup-chain#createrolluppreparetransactionrequest-api) API. | -| `coreContracts` | Addresses of your newly deployed Orbit chain's, also returned from the `createRollupPrepareTransactionReceipt` API. | -| `batchPosterPrivateKey ` | Private key of the batch-poster account, used for signing batch-posting transactions and related functions. | -| `validatorPrivateKey` | Private key of the validator(s), used for validating state, posting Rollup Blocks (`RBlocks`) to the parent chain, and initiating challenges if necessary. | -| `parentChainId` | Chain ID of the parent chain where your Orbit chain is deployed. | -| `parentChainRpcUrl` | Parent chain's RPC URL. | +| Parameters | Description | +| :------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `chainName` | The name you have chosen for your Orbit chain. | +| `chainConfig` | Configuration used for chain deployment, returned from the createRollupPrepareTransactionReceipt API. | +| `coreContracts` | Addresses of your newly deployed Orbit chain's, also returned from the `createRollupPrepareTransactionReceipt` API. | +| `batchPosterPrivateKey ` | Private key of the batch-poster account, used for signing batch-posting transactions and related functions. | +| `validatorPrivateKey` | Private key of the validator(s), used for validating state, posting Rollup Blocks (`RBlocks`) to the parent chain, and initiating challenges if necessary. | +| `parentChainId` | Chain ID of the parent chain where your Orbit chain is deployed. | +| `parentChainRpcUrl` | Parent chain's RPC URL. | If you don't have the `chainConfig` and `coreContracts` readily available, you can obtain them using the `createRollupPrepareTransaction` and `createRollupPrepareTransactionReceipt` APIs. diff --git a/arbitrum-docs/launch-orbit-chain/partials/_config-rollup-node-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_config-rollup-node-partial.md new file mode 100644 index 0000000000..7ff492971f --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_config-rollup-node-partial.md @@ -0,0 +1,98 @@ +## Configure a Node running your Rollup Orbit chain + +Once you have successfully deployed and initialized the Orbit core contracts, the next step is configuring and running your Orbit chain using a Node Config `JSON` file describing all the configurations for the Arbitrum Node, including settings for the Batch-poster, Validator, and the chain itself. + +Example for a Rollup Orbit Chain: + +```js +{ + 'chain': { + 'info-json': stringifyInfoJson([...]), + 'name': chainName, + // Additional chain-specific configurations + }, + 'parent-chain': { + connection: { + url: parentChainRpcUrl, + }, + }, + 'http': { + addr: '0.0.0.0', + port: 8449, + vhosts: '*', + corsdomain: '*', + api: ['eth', 'net', 'web3', 'arb', 'debug'], + }, + 'node': { + // Node-specific settings including sequencer, batch-poster, staker configurations + }, +}; +``` + +Here are some inputs details from the example above: + +| Parameters | Description | +| :------------- | :---------------------------------------------------------------------------- | +| `chain` | Details about the hosted chain, including chain ID, name, and core contracts. | +| `parent-chain` | Information for connecting to the parent chain. | +| `http` | Configuration parameters for the HTTP server. | +| `node` | Specific node settings, including sequencer and batch-poster configurations. | + +### Preparing your node config file + +The Node Config file includes three fields types: + +1. **Information from the Orbit deployment chain**: Such as the addresses of the core contracts. +2. **Parameters configurable by the chain deployer**: These parameters, like `max-block-speed`, can be adjusted to modify your chain's behavior. +3. **Fields not typically configured**: Like the HTTP section, which usually remains standard. + +Let's explore the parameters allowing you to set up a stable, and secure Orbit chain tailored to your project's requirements: + +### Node config generation with Orbit SDK + +Generating a Node Config `JSON` file to initiate your Orbit chain is a step in the deployment process. The Orbit SDK simplifies this task with an API named `prepareNodeConfig`. This API takes specific parameters for your Orbit chain and returns a `JSON` file that can be used as the Node Config to initiate the chain. + +Here’s an example of using the `prepareNodeConfig` API to generate the node config: + +```js +const nodeConfig = prepareNodeConfig({ + chainName: 'My Orbit Chain', + chainConfig, + coreContracts, + batchPosterPrivateKey: 'BATCH_POSTER_PRIVATE_KEY_HERE', + validatorPrivateKey: 'VALIDATOR_PRIVATE_KEY_HERE', + parentChainId: parentChain_chain_id, + parentChainRpcUrl: parentChain_RPC_URL, +}); +``` + +Here are some details about the parameters used in the example above: + +| Parameters | Description | +| :------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `chainName` | The name you have chosen for your Orbit chain. | +| `chainConfig` | Configuration used for chain deployment, returned from the createRollupPrepareTransactionReceipt API. | +| `coreContracts` | Addresses of your newly deployed Orbit chain's, also returned from the `createRollupPrepareTransactionReceipt` API. | +| `batchPosterPrivateKey ` | Private key of the batch-poster account, used for signing batch-posting transactions and related functions. | +| `validatorPrivateKey` | Private key of the validator(s), used for validating state, posting Rollup Blocks (`RBlocks`) to the parent chain, and initiating challenges if necessary. | +| `parentChainId` | Chain ID of the parent chain where your Orbit chain is deployed. | +| `parentChainRpcUrl` | Parent chain's RPC URL. | + +If you don't have the `chainConfig` and `coreContracts` readily available, you can obtain them using the `createRollupPrepareTransaction` and `createRollupPrepareTransactionReceipt` APIs. + +Here's an example of how to extract `chainConfig` and `coreContracts` using just the transaction hash from your deployment: + +```js +import { + ChainConfig, + createRollupPrepareTransaction, + createRollupPrepareTransactionReceipt, +} from '@arbitrum/orbit-sdk'; + +const tx = createRollupPrepareTransaction({ hash: txHash }); +const txReceipt = createRollupPrepareTransactionReceipt({ hash: txHash }); +const chainConfig: ChainConfig = JSON.parse(tx.getInputs()[0].config.chainConfig); +const coreContracts = txReceipt.getCoreContracts(); +``` + +This process ensures that all necessary configurations and contract details are included in your Node Config. diff --git a/arbitrum-docs/launch-orbit-chain/partials/_deploy-custom-token-brige-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_deploy-custom-token-brige-partial.md new file mode 100644 index 0000000000..07c84aeac5 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_deploy-custom-token-brige-partial.md @@ -0,0 +1,143 @@ +## Deploy your custom token brige + +The Arbitrum Nitro stack doesn't natively support specific token bridging standards at the protocol level. Instead, Offchain Labs designed a "canonical bridge" that ensures seamless token transfers between the parent and child chains. + +The token bridge architecture includes contracts deployed on the parent chain and on the child chain. These entities communicate via the Retryable Ticket protocol, ensuring efficient and secure interactions. + +:::info + +See the [`ERC-20` token bridge overview](/build-decentralized-apps/token-bridging/03-token-bridge-erc20.md) for more information about the token bridge's design and operational dynamics, and the ["create-token-bridge-eth" example ](https://github.com/OffchainLabs/arbitrum-orbit-sdk/tree/main/examples/create-token-bridge-eth) for additional guidance. + +::: + +### Token bridge deployment steps + +Once an Orbit chain has been deployed and initialized, the bridge contracts need to be deployed on both the parent and child chains. This process involves several steps: + +1. **[Token approval](#1-token-approval)** +2. **[Token bridge contract deployment](#2-token-bridge-contract-deployment)** +3. **[Transaction recipient and checking for deployment on child chain](#3-transaction-recipient-and-checking-for-deployment-on-child-chain)** +4. **[Deployment information and contract addresses](#4-deployment-information-and-contract-addresses)** + +### 1. Token approval + +:::note + +This step is only required for custom fee token Orbit chains. + +::: + +Initiating the deployment of a token bridge for **[Custom Fee Token](/launch-orbit-chain/concepts/custom-gas-token-sdk.md)** on orbit chains begins with ensuring the `TokenBridgeCreator` contract is granted sufficient approvals of the native token. To facilitate this process, the Orbit SDK provides two APIs: + +1. **`createTokenBridgeEnoughCustomFeeTokenAllowance`**: This method verifies that the deployer's address has enough allowance to pay for the fees associated with the token bridge deployment. +2. **`createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest`**: This function assists in generating the raw transaction required to approve the native token for the `TokenBridgeCreator` contract. + +The following example demonstrates how to leverage these APIs effectively to check for and, if necessary, grant approval to the `TokenBridgeCreator` contract: + +```js +const allowanceParams = { + nativeToken, + owner: rollupOwner.address, + publicClient: parentChainPublicClient, +}; +if (!(await createTokenBridgeEnoughCustomFeeTokenAllowance(allowanceParams))) { + const approvalTxRequest = await createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest( + allowanceParams, + ); +} +``` + +In this scenario, `allowanceParams` includes: + +- The native token's details: `nativeToken`. +- The Rollup owner's address: `rollupOwner.address`. +- The parent chain's publicClient: `parentChainPublicClient`. + +First, `createTokenBridgeEnoughCustomFeeTokenAllowance` checks if the deployer has been granted enough allowance. + +If the allowance is insufficient, `createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest` is called to create the necessary approval transaction. + +Please note that after generating the raw transaction, the deployer must still sign and broadcast it to the network to finalize the approval process. + +### 2. Token bridge contract deployment + +Deploying token bridge contracts is the first step in creating a bridge between the parent and the Orbit chain. + +The deployment process is the same as Orbit chain contracts', where a primary contract facilitates the deployment of core contracts. The token bridge contracts are deployed on the parent and child chains by `TokenBridgeCreator`. `TokenBridgeCreator` does it in a single transaction using the [ Retryable Tickets protocol ](/arbos/l1-to-l2-messaging#retryable-ticketsO). + +Orbit SDK provides an API that automates the deployment by interacting with the `TokenBridgeCreator` contract. The API is `createTokenBridgePrepareTransactionRequest`, which processes the necessary inputs and generates a transaction request tailored for token bridge deployment. + +Example: + +```js +const txRequest = await createTokenBridgePrepareTransactionRequest({ + params: { + rollup: rollupContractAddress, + rollupOwner: rollupOwnerAddress, + }, + parentChainPublicClient, + orbitChainPublicClient, + account: rollupOwnerAddress, +}); +``` + +Here are the parameters used in the above example: + +| Parameter | Description | +| :------------------------ | :------------------------------------------------ | +| `rollupContractAddress` | Orbit chain's Rollup contract address. | +| `rollupOwnerAddress` | Rollup owner's address. | +| `parentChainPublicClient` | Parent chain's public client, as defined by Viem. | +| `orbitChainPublicClient` | Orbit chain's public client, as defined by Viem. | + +For more insights into these variables and their usage, consider exploring this [token bridge deployment example](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/main/examples/create-token-bridge-eth/index.ts). + +Following the creation of the raw transaction, the next steps involve signing it and broadcasting it to the relevant blockchain network to complete the deployment process. + +### 3. Transaction recipient and checking for deployment on child chain + +After sending the deployment transaction, you will need to retrieve the transaction receipt and verify the successful deployment of the contracts on both the parent and child chains. + +Our Orbit SDK includes a dedicated API for this purpose, named `createTokenBridgePrepareTransactionReceipt`, which simplifies the process of obtaining the deployment transaction's recipient. + +Example: + +```js +const txReceipt = createTokenBridgePrepareTransactionReceipt( + await parentChainPublicClient.waitForTransactionReceipt({ hash: txHash }), +); +``` + +In this scenario, `txHash` represents the hash of the deployment transaction initiated in the previous step. The `waitForTransactionReceipt` API from Viem captures the transaction's recipient on the parent chain. The `createTokenBridgePrepareTransactionReceipt` API enhances the basic functionality provided by Viem's `waitForTransactionReceipt`, introducing a specialized method named `waitForRetryables` to handle the outcome (in this case, `txReceipt`). + +By employing the `waitForRetryables` method, you can ensure the success of Retryable Tickets on the parent chain. + +Example: + +```js +const orbitChainRetryableReceipts = await txReceipt.waitForRetryables({ + orbitPublicClient: orbitChainPublicClient, +}); + +if (orbitChainRetryableReceipts[0].status !== 'success') { + throw new Error( + `Retryable status is not success: ${orbitChainRetryableReceipts[0].status}. Aborting...`, + ); +} + +console.log(`Retryable executed successfully`); +``` + +In this example, the `waitForRetryables` method is invoked on the `txReceipt` to monitor the execution of Retryable Tickets and verify their status. A `success` status indicates that the Retryable Tickets have been executed successfully, ensuring the contracts' deployment. It's important to note that this process involves two Retryable Tickets. You can check out a [more comprehensive walkthrough](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/1e39d21eef57d204bfa609c4c29284528ddf05ac/examples/create-token-bridge-eth/index.ts#L78-L104) of the example. This enhanced approach not only simplifies the retrieval of transaction receipts but also provides a reliable method for verifying contract deployment across chains. + +### 4. Deployment information and contract addresses + +Once you have completed the deployment and are assured that the Retryable Tickets are successful, you can use `getTokenBridgeContracts` to retrieve the deployment information and all the token bridge contracts' addresses. + +Here's an example of how to get the contract addresses from the `txReceipt` generated in the previous steps: + +```js +const tokenBridgeContracts = await txReceipt.getTokenBridgeContracts({ + parentChainPublicClient, +}); +``` diff --git a/arbitrum-docs/launch-orbit-chain/partials/_deploy-orbit-chain-helpers-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_deploy-orbit-chain-helpers-partial.md new file mode 100644 index 0000000000..77caed0d49 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_deploy-orbit-chain-helpers-partial.md @@ -0,0 +1,13 @@ +n and deployment helpers + +The Orbit SDK provides three APIs, `prepareChainConfig`, `createRollupPrepareConfig`, and `createRollupPrepareTransactionRequest` to facilitate the configuration and deployment of Rollup parameters for an Orbit chain. These APIs simplify the process of setting up and deploying the core contracts necessary for an Orbit chain. + +| API | Benefit | Description | +| :----------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------- | +| `prepareChainConfig` | Simplifies the creation of the `chainConfig` parameter object | Takes `config` parameters as arguments and returns a `chainConfig` `JSON` string. | +| `createRollupPrepareConfig` | Simplifies the creation of the `Config` parameter object | Takes a `Config` struct as argument and fills in undefined params with default values. | +| `createRollupPrepareTransactionRequest` | Simplifies the creation of the `RollupDeploymentParams` parameter object | Takes `RollupDeploymentParams` as argument, applies defaults where necessary, and return a complete `RollupDeploymentParams` | +| `createTokenBridgeEnoughCustomFeeTokenAllowance` | Verifies that the deployer's address has enough allowance to pay for the fees associated with the token bridge deployment | | +| `createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest` | Generates the raw transaction required to approve the native token for the `TokenBridgeCreator` contract. | | +| `createTokenBridgePrepareTransactionRequest` | Generates token bridge deployment transaction request. | | +| `waitForRetryables` | Sends token bridge deployment transaction. | | diff --git a/arbitrum-docs/launch-orbit-chain/partials/_deploy-orbit-chain-parameters-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_deploy-orbit-chain-parameters-partial.md new file mode 100644 index 0000000000..d93e43b47f --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_deploy-orbit-chain-parameters-partial.md @@ -0,0 +1,122 @@ +### Rollup deployment parameters + +[`createRollup`](https://github.com/OffchainLabs/nitro-contracts/blob/acb0ef919cce9f41da531f8dab1b0b31d9860dcb/src/rollup/RollupCreator.sol#L107) is the function that will deploy your core contracts on the parent chain. +`createRollup` takes a complex input named `deployParams`defining the characteristics of an Orbit Rollup chain + +The following will walk you through the methods and properties that you will use to configure your chain. + +#### 1. RollupDeploymentParams struct + +The `RollupDeploymentParams` Solidity struct includes key settings like the chain configuration (`Config`), validator addresses, maximum data size, the native token of the chain, and more. + +```solidity {2,4,6} +struct RollupDeploymentParams { + Config config; + address batchPoster; + address[] validators; + uint256 maxDataSize; + address nativeToken; + bool deployFactoriesToL2; + uint256 maxFeePerGasForRetryables; +} +``` + +#### 2. Config struct + +The `Config` struct defines the chain's core settings, including block confirmation periods, stake parameters, and the chain ID. + +```solidity {2,4,5,9} +struct Config { + uint64 confirmPeriodBlocks; + uint64 extraChallengeTimeBlocks; + address stakeToken; + uint256 baseStake; + bytes32 wasmModuleRoot; + address owner; + address loserStakeEscrow; + uint256 chainId; + string chainConfig; + uint64 genesisBlockNum; + ISequencerInbox.MaxTimeVariation sequencerInboxMaxTimeVariation; +} +``` + +#### 3. MaxTimeVariation struct + +This nested struct within `Config` specifies time variations related to block sequencing, providing control over block delay and future block settings. + +```solidity +struct MaxTimeVariation { + uint256 delayBlocks; + uint256 futureBlocks; + uint256 delaySeconds; + uint256 futureSeconds; +} +``` + +#### 4. chainConfig + +The `chainConfig` parameter within the `Config` struct allows you to customize your Orbit chain. It's a stringified `JSON` object containing various configuration options that dictate how the Orbit chain behaves and interacts with the parent chain network. + +Here's a brief overview of `chainConfig`: + +```json {2,24,26,28,29} +{ + chainId: number; + homesteadBlock: number; + daoForkBlock: null; + daoForkSupport: boolean; + eip150Block: number; + eip150Hash: string; + eip155Block: number; + eip158Block: number; + byzantiumBlock: number; + constantinopleBlock: number; + petersburgBlock: number; + istanbulBlock: number; + muirGlacierBlock: number; + berlinBlock: number; + londonBlock: number; + clique: { + period: number; + epoch: number; + }; + arbitrum: { + EnableArbOS: boolean; + AllowDebugPrecompiles: boolean; + DataAvailabilityCommittee: boolean; + InitialArbOSVersion: number; + InitialChainOwner: Address; + GenesisBlockNum: number; + MaxCodeSize: number; + MaxInitCodeSize: number; + }; +} +``` + +Out of `chainConfig`'s parameters, a few are particularly important and are likely to be configured by the chain owner: `chainId`, `DataAvailabilityCommittee`, `InitialChainOwner`, `MaxCodeSize`, and `MaxInitCodeSize`. `chainConfig`'s other parameters use default values and are less frequently modified. We will go through these parameters in the [Rollup Configuration Parameters](#rollup-configuration-parameters) section. + +All the parameters explained in this section are customizable, allowing the chain deployer to stick with default settings or specify new values. + +### Rollup configuration parameters + +In this section, we'll provide detailed explanations of the various chain configuration parameters used in the deployment of Orbit chains. + +| Parameter | Description | +| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `batchPoster` | Sets the batch poster address of your Orbit chain. The batch poster account batches and compresses transactions on the Orbit chain and transmits them back to the parent chain. | +| `validators` | Array of validator addresses. Validators are responsible for validating the chain state and posting Rollup Blocks (`RBlocks`) back to the parent chain. They also monitor the chain and initiate challenges against potentially faulty RBlocks submitted by other validators. | +| `nativeToken` | Determines the token used for paying gas fees on the Orbit chain. It can be set to `ETH` for regular chains or to any `ERC-20` token for **gas fee token network** Orbit chains. | +| `confirmPeriodBlocks` | Sets the challenge period in terms of blocks, which is the time allowed for validators to dispute or challenge state assertions. On Arbitrum One and Arbitrum Nova, this is currently set to approximately seven days in block count. `confirmPeriodBlocks` is measured in L1 blocks, we recommend a value of `45818` | +| `baseStake` | Orbit chain validator nodes must stake a certain amount to incentivize honest participation. The `basestake` parameter specifies this amount. | +| `stakeToken` | Token in which the `basestake` is required. It represents the token's address on the parent chain. Can be `ETH` or a `ERC-20`token. Note that the use of an `ERC-20` token as the `stakeToken` is currently not supported by Nitro, but will be soon. | +| `owner` | Account address responsible for deploying, owning, and managing your Orbit chain's base contracts on its parent chain. | +| `chainId` | Sets the unique chain ID of your Orbit chain. | + +:::note + +`chainId` and owner parameters must be equal to the chain ID and `InitialOwner` defined in the `chainConfig` section. + +::: + +While other configurable parameters exist, they are set to defaults, and it's generally not anticipated that a chain deployer would need to modify them. However, if you believe there's a need to alter any other parameters not listed here, please feel free to [contact us on our Discord server](https://discord.com/channels/585084330037084172/1116812793606328340/1205801459518804018) for further details and support. diff --git a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-token-bridge.md b/arbitrum-docs/launch-orbit-chain/partials/_deploy-token-brige-partial.md similarity index 66% rename from arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-token-bridge.md rename to arbitrum-docs/launch-orbit-chain/partials/_deploy-token-brige-partial.md index 0afbe61592..3cbace3e2b 100644 --- a/arbitrum-docs/launch-orbit-chain/how-tos/orbit-sdk-deploying-token-bridge.md +++ b/arbitrum-docs/launch-orbit-chain/partials/_deploy-token-brige-partial.md @@ -1,91 +1,19 @@ ---- -title: 'Deploy a token bridge using the Orbit SDK' -sidebar_label: 'Deploy a token bridge' -description: 'How to deploy a token bridge using the Orbit SDK ' -author: GreatSoshiant -sme: GreatSoshiant -target_audience: 'Developers deploying and maintaining Orbit chains.' -sidebar_position: 5 -user_story: As a current or prospective Orbit chain deployer, I need to understand how to deploy a token bridge using the Orbit SDK. -content_type: how-to ---- +## Deploy a token bridge The Arbitrum Nitro stack doesn't natively support specific token bridging standards at the protocol level. Instead, Offchain Labs designed a "canonical bridge" that ensures seamless token transfers between the parent and child chains. -The token bridge architecture includes contracts deployed on the parent chain and on the child chain. These entities communicate via the Retryable Ticket protocol, ensuring efficient and secure interactions. - -:::caution UNDER CONSTRUCTION - -This document is under construction and may change significantly as we incorporate [style guidance](/for-devs/contribute#document-type-conventions) and feedback from readers. Feel free to request specific clarifications by clicking the `Request an update` button at the top of this document. - -::: - -:::info - -See the [`ERC-20` token bridge overview](/build-decentralized-apps/token-bridging/03-token-bridge-erc20.md) for more information about the token bridge's design and operational dynamics, and the ["create-token-bridge-eth" example ](https://github.com/OffchainLabs/arbitrum-orbit-sdk/tree/main/examples/create-token-bridge-eth) for additional guidance. - -::: +The token bridge architecture includes contracts deployed on the parent chain and on your Orbit chain.These entities communicate via the Retryable Ticket protocol, ensuring efficient and secure interactions. ### Token bridge deployment steps Once an Orbit chain has been deployed and initialized, the bridge contracts need to be deployed on both the parent and child chains. This process involves several steps: -1. **[Token approval](#1-token-approval)** -2. **[Token bridge contract deployment](#2-token-bridge-contract-deployment)** -3. **[Transaction recipient and checking for deployment on child chain](#3-transaction-recipient-and-checking-for-deployment-on-child-chain)** -4. **[Deployment information and contract addresses](#4-deployment-information-and-contract-addresses)** -5. **[Setting up the WETH gateway](#5-setting-up-the-weth-gateway)** - -:::info - -The token bridge deployment process is the same for all Orbit chains types except for the following: - -- **Custom fee token Orbit chains** which require [token approval](#step-1). -- **`ETH`-based Orbit chains**, for which you need to [set up a WETH gateway](#step-5). - -::: - -### 1. Token approval - -:::note - -This step is only required for custom fee token Orbit chains. - -::: - -Initiating the deployment of a token bridge for **[Custom Fee Token](/launch-orbit-chain/concepts/custom-gas-token-sdk.md)** on orbit chains begins with ensuring the `TokenBridgeCreator` contract is granted sufficient approvals of the native token. To facilitate this process, the Orbit SDK provides two APIs: - -1. **`createTokenBridgeEnoughCustomFeeTokenAllowance`**: This method verifies that the deployer's address has enough allowance to pay for the fees associated with the token bridge deployment. -2. **`createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest`**: This function assists in generating the raw transaction required to approve the native token for the `TokenBridgeCreator` contract. - -The following example demonstrates how to leverage these APIs effectively to check for and, if necessary, grant approval to the `TokenBridgeCreator` contract: - -```js -const allowanceParams = { - nativeToken, - owner: rollupOwner.address, - publicClient: parentChainPublicClient, -}; -if (!(await createTokenBridgeEnoughCustomFeeTokenAllowance(allowanceParams))) { - const approvalTxRequest = await createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest( - allowanceParams, - ); -} -``` - -In this scenario, `allowanceParams` includes: - -- The native token's details: `nativeToken`. -- The Rollup owner's address: `rollupOwner.address`. -- The parent chain's publicClient: `parentChainPublicClient`. - -First, `createTokenBridgeEnoughCustomFeeTokenAllowance` checks if the deployer has been granted enough allowance. - -If the allowance is insufficient, `createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest` is called to create the necessary approval transaction. - -Please note that after generating the raw transaction, the deployer must still sign and broadcast it to the network to finalize the approval process. +1. **[Token bridge contract deployment](#2-token-bridge-contract-deployment)** +2. **[Transaction recipient and checking for deployment on child chain](#3-transaction-recipient-and-checking-for-deployment-on-child-chain)** +3. **[Deployment information and contract addresses](#4-deployment-information-and-contract-addresses)** +4. **[Setting up the WETH gateway](#5-setting-up-the-weth-gateway)** -### 2. Token bridge contract deployment +### 1. Token bridge contract deployment Deploying token bridge contracts is the first step in creating a bridge between the parent and the Orbit chain. @@ -120,7 +48,7 @@ For more insights into these variables and their usage, consider exploring this Following the creation of the raw transaction, the next steps involve signing it and broadcasting it to the relevant blockchain network to complete the deployment process. -### 3. Transaction recipient and checking for deployment on child chain +### 2. Transaction recipient and checking for deployment on child chain After sending the deployment transaction, you will need to retrieve the transaction receipt and verify the successful deployment of the contracts on both the parent and child chains. @@ -156,7 +84,7 @@ console.log(`Retryable executed successfully`); In this example, the `waitForRetryables` method is invoked on the `txReceipt` to monitor the execution of Retryable Tickets and verify their status. A `success` status indicates that the Retryable Tickets have been executed successfully, ensuring the contracts' deployment. It's important to note that this process involves two Retryable Tickets. You can check out a [more comprehensive walkthrough](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/1e39d21eef57d204bfa609c4c29284528ddf05ac/examples/create-token-bridge-eth/index.ts#L78-L104) of the example. This enhanced approach not only simplifies the retrieval of transaction receipts but also provides a reliable method for verifying contract deployment across chains. -### 4. Deployment information and contract addresses +### 3. Deployment information and contract addresses Once you have completed the deployment and are assured that the Retryable Tickets are successful, you can use `getTokenBridgeContracts` to retrieve the deployment information and all the token bridge contracts' addresses. @@ -168,7 +96,7 @@ const tokenBridgeContracts = await txReceipt.getTokenBridgeContracts({ }); ``` -### 5. Setting up the WETH gateway +### 4. Setting up the WETH gateway The last step in spinning up the token bridge for an `ETH`- based Orbit chain is setting up the `WETH` Gateway. diff --git a/arbitrum-docs/launch-orbit-chain/partials/_get-deployed-chain-info-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_get-deployed-chain-info-partial.md new file mode 100644 index 0000000000..3de9f74c52 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_get-deployed-chain-info-partial.md @@ -0,0 +1,15 @@ +## Get the orbit chain information after deployment + +Once you've successfully deployed your Orbit chain, the next step is to retrieve detailed information about the deployment. The Orbit SDK provides a convenient way to do this through the `createRollupPrepareTransactionReceipt` API. + +After sending the signed transaction and receiving the transaction receipt, you can use the `createRollupPrepareTransactionReceipt` API to parse this receipt and extract the relevant data. This process will provide comprehensive details about the deployed chain, such as contract addresses, configuration settings, and other information. + +Here's an example of how to use the Orbit SDK to get data from a deployed Orbit chain: + +```js +import { createRollupPrepareTransactionReceipt } from '@arbitrum/orbit-sdk'; + +const data = createRollupPrepareTransactionReceipt(txReceipt); +``` + +In this example, `txReceipt` refers to the transaction receipt you received after deploying the chain. By passing this receipt to the `createRollupPrepareTransactionReceipt` function, you can easily access a wealth of information about your Orbit chain. This feature of the Orbit SDK simplifies the post-deployment process, allowing you to quickly and efficiently gather all necessary details about your chain for further use or reference. diff --git a/arbitrum-docs/launch-orbit-chain/partials/_info-anytrust-chain-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_info-anytrust-chain-partial.md new file mode 100644 index 0000000000..801eacc868 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_info-anytrust-chain-partial.md @@ -0,0 +1,6 @@ +:::info + +- Implements the [AnyTrust protocol](/inside-arbitrum-nitro/#inside-anytrust), relying on an external [Data Availability Committee (DAC)](/intro/glossary#data-availability-committee-dac) to store data and provide it on-demand instead of using their [parent chain](/intro/glossary/#parent-chain) as the Data Availability (DA) layer. +- **Use case**: Suitable for applications that require lower transaction fees. + +::: diff --git a/arbitrum-docs/launch-orbit-chain/partials/_info-custom-token-chain-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_info-custom-token-chain-partial.md new file mode 100644 index 0000000000..63efecbdf1 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_info-custom-token-chain-partial.md @@ -0,0 +1,6 @@ +:::info + +- An AnyTrust Orbit chain with the ability to specify a custom `ERC-20` gas token. +- **Use case**: Ideal for applications that require custom gas fee tokens and lower transaction fees. + +::: diff --git a/arbitrum-docs/launch-orbit-chain/partials/_info-rollup-chain-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_info-rollup-chain-partial.md new file mode 100644 index 0000000000..6970b573cc --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_info-rollup-chain-partial.md @@ -0,0 +1,10 @@ +:::info + +- Rollup chains offer Ethereum-grade security by batching, + compressing, and posting data to the parent chain, similarly to + Arbitrum One + + +- **Use case**: Ideal for applications that require high security guarantees. + +::: diff --git a/arbitrum-docs/launch-orbit-chain/partials/_multidimensional-content-controls-deploy-orbit-chain-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_multidimensional-content-controls-deploy-orbit-chain-partial.md new file mode 100644 index 0000000000..a563a42a5f --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_multidimensional-content-controls-deploy-orbit-chain-partial.md @@ -0,0 +1,76 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import InfoRollupChainPartial from './_info-rollup-chain-partial.md'; + +import InfoAnytrustChainPartial from './_info-anytrust-chain-partial.md'; + +import InfoCustomTokenChainPartial from './_info-custom-token-chain-partial.md'; + +import ApproveErc20TokenPartial from './_approve-erc20-token-partial.md'; + +import DeployOrbitChainHelpersPartial from './_deploy-orbit-chain-helpers-partial.md'; + +import DeployOrbitChainParametersPartial from './_deploy-orbit-chain-parameters-partial.md'; + +import GetDeployedChainInfoPartial from './_get-deployed-chain-info-partial.md'; + +import PrepareConfigParameterForRollupPartial from './_prepare-config-parameter-for-rollup-partial.md'; + +import PrepareConfigParameterForAnyTrustPartial from './_prepare-config-parameter-for-anytrust-partial.md'; + +import SendDeployTokenBridgeTransactionPartial from './_send-deploy-token-bridge-transaction-partial.md'; + +import SendOrbitChainDeploymentTransactionPartial from './_send-orbit-chain-deployment-transaction-partial.md'; + +import SetDacKeysetPartial from './_set-dac-keyset-partial.md'; + +import ConfigRollupNodePartial from './_config-rollup-node-partial.md'; + +import ConfigAnytrustNodePartial from './_config-anytrust-node-partial.md'; + +import DeployTokenBrigePartial from './_deploy-token-brige-partial.md'; + +import DeployCustomTokenBrigePartial from './_deploy-custom-token-brige-partial.md'; + +import TabItemsRollupOrbitChainPartial from './_tabItems-rollup-orbit-chain-partial.md'; + +import TabItemsAnytrustOrbitChainPartial from './_tabItems-anytrust-orbit-chain-partial.md'; + +import TabItemsCustomTokenOrbitChainPartial from './_tabItems-custom-token-orbit-chain-partial.md' + +import TabItemsCustomTokenOrbitChainPartialBottom from './_tabItems-custom-token-orbit-chain-partial-bottom.md' + +import TabItemsAnytrustOrbitChainPartialBottom from './_tabItems-anytrust-orbit-chain-partial-bottom.md'; + +import TabItemsRollupOrbitChainPartialBottom from './_tabItems-rollup-orbit-chain-partial-bottom.md'; + +
+ + + + + + + + + + + + + + + + + +
diff --git a/arbitrum-docs/launch-orbit-chain/partials/_prepare-config-parameter-for-anytrust-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_prepare-config-parameter-for-anytrust-partial.md new file mode 100644 index 0000000000..6370b33504 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_prepare-config-parameter-for-anytrust-partial.md @@ -0,0 +1,48 @@ +## Prepare your Orbit chain configuration object parameters + +### prepareChainConfig API: + +For an easier config preparation, the Orbit SDK provides the `prepareChainConfig` API, which takes config parameters as arguments and returns a `chainConfig` `JSON` string. Any parameters not provided will default to standard values, which are detailed in the [Orbit SDK repository](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/1f251f76a55bc1081f50938b0aa9f7965660ebf7/src/prepareChainConfig.ts#L3-L31). + +The `chainConfig` parameter within the `Config` structure is an essential element for tailoring your Orbit chain according to specific needs. This parameter is particularly significant when setting up an AnyTrust Orbit chain, as it includes configurations that distinguish it from a Rollup chain. The key parameter that differentiates an AnyTrust chain in this context is the `DataAvailabilityCommittee`. + +Here are the parameters you can use with `prepareChainConfig`: + +| Parameter | Description | +| :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- | +| `chainId` | Your Orbit chain's unique identifier. It differentiates your chain from others in the ecosystem. | +| `DataAvailabilityCommittee` | Set to `false`, this boolean makes your chain as a Rollup, set to `true` configures it as an AnyTrust chain. | +| `InitialChainOwner` | Identifies who owns and controls the chain. | +| `MaxCodeSize ` | Sets the maximum size for contract bytecodes on the Orbit chain. e.g. Ethereum mainnet has a limit of 24,576 Bytes. | +| `MaxInitCodeSize` | Similar to `MaxCodeSize`, defines the maximum size for your Orbit chain's **initialization** code. e.g. Ethereum mainnet limit is 49,152 Bytes. | + +For an AnyTrust chain, you need to set the `DataAvailabilityCommittee` to **true**. This setting is crucial as it indicates the chain's reliance on a committee for data availability, which is a hallmark of the AnyTrust model. + +Here’s an example of how to configure the `chainConfig` for an AnyTrust chain using the Orbit SDK: + +```js +import { prepareChainConfig } from '@arbitrum/orbit-sdk'; + +const chainConfig = prepareChainConfig({ + chainId: Some_Chain_ID, + arbitrum: { InitialChainOwner: deployer_address, DataAvailabilityCommittee: true }, +}); +``` + +In this example, you set up the chain configuration with a specific `chainId`, the `InitialChainOwner` as the deployer's address, and importantly, you configure the `DataAvailabilityCommittee` as `true`. This configuration ensures that your Orbit chain is set up as an AnyTrust chain, utilizing the unique features and operational model of the AnyTrust system within the Arbitrum Orbit framework. + +### createRollupPrepareConfig API: + +This API is designed to take parameters defined in the Config struct and fill in the rest with default values. It outputs a complete Config struct that is ready for use. + +For example, to create a Config struct with a specific chain ID (`chainId`), an owner address (`deployer_address`), and a `chainConfig` as described in the [previous section](#chain-config-parameter), you would use the Orbit SDK as follows: + +```js +import { createRollupPrepareConfig } from '@arbitrum/orbit-sdk'; + +const config = createRollupPrepareConfig({ + chainId: BigInt(chainId), + owner: deployer.address, + chainConfig, +}); +``` diff --git a/arbitrum-docs/launch-orbit-chain/partials/_prepare-config-parameter-for-rollup-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_prepare-config-parameter-for-rollup-partial.md new file mode 100644 index 0000000000..c2ee55f12f --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_prepare-config-parameter-for-rollup-partial.md @@ -0,0 +1,42 @@ +## Prepare your Rollup Orbit chain configuration object parameters + +### prepareChainConfig API: + +For an easier config preparation, the Orbit SDK provides the `prepareChainConfig` API, which takes config parameters as arguments and returns a `chainConfig` `JSON` string. Any parameters not provided will default to standard values, which are detailed in the [Orbit SDK repository](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/1f251f76a55bc1081f50938b0aa9f7965660ebf7/src/prepareChainConfig.ts#L3-L31). + +Here are the parameters you can use with `prepareChainConfig`: + +| Parameter | Description | +| :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------- | +| `chainId` | Your Orbit chain's unique identifier. It differentiates your chain from others in the ecosystem. | +| `DataAvailabilityCommittee` | Set to `false`, this boolean makes your chain as a Rollup, set to `true` configures it as an AnyTrust chain. | +| `InitialChainOwner` | Identifies who owns and controls the chain. | +| `MaxCodeSize ` | Sets the maximum size for contract bytecodes on the Orbit chain. e.g. Ethereum mainnet has a limit of 24,576 Bytes. | +| `MaxInitCodeSize` | Similar to `MaxCodeSize`, defines the maximum size for your Orbit chain's **initialization** code. e.g. Ethereum mainnet limit is 49,152 Bytes. | + +Below is an example of how to use `prepareChainConfig` to set up a Rollup chain with a specific `chainId`, an `InitialChainOwner` (named as `deployer_address`): + +```js +import { prepareChainConfig } from '@arbitrum/orbit-sdk'; + +const chainConfig = prepareChainConfig({ + chainId: Some_Chain_ID, + arbitrum: { InitialChainOwner: deployer_address, DataAvailabilityCommittee: false }, +}); +``` + +### createRollupPrepareConfig API: + +This API is designed to take parameters defined in the Config struct and fill in the rest with default values. It outputs a complete Config struct that is ready for use. + +For example, to create a Config struct with a specific chain ID (`chainId`), an owner address (`deployer_address`), and a `chainConfig` as described in the [previous section](#chain-config-parameter), you would use the Orbit SDK as follows: + +```js +import { createRollupPrepareConfig } from '@arbitrum/orbit-sdk'; + +const config = createRollupPrepareConfig({ + chainId: BigInt(chainId), + owner: deployer.address, + chainConfig, +}); +``` diff --git a/arbitrum-docs/launch-orbit-chain/partials/_send-deploy-token-bridge-transaction-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_send-deploy-token-bridge-transaction-partial.md new file mode 100644 index 0000000000..b5bfab7591 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_send-deploy-token-bridge-transaction-partial.md @@ -0,0 +1,34 @@ +## Deploy token bridge contract + +Deploying token bridge contracts is the first step in creating a bridge between the parent and the Orbit chain. + +The deployment process is the same as Orbit chain contracts', where a primary contract facilitates the deployment of core contracts. The token bridge contracts are deployed on the parent and child chains by `TokenBridgeCreator`. `TokenBridgeCreator` does it in a single transaction using the [ Retryable Tickets protocol ](/arbos/l1-to-l2-messaging#retryable-ticketsO). + +Orbit SDK provides an API that automates the deployment by interacting with the `TokenBridgeCreator` contract. The API is `createTokenBridgePrepareTransactionRequest`, which processes the necessary inputs and generates a transaction request tailored for token bridge deployment. + +Example: + +```js +const txRequest = await createTokenBridgePrepareTransactionRequest({ + params: { + rollup: rollupContractAddress, + rollupOwner: rollupOwnerAddress, + }, + parentChainPublicClient, + orbitChainPublicClient, + account: rollupOwnerAddress, +}); +``` + +Here are the parameters used in the above example: + +| Parameter | Description | +| :------------------------ | :------------------------------------------------ | +| `rollupContractAddress` | Orbit chain's Rollup contract address. | +| `rollupOwnerAddress` | Rollup owner's address. | +| `parentChainPublicClient` | Parent chain's public client, as defined by Viem. | +| `orbitChainPublicClient` | Orbit chain's public client, as defined by Viem. | + +For more insights into these variables and their usage, consider exploring this [token bridge deployment example](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/main/examples/create-token-bridge-eth/index.ts). + +Following the creation of the raw transaction, the next steps involve signing it and broadcasting it to the relevant blockchain network to complete the deployment process. diff --git a/arbitrum-docs/launch-orbit-chain/partials/_send-orbit-chain-deployment-transaction-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_send-orbit-chain-deployment-transaction-partial.md new file mode 100644 index 0000000000..e13da1b5fe --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_send-orbit-chain-deployment-transaction-partial.md @@ -0,0 +1,25 @@ +## Deploy your Orbit chain + +Orbit SDK provides the `createRollupPrepareTransactionRequest` helper to prepare your transaction: + +#### createRollupPrepareTransactionRequest API: + +This API accepts parameters defined in the `RollupDeploymentParams` struct, applying defaults where necessary, and generates the `RollupDeploymentParams`. This struct is then used to create a raw transaction which calls the `createRollup` function of the `RollupCreator` contract. As discussed in previous sections, this function deploys and initializes all core Orbit contracts. + +For instance, to deploy using the Orbit SDK with a Config equal to `config`, a `batchPoster`, and a set of validators such as `[validator]`, the process would look like this: + +```js +import { createRollupPrepareTransactionRequest } from '@arbitrum/orbit-sdk'; + +const request = await createRollupPrepareTransactionRequest({ + params: { + config, + batchPoster, + validators: [validator], + }, + account: deployer_address, + publicClient, +}); +``` + +After creating the raw transaction, you need to sign and broadcast it to the network, as shown in the [`create-rollup-eth` example.](https://github.com/OffchainLabs/arbitrum-orbit-sdk/blob/main/examples/create-rollup-eth/low_level.ts#L71) diff --git a/arbitrum-docs/launch-orbit-chain/partials/_set-dac-keyset-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_set-dac-keyset-partial.md new file mode 100644 index 0000000000..4ebcdd0da5 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_set-dac-keyset-partial.md @@ -0,0 +1,23 @@ +## Set valid keyset on parent chain + +The final step in deploying your AnyTrust Orbit chain is to set up the valid keyset for your Data Availability Committee (DAC) on the parent chain. This keyset is essential for ensuring the integrity of the certificates that the DAC signs when storing Orbit chain's data. The process of generating keys and the keyset for your committee is comprehensively explained in our documentation. Once you have your keyset, it needs to be established on the `SequencerInbox` contract of your Orbit chain on the parent chain. + +To facilitate this, we provide an API in Orbit SDK named `setValidKeysetPrepareTransactionRequest`. This API aids in setting the keyset on the parent chain. To use this API, you need specific information that you gathered in step 3. This includes the `upgradeExecutor` and `sequencerInbox` addresses of your Orbit chain, the generated keyset for your committee, and the account of the owner. + +Here's an example of how you can use the Orbit SDK to set the keyset: + +```js +const txRequest = await setValidKeysetPrepareTransactionRequest({ + coreContracts: { + upgradeExecutor: 'upgradeExecutor_address', + sequencerInbox: 'sequencerInbox_address', + }, + keyset, + account: deployer.address, + publicClient: parentChainPublicClient, +}); +``` + +In this example, `upgradeExecutor_address` and `sequencerInbox_address` are placeholders for the actual addresses of the respective contracts in your Orbit chain. `keyset` is the keyset you generated for your committee, and `deployer.address` refers to the owner's account address. + +After you create the transaction request using the above API, the next step is to sign and send the transaction. This action will effectively set the keyset on the parent chain, allowing it to recognize and verify the valid keyset for your AnyTrust Orbit chain. This step is crucial for the operational integrity and security of your AnyTrust chain, ensuring that the data verified by the DAC is recognized and accepted by the parent chain. diff --git a/arbitrum-docs/launch-orbit-chain/partials/_tabItems-anytrust-orbit-chain-partial-bottom.md b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-anytrust-orbit-chain-partial-bottom.md new file mode 100644 index 0000000000..453c4a7bc0 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-anytrust-orbit-chain-partial-bottom.md @@ -0,0 +1,50 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import DeployOrbitChainHelpersPartial from './_deploy-orbit-chain-helpers-partial.md'; + +import DeployOrbitChainParametersPartial from './_deploy-orbit-chain-parameters-partial.md'; + +import GetDeployedChainInfoPartial from './_get-deployed-chain-info-partial.md'; + +import SendDeployTokenBridgeTransactionPartial from './_send-deploy-token-bridge-transaction-partial.md'; + +import SendOrbitChainDeploymentTransactionPartial from './_send-orbit-chain-deployment-transaction-partial.md'; + +import ConfigAnytrustNodePartial from './_config-anytrust-node-partial.md'; + +import DeployTokenBrigePartial from './_deploy-token-brige-partial.md'; + +import PrepareConfigParameterForAnyTrustPartial from './_prepare-config-parameter-for-anytrust-partial.md'; + +import SetDacKeysetPartial from './_set-dac-keyset-partial.md'; + + +
+ + + + + + + + + + + + + + +
diff --git a/arbitrum-docs/launch-orbit-chain/partials/_tabItems-anytrust-orbit-chain-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-anytrust-orbit-chain-partial.md new file mode 100644 index 0000000000..8a7c127a8d --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-anytrust-orbit-chain-partial.md @@ -0,0 +1,58 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import DeployOrbitChainHelpersPartial from './_deploy-orbit-chain-helpers-partial.md'; + +import DeployOrbitChainParametersPartial from './_deploy-orbit-chain-parameters-partial.md'; + +import GetDeployedChainInfoPartial from './_get-deployed-chain-info-partial.md'; + +import SendDeployTokenBridgeTransactionPartial from './_send-deploy-token-bridge-transaction-partial.md'; + +import SendOrbitChainDeploymentTransactionPartial from './_send-orbit-chain-deployment-transaction-partial.md'; + +import ConfigAnytrustNodePartial from './_config-anytrust-node-partial.md'; + +import DeployTokenBrigePartial from './_deploy-token-brige-partial.md'; + +import PrepareConfigParameterForAnyTrustPartial from './_prepare-config-parameter-for-anytrust-partial.md'; + +import SetDacKeysetPartial from './_set-dac-keyset-partial.md'; + + + + +
+ + + + + + + + + + + + + + + + + + + + +
diff --git a/arbitrum-docs/launch-orbit-chain/partials/_tabItems-custom-token-orbit-chain-partial-bottom.md b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-custom-token-orbit-chain-partial-bottom.md new file mode 100644 index 0000000000..19bd619759 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-custom-token-orbit-chain-partial-bottom.md @@ -0,0 +1,56 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import DeployOrbitChainHelpersPartial from './_deploy-orbit-chain-helpers-partial.md'; + +import DeployOrbitChainParametersPartial from './_deploy-orbit-chain-parameters-partial.md'; + +import GetDeployedChainInfoPartial from './_get-deployed-chain-info-partial.md'; + +import PrepareConfigParameterForRollupPartial from './_prepare-config-parameter-for-rollup-partial.md'; + +import SendDeployTokenBridgeTransactionPartial from './_send-deploy-token-bridge-transaction-partial.md'; + +import SendOrbitChainDeploymentTransactionPartial from './_send-orbit-chain-deployment-transaction-partial.md'; + +import ConfigRollupNodePartial from './_config-rollup-node-partial.md'; + +import ConfigAnytrustNodePartial from './_config-anytrust-node-partial.md'; + +import DeployTokenBrigePartial from './_deploy-token-brige-partial.md'; + +import DeployCustomTokenBrigePartial from './_deploy-custom-token-brige-partial.md'; + +import ApproveErc20TokenPartial from './_approve-erc20-token-partial.md'; + +
+ + + + + + + + + + + + + + + + +
diff --git a/arbitrum-docs/launch-orbit-chain/partials/_tabItems-custom-token-orbit-chain-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-custom-token-orbit-chain-partial.md new file mode 100644 index 0000000000..6e6b95a727 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-custom-token-orbit-chain-partial.md @@ -0,0 +1,68 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + +import ConfigAnytrustNodePartial from './_config-anytrust-node-partial.md'; + +import DeployOrbitChainHelpersPartial from './_deploy-orbit-chain-helpers-partial.md'; + +import DeployOrbitChainParametersPartial from './_deploy-orbit-chain-parameters-partial.md'; + +import GetDeployedChainInfoPartial from './_get-deployed-chain-info-partial.md'; + +import PrepareConfigParameterForAnyTrustPartial from './_prepare-config-parameter-for-anytrust-partial.md'; + +import PrepareConfigParameterForRollupPartial from './_prepare-config-parameter-for-rollup-partial.md'; + +import SendDeployTokenBridgeTransactionPartial from './_send-deploy-token-bridge-transaction-partial.md'; + +import SendOrbitChainDeploymentTransactionPartial from './_send-orbit-chain-deployment-transaction-partial.md'; + +import ConfigRollupNodePartial from './_config-rollup-node-partial.md'; + +import DeployTokenBrigePartial from './_deploy-token-brige-partial.md'; + +import DeployCustomTokenBrigePartial from './_deploy-custom-token-brige-partial.md'; + +import ApproveErc20TokenPartial from './_approve-erc20-token-partial.md'; + +import SetDacKeysetPartial from './_set-dac-keyset-partial.md'; + +
+ + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/arbitrum-docs/launch-orbit-chain/partials/_tabItems-rollup-orbit-chain-partial-bottom.md b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-rollup-orbit-chain-partial-bottom.md new file mode 100644 index 0000000000..9d144ba7e1 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-rollup-orbit-chain-partial-bottom.md @@ -0,0 +1,48 @@ + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import DeployOrbitChainHelpersPartial from './_deploy-orbit-chain-helpers-partial.md'; + +import DeployOrbitChainParametersPartial from './_deploy-orbit-chain-parameters-partial.md'; + +import GetDeployedChainInfoPartial from './_get-deployed-chain-info-partial.md'; + +import SendDeployTokenBridgeTransactionPartial from './_send-deploy-token-bridge-transaction-partial.md'; + +import SendOrbitChainDeploymentTransactionPartial from './_send-orbit-chain-deployment-transaction-partial.md'; + +import ConfigAnytrustNodePartial from './_config-anytrust-node-partial.md'; + +import DeployTokenBrigePartial from './_deploy-token-brige-partial.md'; + +import PrepareConfigParameterForAnyTrustPartial from './_prepare-config-parameter-for-anytrust-partial.md'; + +import SetDacKeysetPartial from './_set-dac-keyset-partial.md'; + + +
+ + + + + + + + + + + + +
diff --git a/arbitrum-docs/launch-orbit-chain/partials/_tabItems-rollup-orbit-chain-partial.md b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-rollup-orbit-chain-partial.md new file mode 100644 index 0000000000..d4295527f4 --- /dev/null +++ b/arbitrum-docs/launch-orbit-chain/partials/_tabItems-rollup-orbit-chain-partial.md @@ -0,0 +1,54 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import DeployOrbitChainHelpersPartial from './_deploy-orbit-chain-helpers-partial.md'; + +import DeployOrbitChainParametersPartial from './_deploy-orbit-chain-parameters-partial.md'; + +import GetDeployedChainInfoPartial from './_get-deployed-chain-info-partial.md'; + +import SendDeployTokenBridgeTransactionPartial from './_send-deploy-token-bridge-transaction-partial.md'; + +import SendOrbitChainDeploymentTransactionPartial from './_send-orbit-chain-deployment-transaction-partial.md'; + +import ConfigAnytrustNodePartial from './_config-anytrust-node-partial.md'; + +import DeployTokenBrigePartial from './_deploy-token-brige-partial.md'; + +import PrepareConfigParameterForRollupPartial from './_prepare-config-parameter-for-rollup-partial.md'; + +import SetDacKeysetPartial from './_set-dac-keyset-partial.md'; + +import ConfigRollupNodePartial from './_config-rollup-node-partial.md'; + +
+ + + + + + + + + + + + + + + + + +
+ diff --git a/arbitrum-docs/launch-orbit-chain/troubleshooting-building-orbit.md b/arbitrum-docs/launch-orbit-chain/troubleshooting-building-orbit.md index c0fb44a389..88a8a9d136 100644 --- a/arbitrum-docs/launch-orbit-chain/troubleshooting-building-orbit.md +++ b/arbitrum-docs/launch-orbit-chain/troubleshooting-building-orbit.md @@ -6,10 +6,8 @@ user_story: As a developer, I want to understand how to troubleshoot common issu content_type: faq --- -import FAQStructuredDataJsonLd from '@site/src/components/FAQStructuredData'; -import FAQQuestions from '../partials/_troubleshooting-orbit-partial.md'; +import FAQStructuredData from '@site/src/components/FAQStructuredData'; - - + diff --git a/arbitrum-docs/learn-more/faq.md b/arbitrum-docs/learn-more/faq.md index 14c5f8f3b5..c2fab8bf1e 100644 --- a/arbitrum-docs/learn-more/faq.md +++ b/arbitrum-docs/learn-more/faq.md @@ -5,8 +5,6 @@ user_story: As a user, I want to review a list of frequently asked questions and content_type: faq --- -import FAQStructuredDataJsonLd from '@site/src/components/FAQStructuredData'; -import FAQQuestions from '../partials/_troubleshooting-users-partial.md'; +import FAQStructuredData from '@site/src/components/FAQStructuredData'; - - + diff --git a/arbitrum-docs/node-running/faq.md b/arbitrum-docs/node-running/faq.md index 1016256769..b520cf1c30 100644 --- a/arbitrum-docs/node-running/faq.md +++ b/arbitrum-docs/node-running/faq.md @@ -5,8 +5,6 @@ user_story: As a node runner, I want to review a list of frequently asked questi content_type: faq --- -import FAQStructuredDataJsonLd from '@site/src/components/FAQStructuredData'; -import FAQQuestions from '../partials/_troubleshooting-nodes-partial.md'; +import FAQStructuredData from '@site/src/components/FAQStructuredData'; - - + diff --git a/arbitrum-docs/run-arbitrum-node/01-overview.md b/arbitrum-docs/node-running/gentle-introduction-run-node.md similarity index 60% rename from arbitrum-docs/run-arbitrum-node/01-overview.md rename to arbitrum-docs/node-running/gentle-introduction-run-node.md index 0b28c0f727..1a0e589c9b 100644 --- a/arbitrum-docs/run-arbitrum-node/01-overview.md +++ b/arbitrum-docs/node-running/gentle-introduction-run-node.md @@ -11,8 +11,8 @@ In order to be able to _interact with_ or _build applications on_ any of the Arb Here, you can find resources that help you run different types of Arbitrum nodes: -- Step-by-step instructions for running different Arbitrum nodes, including [full Nitro node](/run-arbitrum-node/03-run-full-node.md), [full Classic node](/node-running/how-tos/running-a-classic-node.mdx), [local dev node](/run-arbitrum-node/04-run-local-dev-node.md), [feed relay](/node-running/how-tos/running-a-feed-relay.mdx), and [validator](/node-running/how-tos/running-a-validator.mdx) -- Step-by-step instructions for how to [read the sequencer feed](/node-running/how-tos/read-sequencer-feed.md), [build the Nitro locally](/node-running/how-tos/build-nitro-locally.md) and [run the sequencer coordinator manager UI tool](/node-running/how-tos/running-a-sequencer-coordinator-manager.mdx) +- Step-by-step instructions for running different Arbitrum nodes, including [full Nitro node](./how-tos/running-a-full-node.mdx), [full Classic node](./how-tos/running-a-classic-node.mdx), [local dev node](./how-tos/local-dev-node.mdx), [feed relay](./how-tos/running-a-feed-relay.mdx), and [validator](./how-tos/running-a-validator.mdx) +- Step-by-step instructions for how to [read the sequencer feed](./how-tos/read-sequencer-feed.md), [build the Nitro locally](./how-tos/build-nitro-locally.md) and [run the sequencer coordinator manager UI tool](./how-tos/running-a-sequencer-coordinator-manager.mdx) - Step-by-step instructions for [how to configure a Data Availability Committee](/node-running/how-tos/data-availability-committee/introduction.mdx) -- [Troubleshooting page](/node-running/troubleshooting-running-nodes.md) -- [Frequently asked questions](/node-running/faq.md) +- [Troubleshooting page](./troubleshooting-running-nodes.md) +- [Frequently asked questions](./faq.md) diff --git a/arbitrum-docs/node-running/how-tos/build-nitro-locally.md b/arbitrum-docs/node-running/how-tos/build-nitro-locally.md index 8a60324f9b..5dca67778b 100644 --- a/arbitrum-docs/node-running/how-tos/build-nitro-locally.md +++ b/arbitrum-docs/node-running/how-tos/build-nitro-locally.md @@ -10,7 +10,7 @@ import PublicPreviewBannerPartial from '../../partials/_public-preview-banner-pa -Arbitrum Nitro is the software that powers all Arbitrum chains. This how-to shows how you can build a Docker image, or binaries, directly from Nitro's source code. If you want to run a node for one of the Arbitrum chains, however, it is recommended that you use the docker image available on DockerHub, as explained in [How to run a full node](/run-arbitrum-node/03-run-full-node.md). +Arbitrum Nitro is the software that powers all Arbitrum chains. This how-to shows how you can build a Docker image, or binaries, directly from Nitro's source code. If you want to run a node for one of the Arbitrum chains, however, it is recommended that you use the docker image available on DockerHub, as explained in [How to run a full node](/node-running/how-tos/running-a-full-node.mdx). This how-to assumes that you're running one of the following operating systems: diff --git a/arbitrum-docs/node-running/how-tos/data-availability-committee/deploy-a-das.mdx b/arbitrum-docs/node-running/how-tos/data-availability-committee/deploy-a-das.mdx index 5bfe1d092a..e3830e6b08 100644 --- a/arbitrum-docs/node-running/how-tos/data-availability-committee/deploy-a-das.mdx +++ b/arbitrum-docs/node-running/how-tos/data-availability-committee/deploy-a-das.mdx @@ -132,6 +132,7 @@ To enable caching, you can use the following parameters: | --data-availability.local-cache.enable | Enables local in-memory caching of sequencer batch data | | --data-availability.local-cache.capacity | Maximum number of entries (up to 64KB each) to store in the cache. (default 20000) | + To enable the REST aggregator, use the following parameters: | Parameter | Description | diff --git a/arbitrum-docs/run-arbitrum-node/04-run-local-dev-node.md b/arbitrum-docs/node-running/how-tos/local-dev-node.mdx similarity index 87% rename from arbitrum-docs/run-arbitrum-node/04-run-local-dev-node.md rename to arbitrum-docs/node-running/how-tos/local-dev-node.mdx index 26940c8a17..a857d285af 100644 --- a/arbitrum-docs/run-arbitrum-node/04-run-local-dev-node.md +++ b/arbitrum-docs/node-running/how-tos/local-dev-node.mdx @@ -15,6 +15,6 @@ If you want your local development environment to support Stylus, [check out thi ::: -import LocalDevNodeSetupInstructions from '../node-running/partials/_local-dev-node-setup-instructions.mdx'; +import LocalDevNodeSetupInstructions from '../partials/_local-dev-node-setup-instructions.mdx'; diff --git a/arbitrum-docs/node-running/how-tos/migrate-state-and-history-from-classic.mdx b/arbitrum-docs/node-running/how-tos/migrate-state-and-history-from-classic.mdx index 2ecf91f278..ae6b6ea431 100644 --- a/arbitrum-docs/node-running/how-tos/migrate-state-and-history-from-classic.mdx +++ b/arbitrum-docs/node-running/how-tos/migrate-state-and-history-from-classic.mdx @@ -8,7 +8,7 @@ content_type: how-to sidebar_position: 11 --- -When running a Nitro node for the first time on a chain that produced [classic blocks](/build-decentralized-apps/03-public-chains.md#classic-deprecated) in the past (like Arbitrum One), you need to initialize its database to, at least, the state of the chain after executing the last classic block. The common, and recommended, way of doing that is to provide a database snapshot using the `--init.url` option (as mentioned in [How to run a full node (Nitro)](/run-arbitrum-node/03-run-full-node.md)). In this how-to we show you an alternative way for doing that, migrating the state and history of the chain from a fully synced classic node. +When running a Nitro node for the first time on a chain that produced [classic blocks](/build-decentralized-apps/03-public-chains.md#classic-deprecated) in the past (like Arbitrum One), you need to initialize its database to, at least, the state of the chain after executing the last classic block. The common, and recommended, way of doing that is to provide a database snapshot using the `--init.url` option (as mentioned in [How to run a full node (Nitro)](/node-running/how-tos/running-a-full-node.mdx)). In this how-to we show you an alternative way for doing that, migrating the state and history of the chain from a fully synced classic node. :::info Is this How-to for you? @@ -23,7 +23,7 @@ Keep in mind that this process only applies to Arbitrum One. Other Arbitrum chai To successfully migrate the state and history of the chain from a classic (pre-Nitro) node to a Nitro node, you'll need: - A fully synced classic node: you can find instructions on how to run a classic node in [this page](/node-running/how-tos/running-a-classic-node.mdx). -- A clean, uninitialized Nitro node: you can find instructions on how to set up a Nitro node in [this page](/run-arbitrum-node/03-run-full-node.md). +- A clean, uninitialized Nitro node: you can find instructions on how to set up a Nitro node in [this page](/node-running/how-tos/running-a-full-node.mdx). ## Step 1: Enable export options in your classic node @@ -87,5 +87,5 @@ This state import operation requires more resources than a regular run of a Nitr ## See also -- [How to run a full node (Nitro)](/run-arbitrum-node/03-run-full-node.md) +- [How to run a full node (Nitro)](/node-running/how-tos/running-a-full-node.mdx) - [How to run a full node (Classic, pre-Nitro)](/node-running/how-tos/running-a-classic-node.mdx) diff --git a/arbitrum-docs/node-running/how-tos/read-sequencer-feed.md b/arbitrum-docs/node-running/how-tos/read-sequencer-feed.md index ec4a8f6dc8..f2549f4efa 100644 --- a/arbitrum-docs/node-running/how-tos/read-sequencer-feed.md +++ b/arbitrum-docs/node-running/how-tos/read-sequencer-feed.md @@ -18,26 +18,24 @@ When connected to websocket port `9642` of the local relay, you'll receive a dat ```json { "version": 1, - "messages": [ - { - "sequenceNumber": 25757171, + "messages": [{ + "sequenceNumber": 25757171, + "message": { "message": { - "message": { - "header": { - "kind": 3, - "sender": "0xa4b000000000000000000073657175656e636572", - "blockNumber": 16238523, - "timestamp": 1671691403, - "requestId": null, - "baseFeeL1": null - }, - "l2Msg": "BAL40oKksUiElQL5AISg7rsAgxb6o5SZbYNoIF2DTixsqDpD2xII9GJLG4C4ZAhh6N0AAAAAAAAAAAAAAAC7EQiq1R1VYgL3/oXgvD921hYRyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArAAaAkebuEnSAUvrWVBGTxA7W+ZMNn5uyLlbOH7Nrs0bYOv6AOxQPqAo2UB0Z7vqlugjn+BUl0drDcWejBfDiPEC6jQA==" + "header": { + "kind": 3, + "sender": "0xa4b000000000000000000073657175656e636572", + "blockNumber": 16238523, + "timestamp": 1671691403, + "requestId": null, + "baseFeeL1": null }, - "delayedMessagesRead": 354560 + "l2Msg": "BAL40oKksUiElQL5AISg7rsAgxb6o5SZbYNoIF2DTixsqDpD2xII9GJLG4C4ZAhh6N0AAAAAAAAAAAAAAAC7EQiq1R1VYgL3/oXgvD921hYRyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArAAaAkebuEnSAUvrWVBGTxA7W+ZMNn5uyLlbOH7Nrs0bYOv6AOxQPqAo2UB0Z7vqlugjn+BUl0drDcWejBfDiPEC6jQA==" }, - "signature": null - } - ] + "delayedMessagesRead": 354560 + }, + "signature": null + }] } ``` @@ -64,6 +62,7 @@ type BroadcastFeedMessage struct { Each `message` conforms to [`arbstate.MessageWithMetadata`](https://github.com/OffchainLabs/nitro/blob/a05f768d774f60468a58a6a94fcc1be18e4d8fae/arbstate/inbox.go#L42): + ``` type MessageWithMetadata struct { Message *arbos.L1IncomingMessage `json:"message"` @@ -85,6 +84,6 @@ type L1IncomingMessage struct { You can use the [`ParseL2Transactions`](https://github.com/OffchainLabs/nitro/blob/9b1e622102fa2bebfd7dffd327be19f8881f1467/arbos/incomingmessage.go#L227) function to decode the message. Using the feed relay, you can also retrieve the `L2 block number` of a message: - -- On Arbitrum One, this can be done by adding the Arbitrum One genesis block number (22207817) to the sequence number of the feed message. + +- On Arbitrum One, this can be done by adding the Arbitrum One genesis block number (22207817) to the sequence number of the feed message. - Note that in the case of Arbitrum Nova, the Nitro genesis number is `0`, so it doesn't need to be included when adding to the feed message's sequence number. diff --git a/arbitrum-docs/run-arbitrum-node/03-run-full-node.md b/arbitrum-docs/node-running/how-tos/running-a-full-node.mdx similarity index 76% rename from arbitrum-docs/run-arbitrum-node/03-run-full-node.md rename to arbitrum-docs/node-running/how-tos/running-a-full-node.mdx index 4529baddbd..18cff0b97f 100644 --- a/arbitrum-docs/run-arbitrum-node/03-run-full-node.md +++ b/arbitrum-docs/node-running/how-tos/running-a-full-node.mdx @@ -15,18 +15,11 @@ There is no protocol level incentive to run an Arbitum full node. If you’re in Minimum hardware configuration required to setup a Nitro full node (not archival): -- **RAM**: 16 GB -- **CPU**: 4 core CPU - - Single core performance is important. If the node is falling behind and a single core is 100% busy, it is recommended to update to a faster processor -- **Storage (last updated on April 2024)**: - - Arbitrum One: 560GB for a pruned node, growing at ~200GB per month (NVMe SSD drives are recommended) - - Arbitrum Nova: 400GB for a pruned node, growing at ~1.6TB per month (NVMe SSD drives are recommended) - -:::info - -These minimum requirements for RAM and CPU are recommended for nodes that process a small amount of RPC requests. For nodes that require processing multiple simultaneous requests, both RAM and number of CPU cores will need to be scaled with the amount of traffic being served. - -::: +- **RAM**: 8-16 GB +- **CPU**: 2-4 core CPU (For AWS: t3 xLarge) +- **Storage (last updated on January 2024)**: + - Arbitrum One: 480GB SSD for a pruned node, growing at ~40GB per month + - Arbitrum Nova: 112 GB SSD for a pruned node, growing at ~20GB per month :::info @@ -53,9 +46,8 @@ Even though there are alpha and beta versions of the diff --git a/arbitrum-docs/node-running/how-tos/running-an-archive-node.mdx b/arbitrum-docs/node-running/how-tos/running-an-archive-node.mdx index 6bb89d289e..15c7897d1f 100644 --- a/arbitrum-docs/node-running/how-tos/running-an-archive-node.mdx +++ b/arbitrum-docs/node-running/how-tos/running-an-archive-node.mdx @@ -23,8 +23,8 @@ Running an Arbitrum One **full node** in **archive mode** lets you access both p | Use case | Required node type(s) | Docs | | ------------------------------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------- | | Access the **Arbitrum network** without running your own node | Fully managed by third-parties, exposed via RPC endpoints | [RPC endpoints and providers](/build-decentralized-apps/reference/01-node-providers.md) | -| Run an **archive node** for **Arbitrum Sepolia (testnet)** or **Arbitrum Nova** | Full node (Nitro) | [How to run a full node (Nitro)](/run-arbitrum-node/03-run-full-node.md) | -| Send **post-Nitro** archive requests | Full node (Nitro) | [How to run a full node (Nitro)](/run-arbitrum-node/03-run-full-node.md) | +| Run an **archive node** for **Arbitrum Sepolia (testnet)** or **Arbitrum Nova** | Full node (Nitro) | [How to run a full node (Nitro)](./running-a-full-node.mdx) | +| Send **post-Nitro** archive requests | Full node (Nitro) | [How to run a full node (Nitro)](./running-a-full-node.mdx) | | Send **pre-Nitro** archive requests | Full node (Classic) | [How to run a full node (Classic, pre-Nitro)](./running-a-classic-node.mdx) | | Send **post-Nitro** _and_ **pre-Nitro** archive requests | Full node (Nitro) _and_ full node (Classic) | That's what this how-to is for; you're in the right place. | @@ -38,9 +38,9 @@ The minimum storage requirements will change over time as the Nitro chains grow 1. **RAM:** 16GB+ for Nitro and 32GB+ for Classic 2. **CPU:** 4+ core CPU -3. **Storage (last updated on April 2024):** - - Arbitrum One: 9.7TB SSD, currently growing at a rate of about 850GB per month - - Arbitrum Nova: 4.3TB SSD, currently growing at a rate of about 1.8TB GB per month +3. **Storage (last updated on January 2024):** + - Arbitrum One: 8TB SSD, currently growing at a rate of about .67TB per month + - Arbitrum Nova: 1.55TB SSD, currently growing at a rate of about .3TB GB per month 4. **Docker images:** We'll specify these in the below commands; you don't need to manually download them. - Latest Docker image for **Arbitrum One Nitro**: @latestNitroNodeImage@ - Latest Docker image for **Arbitrum One Classic**: @latestClassicNodeImage@ diff --git a/arbitrum-docs/node-running/how-tos/running-an-orbit-node.mdx b/arbitrum-docs/node-running/how-tos/running-an-orbit-node.mdx index 83142db299..854aa95edd 100644 --- a/arbitrum-docs/node-running/how-tos/running-an-orbit-node.mdx +++ b/arbitrum-docs/node-running/how-tos/running-an-orbit-node.mdx @@ -8,18 +8,21 @@ content_type: how-to This how-to provides step-by-step instructions for running an Orbit node on your local machine. + ## Prerequisites -Latest Docker Image: @latestNitroNodeImage@ + Latest Docker Image: @latestNitroNodeImage@ | Minimum Hardware Configuration | -| :--------------------------------------------------------------- | -| **RAM**: 8-16 GB | -| **CPU**: 2-4 core CPU (For AWS: t3 xLarge | +|:-----------------------------------------------------------------| +| **RAM**: 8-16 GB | +| **CPU**: 2-4 core CPU (For AWS: t3 xLarge | | **Storage**: Depends on the Orbit chain and its traffic overtime | + ## Required parameters + ### 1. Parent chain parameters The `parent-chain` argument needs to provide a standard RPC endpoint for an EVM node, whether self-hosted or obtained from a node service provider: @@ -27,20 +30,20 @@ The `parent-chain` argument needs to provide a standard RPC endpoint for an EVM ```shell --parent-chain.connection.url= ``` - :::note -[Public Arbitrum RPC endpoints](/build-decentralized-apps/reference/01-node-providers.md#arbitrum-public-rpc-endpoints) rate-limit connections. To avoid hitting a bottleneck, you can run a local node for the parent chain or rely on third-party RPC providers. +[Public Arbitrum RPC endpoints](/build-decentralized-apps/reference/01-node-providers.md#arbitrum-public-rpc-endpoints) rate-limit connections. To avoid hitting a bottleneck, you can run a local node for the parent chain or rely on third-party RPC providers. + +::: -::: +### 2. Child chain parameters -### 2. Child chain parameters In the Arbitrum Orbit context, the child chain is an L2 or an L3 Orbit chain, and the required parameters are `chain.info-json` and `chain.name` #### 1. `chain.info-json` -`--chain.info-json` is a JSON string that contains required information about the Orbit chain. +`--chain.info-json` is a JSON string that contains required information about the Orbit chain. ```shell --chain.info-json= @@ -52,25 +55,26 @@ An example of `chain.info-json` is available in the next section. `--chain.name` is a mandatory flag that needs to match the chain name used in `--chain.info-json`: + ```shell ---chain.name= +--chain.name= ``` #### 3. AnyTrust chains For Anytrust chains, you need to to add the following flags to the command or configuration: -```shell +```shell --node.data-availability.enable ``` -And: +And: -```shell +```shell --node.data-availability.rest-aggregator.urls= ``` -Or: +Or: ```shell --node.data-availability.rest-aggregator.online-url-list= @@ -78,30 +82,34 @@ Or: ### 3.Important ports -| Protocol | Port | -| ----------------- | ------ | -| `RPC`/`http` | `8547` | -| `RPC`/`websocket` | `8548` | -| `Sequencer Feed` | `9642` | + + | Protocol | Port | + |------------------|-------| + | `RPC`/`http` | `8547`| + | `RPC`/`websocket` | `8548`| + | `Sequencer Feed` | `9642`| -- Please note: the `RPC`/`websocket` protocol requires some ports to be enabled, you can use the following flags: - - `--ws.port=8548` - - `--ws.addr=0.0.0.0` - - `--ws.origins=\*` + * Please note: the `RPC`/`websocket` protocol requires some ports to be enabled, you can use the following flags: + - `--ws.port=8548` + - `--ws.addr=0.0.0.0` + - `--ws.origins=\*` + ### 4. Putting it all together - When running a Docker image, an external volume should be mounted to persist the database across restarts. The mount point inside the Docker image should be `/home/user/.arbitrum` + - Example: ```shell wordWrap=true docker run --rm -it -v /some/local/dir/arbitrum:/home/user/.arbitrum -p 0.0.0.0:8547:8547 -p 0.0.0.0:8548:8548 @latestNitroNodeImage@ --parent-chain.connection.url= --chain.id= --chain.name= --http.api=net,web3,eth --http.corsdomain=* --http.addr=0.0.0.0 --http.vhosts=* --chain.info-json= ``` - - Ensure that `/some/local/dir/arbitrum` already exists otherwise the directory might be created with `root` as owner, and the Docker container won't be able to write to it + - Ensure that `/some/local/dir/arbitrum` already exists otherwise the directory might be created with `root` as owner, and the Docker container won't be able to write to it + + - When using the flag `--chain.info-json=`, replace `` with the specific `chain info` JSON string of the Orbit chain for which you wish to run the node: - - When using the flag `--chain.info-json=`, replace `` with the specific `chain info` JSON string of the Orbit chain for which you wish to run the node: - Example: @@ -115,6 +123,7 @@ Or: docker stop --time=300 $(docker ps -aq) ``` + ### Note on permissions - The Docker image is configured to run as non-root `UID 1000`. If you are running Linux or macOS and you are getting permission errors when trying to run the Docker image, run this command to allow all users to update the persistent folders: @@ -122,7 +131,6 @@ Or: ```shell mkdir /data/arbitrum chmod -fR 777 /data/arbitrum - ``` ## Optional parameters diff --git a/arbitrum-docs/node-running/partials/_local-dev-node-setup-instructions.mdx b/arbitrum-docs/node-running/partials/_local-dev-node-setup-instructions.mdx index 638213f36e..04620eb783 100644 --- a/arbitrum-docs/node-running/partials/_local-dev-node-setup-instructions.mdx +++ b/arbitrum-docs/node-running/partials/_local-dev-node-setup-instructions.mdx @@ -50,35 +50,11 @@ docker exec nitro-testnode-sequencer-1 ls /config ## Token bridge - - - -
- {props.branch == 'release' && ( -
-

- An L1-L2 token bridge can be deployed by using the parameter `--tokenbridge`. The list of - contracts can be found by running: -

- - docker compose run --entrypoint sh tokenbridge -c "cat l1l2_network.json" - -
- )} -
+An L1-L2 token bridge can be deployed by using the parameter `--tokenbridge`. The list of contracts can be found by running: -
- {props.branch == 'stylus' && ( -
-

- An L1-L2 token bridge is deployed by default. The list of contracts can be found by running: -

- - docker compose run --entrypoint sh tokenbridge -c "cat localNetwork.json" - -
- )} -
+```bash +docker compose run --entrypoint sh tokenbridge -c "cat l1l2_network.json" +``` ## Running an L3 chain diff --git a/arbitrum-docs/run-arbitrum-node/02-quickstart.md b/arbitrum-docs/node-running/quickstart-running-a-node.md similarity index 94% rename from arbitrum-docs/run-arbitrum-node/02-quickstart.md rename to arbitrum-docs/node-running/quickstart-running-a-node.md index 57247e60b3..6e9688b3b6 100644 --- a/arbitrum-docs/run-arbitrum-node/02-quickstart.md +++ b/arbitrum-docs/node-running/quickstart-running-a-node.md @@ -37,19 +37,19 @@ When it comes to interacting with the Arbitrum network, users have the option to - Reduced trust requirements: By running a full node, users can interact with the Arbitrum network without relying on third-party services or infrastructure. This reduces the need to trust external entities and mitigates the risk of potential centralized failures or vulnerabilities. - Lower resource requirements: Compared to archive nodes, full nodes generally require fewer resources such as storage and computational power. This makes them more accessible to users with limited hardware capabilities or those operating on resource-constrained environments. -For detailed instructions on how to run an Arbitrum full node, see [here](/run-arbitrum-node/03-run-full-node.md). +For detailed instructions on how to run an Arbitrum full node, see [here](./how-tos/running-a-full-node.mdx). ### Considerations for running an Arbitrum archive node While full nodes offer numerous advantages, there are situations where running an archive node may be more appropriate. Archive nodes store the complete history of the Arbitrum network, making them suitable for users who require extensive historical data access or advanced analytical purposes. However, it's important to note that archive nodes are more resource-intensive, requiring significant storage capacity and computational power. -For detailed instructions on how to run an Arbitrum archive node, see [here](/node-running/how-tos/running-an-archive-node.mdx). +For detailed instructions on how to run an Arbitrum archive node, see [here](./how-tos/running-an-archive-node.mdx). ### Considerations for running an Arbitrum classic node -The significance of running an Arbitrum classic node is mainly applicable to individuals with specific needs for an archive node and access to classic-related commands. More details can be found [here](/node-running/how-tos/running-an-archive-node.mdx). +The significance of running an Arbitrum classic node is mainly applicable to individuals with specific needs for an archive node and access to classic-related commands. More details can be found [here](./how-tos/running-an-archive-node.mdx). -For detailed instructions on how to run an Arbitrum classic node, see [here](/node-running/how-tos/running-a-classic-node.mdx). +For detailed instructions on how to run an Arbitrum classic node, see [here](./how-tos/running-a-classic-node.mdx). ### Considerations for running a feed relay @@ -57,4 +57,4 @@ If you are running a single node, there is no requirement to set up a feed relay In the near future, feed endpoints will mandate compression using a custom dictionary. Therefore, if you plan to connect to a feed using anything other than a standard node, it is strongly advised to run a local feed relay. This will ensure that you have access to an uncompressed feed by default, maintaining optimal performance and compatibility. -For detailed instructions on how to run a feed relay, see [here](/node-running/how-tos/running-a-feed-relay.mdx). +For detailed instructions on how to run a feed relay, see [here](./how-tos/running-a-feed-relay.mdx). diff --git a/arbitrum-docs/run-arbitrum-node/arbos-releases/arbos11.md b/arbitrum-docs/node-running/reference/arbos-software-releases/arbos11.mdx similarity index 70% rename from arbitrum-docs/run-arbitrum-node/arbos-releases/arbos11.md rename to arbitrum-docs/node-running/reference/arbos-software-releases/arbos11.mdx index 13226590fa..8cadff74a1 100644 --- a/arbitrum-docs/run-arbitrum-node/arbos-releases/arbos11.md +++ b/arbitrum-docs/node-running/reference/arbos-software-releases/arbos11.mdx @@ -17,12 +17,8 @@ Formal release notes can be found [here](https://github.com/OffchainLabs/nitro/r ### High-level description of ArbOS 11 changes -- Addition of all EVM changes made on L1 Ethereum as part of the [Shanghai upgrade](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md#included-eips). This includes: - - [EIP-3651: Warm COINBASE](https://eips.ethereum.org/EIPS/eip-3651) - - [EIP-3855: PUSH0 instruction](https://eips.ethereum.org/EIPS/eip-3855) - - [EIP-3860: Limit and meter initcode](https://eips.ethereum.org/EIPS/eip-3860) - - [EIP-6049: Deprecate SELFDESTRUCT](https://eips.ethereum.org/EIPS/eip-6049) -- Improvements and fixes for [retryable tickets](/arbos/l1-to-l2-messaging.mdx) to ensure that the fee calculation to redeem retryable tickets will take into account both the infrastructure fee and the network fee. The infrastructure fee is the minimum L2 base fee only, while the network fee collects L2 congestion charges. This is important for [AnyTrust chains](/inside-anytrust.mdx) like Arbitrum Nova because members of the Data Availability Committee (DAC) gets paid a percentage of the infrastructure fee but not the network fee. Previously, the calculations to determine the fee for redeeming retryable tickets did not consider the infrastructure fee. +- Addition of EVM changes made on L1 Ethereum as part of the [Shanghai upgrade](https://ethereum.org/history#shanghai), including support for the `PUSH0` opcode. +- Improvements and fixes for [retryable tickets](../../../arbos/l1-to-l2-messaging.mdx) to ensure that the fee calculation to redeem retryable tickets will take into account both the infrastructure fee and the network fee. The infrastructure fee is the minimum L2 base fee only, while the network fee collects L2 congestion charges. This is important for [AnyTrust chains](../../../inside-anytrust.mdx) like Arbitrum Nova because members of the Data Availability Committee (DAC) gets paid a percentage of the infrastructure fee but not the network fee. Previously, the calculations to determine the fee for redeeming retryable tickets did not consider the infrastructure fee. - Fixes an issue where the [`ArbOwnerPublic` precompile](/build-decentralized-apps/precompiles/02-reference.md#arbownerpublic) returned the incorrect list of chain owners. This does not change the parties who are able to perform chain owner actions. As intended, only the Arbitrum DAO is able to take chain owner actions for Arbitrum One and Nova. - Resolves an issue where the [`arbBlockHash` method](/build-decentralized-apps/precompiles/02-reference.md#arbsys) would take up all the gas when reverting. The previous incorrect behavior meant that if a transaction calls `arbBlockHash` with an out-of-range block number, then the transaction would consume all the gas when reverting. - Addition of the [`L1RewardReceipient`](/build-decentralized-apps/precompiles/02-reference.md#arbgasinfo) and [`L1RewardRate`](/build-decentralized-apps/precompiles/02-reference.md#arbgasinfo) precompile methods to view L1 pricing parameters and make it easier to view the current chain configuration. diff --git a/arbitrum-docs/run-arbitrum-node/arbos-releases/arbos20.md b/arbitrum-docs/node-running/reference/arbos-software-releases/arbos20.mdx similarity index 92% rename from arbitrum-docs/run-arbitrum-node/arbos-releases/arbos20.md rename to arbitrum-docs/node-running/reference/arbos-software-releases/arbos20.mdx index 8ccfab232e..27e3be175b 100644 --- a/arbitrum-docs/run-arbitrum-node/arbos-releases/arbos20.md +++ b/arbitrum-docs/node-running/reference/arbos-software-releases/arbos20.mdx @@ -12,7 +12,7 @@ ArbOS 20 Atlas is shipped via Nitro v2.3.1, which is available on Docker hub wit - [Nitro v2.3.1](https://github.com/OffchainLabs/nitro/releases/tag/v2.3.1) or higher - [nitro-contracts v1.2.1](https://github.com/OffchainLabs/nitro-contracts/releases/tag/v1.2.1) or higher - Wasm module root: `0x8b104a2e80ac6165dc58b9048de12f301d70b02a0ab51396c22b4b4b802a16a4` -- Access to the [Ethereum Beacon Chain APIs](https://ethereum.github.io/beacon-APIs/#/), either from your own self-managed L1 Ethereum node or from a 3rd party provider like [those on this list](/run-arbitrum-node/05-l1-ethereum-beacon-chain-rpc-providers.md). +- Access to the [Ethereum Beacon Chain APIs](https://ethereum.github.io/beacon-APIs/#/), either from your own self-managed L1 Ethereum node or from a 3rd party provider like [those on this list](../ethereum-beacon-rpc-providers.mdx). ### High-level description of ArbOS 20 changes @@ -28,15 +28,13 @@ ArbOS 20 is an upgrade to enable Arbitrum's support for L1 Ethereum's [Dencun up ### Special notes on ArbOS 20: Atlas support for EIP-4844 -- Upgrading to **the Atlas ArbOS release will require access to L1 Ethereum beacon chain endpoints to retrieve blob data. For nodes of a chain that come online 18 days after Atlas gets activated on their chain will need access to historical data to sync up to the latest state.** If you are not operating your own Ethereum consensus client, [please visit this page to view a list of beacon chain RPC providers](/run-arbitrum-node/05-l1-ethereum-beacon-chain-rpc-providers.md) where you can access blob data. +- Upgrading to **the Atlas ArbOS release will require access to L1 Ethereum beacon chain endpoints to retrieve blob data. For nodes of a chain that come online 18 days after Atlas gets activated on their chain will need access to historical data to sync up to the latest state.** If you are not operating your own Ethereum consensus client, [please visit this page to view a list of beacon chain RPC providers](../ethereum-beacon-rpc-providers.mdx) where you can access blob data. - Applications on Arbitrum will not have to be modified or take any explicit action to get the benefits of using EIP-4844 (i.e. the whole chain opts-in with ArbOS 20 “Atlas”). - ArbOS 20 “Atlas” adds support for Arbitrum chains to send data in a blob storage format to data availability layers, like L1 Ethereum, that support the blob transaction type. This includes Arbitrum One and Arbitrum Nova. ArbOS 20 “Atlas” does not add support for Arbitrum chains to receive data in a blob storage format. This means that an L3 Orbit chain on top of an Arbitrum L2 will use calldata when posting L3 transaction data to the underlying L2. The L2 Arbitrum chain will then be able to post data to a L1 data availability layer like Ethereum using blobs. - There currently aren’t estimates on what the end-user gas savings of using blob data will be. This topic is something being actively worked on and monitored. Without Mainnet data, the estimates for blob gas prices will not be accurate enough to reliably predict the cost reductions that users will experience - and even with Mainnet data, the savings will vary by use case (i.e. no current way to predict the price impacts from all blob gas market participants yet). In general, however, the use of blobs will reduce the cost of using Arbitrum L2s. To learn more about what EIP-4844 will mean for L2 users, please checkout this [blog post on Medium by Offchain Lab's Co-foudner and Chief Scientist Ed Felten](https://medium.com/offchainlabs/eip-4844-what-does-it-mean-for-l2-users-5e86ebc4c028). ### Block explorers - -Below is a non-comprehensive list of explorers that support querying and viewing blob data on Ethereum that get posted by Arbitrum L2 chains. - +Below is a non-comprehensive list of explorers that support querying and viewing blob data on Ethereum that get posted by Arbitrum L2 chains. - [Blockscout](https://www.blockscout.com/). For self-deployment, blobs are supported as of blockscout v6.2.0 and blockscout-frontend v1.2.6. - [Arbiscan](https://arbiscan.io/) - [Blobscan](https://blobscan.com/) @@ -44,10 +42,10 @@ Below is a non-comprehensive list of explorers that support querying and viewing ### Additional requirement for Arbitrum Orbit L2 chain operators: enabling blob batch posting -This section maps to [Step 4 in the guide on _How to upgrade ArbOS on your Arbitrum Orbit L2 chain_](/launch-orbit-chain/how-tos/arbos-upgrade.md#step-4-enable-arbos-specific-configurations-or-feature-flags-not-always-required) and contains additional instructions for Arbitrum Orbit L2 chain operators for ArbOS 20 Atlas. Specifically, the details below are meant to help Arbitrum Orbit L2 chain operators enable blob batch posting to L1 Ethereum following their successful upgrade to the ArbOS 20 Atlas release. +This section maps to [Step 4 in the guide on _How to upgrade ArbOS on your Arbitrum Orbit L2 chain_](../../../launch-orbit-chain/how-tos/arbos-upgrade.md#step-4-enable-arbos-specific-configurations-or-feature-flags-not-always-required) and contains additional instructions for Arbitrum Orbit L2 chain operators for ArbOS 20 Atlas. Specifically, the details below are meant to help Arbitrum Orbit L2 chain operators enable blob batch posting to L1 Ethereum following their successful upgrade to the ArbOS 20 Atlas release. :::caution -Before proceeding, make sure you have successfully completed Steps 1 through 3 of the guide on [How to upgrade ArbOS on your Orbit chain](/launch-orbit-chain/how-tos/arbos-upgrade.md). +Before proceeding, make sure you have successfully completed Steps 1 through 3 of the guide on [How to upgrade ArbOS on your Orbit chain](../../../launch-orbit-chain/how-tos/arbos-upgrade.md). ::: To enable the posting of transaction data in Blobs to L1 Ethereum, you must set `node.batch-poster.post-4844-blobs=true` on the batch poster. diff --git a/arbitrum-docs/run-arbitrum-node/arbos-releases/01-overview.md b/arbitrum-docs/node-running/reference/arbos-software-releases/overview.mdx similarity index 77% rename from arbitrum-docs/run-arbitrum-node/arbos-releases/01-overview.md rename to arbitrum-docs/node-running/reference/arbos-software-releases/overview.mdx index 80af41f2e6..1cf2f868fa 100644 --- a/arbitrum-docs/run-arbitrum-node/arbos-releases/01-overview.md +++ b/arbitrum-docs/node-running/reference/arbos-software-releases/overview.mdx @@ -17,24 +17,24 @@ Although Nitro is updated regularly, only a subset of Nitro releases carry ArbOS Note that every Nitro release is backwards compatible. In other words, the latest version of Nitro will support all previous ArbOS releases. This means that your validator's Nitro version must be greater than or equal to the version that includes the latest ArbOS upgrade. -import PublicPreviewBannerPartial from '../../node-running/partials/_upgrade-cadence-recommendations-partial.mdx'; +import PublicPreviewBannerPartial from "../../partials/_upgrade-cadence-recommendations-partial.mdx"; ArbOS upgrades are carried out by the chain's owner; in the case of Arbitrum One and Nova, the owner is the Arbitrum DAO and so an upgrade will require a governance proposal and vote to pass to complete the upgrade. [This is an example of a Nitro release that contains an ArbOS version bump, specifically to ArbOS 11](https://github.com/OffchainLabs/nitro/releases/tag/v2.2.0). -Visit [Inside Arbitrum Nitro](/inside-arbitrum-nitro/inside-arbitrum-nitro.mdx) to learn more about Nitro's architecture; more information about ArbOS software releases is available on [the Arbitrum DAO forum](https://forum.arbitrum.foundation/t/arbitrum-arbos-upgrades/19695). +Visit [Inside Arbitrum Nitro](../../../inside-arbitrum-nitro/inside-arbitrum-nitro.mdx) to learn more about Nitro's architecture; more information about ArbOS software releases is available on [the Arbitrum DAO forum](https://forum.arbitrum.foundation/t/arbitrum-arbos-upgrades/19695). ## List of available ArbOS releases -- [ArbOS 20 "Atlas"](/run-arbitrum-node/arbos-releases/arbos20.md) -- [ArbOS 11](/run-arbitrum-node/arbos-releases/arbos11.md) +- [ArbOS 20 "Atlas"](arbos20.mdx) +- [ArbOS 11](arbos11.mdx) ## Naming and numbering scheme Beginning with ArbOS 20, ArbOS releases use the name of planetary moons in our solar system, ascending in alphabetical order (i.e. the next ArbOS upgrade after ArbOS 20 "Atlas" will be a planetary moon that begins with the letter "B"). -The number used to denote each upgrade will increment by 10, starting from ArbOS 20 (i.e. the next ArbOS upgrade after ArbOS 20 will be ArbOS 30). This was done because there are teams who have customized their Orbit chain's [behavior](/launch-orbit-chain/how-tos/customize-stf.mdx) or [precompiles](/launch-orbit-chain/how-tos/customize-precompile.mdx) and who may wish to use ArbOS's naming schema between official ArbOS version bumps (e.g. ArbOS 12 could be the name of a customized version of ArbOS for a project's L3 Orbit chain). +The number used to denote each upgrade will increment by 10, starting from ArbOS 20 (i.e. the next ArbOS upgrade after ArbOS 20 will be ArbOS 30). This was done because there are teams who have customized their Orbit chain's [behavior](../../../launch-orbit-chain/how-tos/customize-stf.mdx) or [precompiles](../../../launch-orbit-chain/how-tos/customize-precompile.mdx) and who may wish to use ArbOS's naming schema between official ArbOS version bumps (e.g. ArbOS 12 could be the name of a customized version of ArbOS for a project's L3 Orbit chain). ## Network status diff --git a/arbitrum-docs/run-arbitrum-node/05-l1-ethereum-beacon-chain-rpc-providers.md b/arbitrum-docs/node-running/reference/ethereum-beacon-rpc-providers.mdx similarity index 53% rename from arbitrum-docs/run-arbitrum-node/05-l1-ethereum-beacon-chain-rpc-providers.md rename to arbitrum-docs/node-running/reference/ethereum-beacon-rpc-providers.mdx index 01acc5722a..c063fa2010 100644 --- a/arbitrum-docs/run-arbitrum-node/05-l1-ethereum-beacon-chain-rpc-providers.md +++ b/arbitrum-docs/node-running/reference/ethereum-beacon-rpc-providers.mdx @@ -3,7 +3,7 @@ title: 'L1 Ethereum beacon chain RPC providers' author: dlee --- -import PublicPreviewBannerPartial from '../partials/_public-preview-banner-partial.md'; +import PublicPreviewBannerPartial from '../../partials/_public-preview-banner-partial.md'; @@ -13,27 +13,27 @@ This reference document provides an overview of Ethereum beacon chain RPC provid Following [Ethereum's Dencun upgrade in March 2024](https://eips.ethereum.org/EIPS/eip-7569), Layer 2 blockchains like Arbitrum will be able to roll up and post batches of transaction data on Ethereum in the form of a new transaction format called a Blob. This Blob data will be part of the beacon chain and is fully downloadable by all consensus nodes. This means that data stored in blobs are inaccessible by the EVM, unlike Calldata. -### What does this mean for node operators? +### What does this mean for validators? -To run a node for an L2 Arbitrum chain (i.e. Arbitrum One, Arbitrum Nova, and L2 Orbit chains), your node will need access to blob data to sync up to the latest state of your Arbitrum L2 chain. Blob data on Ethereum is stored on the beacon chain and is inaccessible to the EVM, hence why dedicated RPC endpoints for the beacon chain will be required after the Dencun upgrade. You can find more details on node requirements in the [Run a full node guide](/run-arbitrum-node/03-run-full-node.md). +Validators for Arbitrum chains posting data to L1 Ethereum (i.e. Arbitrum One, Arbitrum Nova, and L2 Orbit chains) will require access to blob data to produce and confirm L2 state assertions (read more about how this works on our [Deep dive: Inside Arbitrum"](../../inside-arbitrum-nitro/inside-arbitrum-nitro.mdx) page). -Furthermore, new node operators joining a network or node operators who come online following an extended period of offline time will require access to _historical_ blob data to sync up to the latest state of their Arbitrum chain. +Furthermore, new validators joining a network or validators who come online following an extended period of offline time will require access to historical blob data to sync up to the latest state of Arbitrum. Offchain Labs has plans to reduce a Nitro validator's reliance on historical blob data and will share updates on this effort in the future. -Offchain Labs has plans to reduce a Nitro validator's reliance on historical blob data and will share updates on this effort in the future. +To run a validator for an L2 Arbitrum chain (i.e. Arbitrum One, Arbitrum Nova, and L2 Orbit chains), you will need access to blob data. Blob data on Ethereum is stored on the beacon chain and is inaccessible to the EVM, hence why dedicated RPC endpoints for the beacon chain will be required after the Dencun upgrade. ### List of Ethereum beacon chain RPC providers | Provider | Beacon chain APIs? | Historical blob data? | | --------------------------------------------------------------------------- | ------------------ | --------------------- | -| [Ankr](https://www.ankr.com/docs/rpc-service/chains/chains-api/eth-beacon/) | ✅ | ✅ | -| [Bware Labs](https://bwarelabs.com/blockchain-api) | ✅ | ✅ | -| [Chainbase](https://chainbase.com/) | ✅ | | -| [Chainstack](https://docs.chainstack.com/reference/beacon-chain) | ✅ | | -| [Conduit](https://conduit.xyz/)\* | ✅ | ✅ | -| [Lava Network](https://docs.lavanet.xyz/gateway-access) | ✅ | ✅ | -| [Nirvana Labs](https://nirvanalabs.io) | ✅ | ✅ | -| [NodeReal](https://nodereal.io/) | ✅ | | -| [Quicknode](https://www.quicknode.com/docs/ethereum) | ✅ | ✅ | +| [Ankr](https://www.ankr.com/docs/rpc-service/chains/chains-api/eth-beacon/) | ✅ | ✅ | +| [Bware Labs](https://bwarelabs.com/blockchain-api) | ✅ | ✅ | +| [Chainbase](https://chainbase.com/) | ✅ | | +| [Chainstack](https://docs.chainstack.com/reference/beacon-chain) | ✅ | ✅ | +| [Conduit](https://conduit.xyz/)\* | ✅ | ✅ | +| [Lava Network](https://docs.lavanet.xyz/gateway-access) | ✅ | ✅ | +| [Nirvana Labs](https://nirvanalabs.io) | ✅ | ✅ | +| [NodeReal](https://nodereal.io/) | ✅ | | +| [Quicknode](https://www.quicknode.com/docs/ethereum) | ✅ | ✅ | Please reach out to these teams individually if you need assistance with setting up your validator with any of the above providers. diff --git a/arbitrum-docs/node-running/troubleshooting-running-nodes.md b/arbitrum-docs/node-running/troubleshooting-running-nodes.md index 97b22d1b2e..47df4bc363 100644 --- a/arbitrum-docs/node-running/troubleshooting-running-nodes.md +++ b/arbitrum-docs/node-running/troubleshooting-running-nodes.md @@ -74,7 +74,10 @@ If you're running into unexpected outputs or errors, the following checklist may

- The How to run a full node (Nitro){' '} + The{' '} + + How to run a full node (Nitro) + {' '} may address your issue.

@@ -88,20 +91,25 @@ If you're running into unexpected outputs or errors, the following checklist may

- The How to run a full node (Nitro){' '} + The{' '} + + How to run a full node (Nitro) + {' '} may address your issue.

- The How to run a full node (Nitro){' '} + The{' '} + + How to run a full node (Nitro) + {' '} may address your issue.

- The{' '} - How to run a local dev node{' '} + The How to run a local dev node{' '} may address your issue.

diff --git a/arbitrum-docs/partials/_contribute-docs-partial.md b/arbitrum-docs/partials/_contribute-docs-partial.md index 7a270af1b4..64c6314ac7 100644 --- a/arbitrum-docs/partials/_contribute-docs-partial.md +++ b/arbitrum-docs/partials/_contribute-docs-partial.md @@ -1,4 +1,4 @@ -import PublicPreviewBannerPartial from '../partials/_public-preview-banner-partial.md'; +import PublicPreviewBannerPartial from '../partials/\_public-preview-banner-partial.md'; @@ -114,7 +114,7 @@ Every document should be a specific _type_ of document. Each type of document ha | ------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Gentle introduction | Onboard a specific reader audience with tailored questions and answers | [A gentle introduction to Orbit](/launch-orbit-chain/orbit-gentle-introduction.md) | | Quickstart | Onboard a specific reader audience with step-by-step "learn by doing" instructions | [Quickstart: Build dApps](/build-decentralized-apps/01-quickstart-solidity-hardhat.md) | -| How-to | Provide task-oriented procedural guidance | [How to run a local dev node](/run-arbitrum-node/04-run-local-dev-node.md) | +| How-to | Provide task-oriented procedural guidance | [How to run a local dev node](../node-running/how-tos/local-dev-node.mdx) | | Concept | Explain what things are and how they work | [Token bridging](/build-decentralized-apps/token-bridging/03-token-bridge-erc20.md)
[Nodes and networks](https://docs.prylabs.network/docs/concepts/nodes-networks) | | FAQ | Address frequently asked questions | [FAQ: Run a node](../node-running/faq.md) | | Troubleshooting | List common troubleshooting scenarios and solutions | [Troubleshooting: Run a node](../node-running/troubleshooting-running-nodes.md) | diff --git a/arbitrum-docs/partials/_troubleshooting-bridging-partial.md b/arbitrum-docs/partials/_troubleshooting-bridging-partial.md index b17e175a16..c86f4030a4 100644 --- a/arbitrum-docs/partials/_troubleshooting-bridging-partial.md +++ b/arbitrum-docs/partials/_troubleshooting-bridging-partial.md @@ -1,10 +1,11 @@ -### How do I move assets between One and Nova? +### How do I move assets between One and Nova? {#how-do-i-move-assets-between-one-and-nova}

Both Arbitrum One and Arbitrum Nova run as layers on top of Ethereum. Thus, you can always move assets between the two chains in two steps by going "through" Ethereum. In other words: withdraw your assets from Arbitrum One to Ethereum and then deposit them onto Nova, or conversely, withdraw your assets from Nova on to Ethereum and then deposit them on to Arbitrum One. These steps can all be done at https://bridge.arbitrum.io/.

-### What fees do I have to pay when bridging funds from L1 to L2? + +### What fees do I have to pay when bridging funds from L1 to L2? {#what-fees-do-i-have-to-pay-when-bridging-funds-from-l1-to-l2}

When bridging over tokens from L1 to L2, you will have to sign one or two transactions with their corresponding fees:

  1. If you are bridging a token for the first time, you'll sign one approval transaction.
  2. @@ -21,29 +22,32 @@

    -### How long does it take before I receive my funds when I initiate a withdrawal from Arbitrum chains (One and Nova)? -

    Using the official Arbitrum Bridge, the process will take roughly one week. However, some users opt to use third-party fast bridges, which often bypass this delay (remember that these bridges are created and maintained by third parties, so please DYOR!).

    + +### How long does it take before I receive my funds when I initiate withdrawal from Arbitrum chains (One and Nova)? {#how-long-does-it-take-before-i-receive-my-funds-when-i-initiate-withdrawal-from-arbitrum-chains-one-and-nova} +

    Using the official Arbitrum Bridge, the process will typically take roughly one week. However, some users opt to use third party fast bridges, which often bypass this delay (remember that third party bridges are created by third parties, so please DYOR!).

    There's some variability in the exact wall-clock time of the dispute window, plus there's some expected additional "padding" time on both ends (no more than about an hour, typically).

    -

    The variability of the dispute window comes from the slight variance of block times. Arbitrum One's dispute window is 45818 blocks; this converts to about 6.5 days, assuming slightly more than 12 seconds per block, the average block time of Ethereum.

    +

    The variability of the dispute window comes from the slight variance of block times. Arbitrum One's dispute window is 45818 blocks; this converts to ~1 week assuming 13.2 seconds per block, which was the average block time when Ethereum used Proof of Work (with the switch to Proof of Stake, average block times are about 12 seconds).

    -

    The "padding on both ends" involves three events that have to occur between a client receiving their transaction receipt from the sequencer and their L2-to-L1 message being executable. After getting their receipt,

    +

    The "padding on both ends" involves three events that have to occur between a client receiving their transaction receipt from a Sequencer and their L2-to-L1 message being executable. After getting their receipt,

    -
    1. The sequencer posts their transaction in a batch (usually within a few minutes, though the sequencer will wait a bit longer if the L1 is congested). Then,
    2. +
      1. The Sequencer posts their transaction in a batch (usually within a few minutes, though the Sequencer will wait a bit longer if the L1 is congested). Then,
      2. A validator includes their transaction in an RBlock (usually within the hour). Then, after the ~week long dispute window passes, the RBlock is confirmable, and
      3. Somebody (anybody) confirms the RBlock on L1 (usually within ~15 minutes).

      Additionally, in the rare and unlikely event of a dispute, this delay period will be extended for the dispute to resolve.

      -### Is there a way to cancel a withdrawal from Arbitrum? + +### Is there a way to cancel a withdrawal from Arbitrum? {#is-there-a-way-to-cancel-a-withdrawal-from-arbitrum}

      There is no way to cancel a withdrawal that has been already initiated. However, you can claim your funds on L1 and deposit them again on L2 once the withdrawal period is past.

      -### Can I use a smart contract wallet in the bridge? + +### Can I use a smart contract wallet in the bridge? {#can-i-use-a-smart-contract-wallet-in-the-bridge}

      Support for Smart Contract Wallets is currently limited to token depositing and withdrawal. Keep in mind that when withdrawing funds, you won't be able to claim them on L1 using the bridge (unless you also control that address on L1). In that case, you can use the cross-chain dashboard to claim your funds on L1.

      ETH deposits and withdrawals using a Smart Contract Wallet are currently not supported, but will soon be available.

      @@ -51,8 +55,11 @@

      -### How can I claim withdrawn funds if I don't control on L1 the address that initiated the transaction on L2? + +### How can I claim withdrawn funds if I don't control on L1 the address that initiated the transaction on L2? {#how-can-i-claim-withdrawn-funds-if-i-dont-control-on-l1-the-address-that-initiated-the-transaction-on-l2}

      Once the withdrawal period is past, you can use the cross-chain dashboard to execute the message on L1. Paste the transaction hash that initiated the withdrawal on L2, and follow the process described in the dashboard.

      + + diff --git a/arbitrum-docs/partials/_troubleshooting-building-partial.md b/arbitrum-docs/partials/_troubleshooting-building-partial.md index c4a4a4ac50..cd6732ec2e 100644 --- a/arbitrum-docs/partials/_troubleshooting-building-partial.md +++ b/arbitrum-docs/partials/_troubleshooting-building-partial.md @@ -1,4 +1,4 @@ -### How does gas work on Arbitrum? +### How does gas work on Arbitrum? {#how-does-gas-work-on-arbitrum}

      Fees on Arbitrum chains are collected on L2 in the chains' native currency (ETH on both Arbitrum One and Nova).

      A transaction fee is comprised of both an L1 and an L2 component:

      @@ -12,10 +12,11 @@

      -### I tried to create a retryable ticket but the transaction reverted on L1. How can I debug the issue? + +### I tried to create a retryable ticket but the transaction reverted on L1. How can I debug the issue? {#i-tried-to-create-a-retryable-ticket-but-the-transaction-reverted-on-l1--how-can-i-debug-the-issue}

      Creation of retryable tickets can revert with one of these custom errors:

      -
      1. InsufficientValue: not enough gas included in your L1 transaction's callvalue to cover the total cost of your retryable ticket; i.e., msg.value < (maxSubmissionCost + l2CallValue + gasLimit * maxFeePerGas). Note that your L1 transaction's callvalue must cover this full cost. See Retryable Tickets Lifecycle for more information.
      2. +
        1. InsufficientValue: not enough gas included in your L1 transaction's callvalue to cover the total cost of your retryable ticket; i.e., msg.value < (maxSubmissionCost + l2CallValue + gasLimit * maxFeePerGas). Note that as of the Nitro upgrade, your L1 transaction's callvalue must cover this full cost (previously an L2 message's execution could be paid for with funds on L2: see dapp migration and "retryable ticket creation".
        2. InsufficientSubmissionCost: provided submission cost isn't high enough to create your retryable ticket.
        3. GasLimitTooLarge: provided gas limit is greater than 2^64
        4. DataTooLarge: provided data is greater than 117.964 KB (90% of Geth's 128 KB transaction size limit).
        5. @@ -24,60 +25,72 @@

          To figure out which error caused your transaction to revert, we recommend using etherscan's Parity VM trace support (Tenderly is generally a very useful debugging tool; however, it can be buggy when it comes to custom Geth errors).

          -

          Use the following link to view the Parity VM trace of your failed transaction (replacing the tx-hash with your own, and using the appropriate etherscan root url):

          - -

          https://etherscan.io/vmtrace?txhash=0x51a8088c9b319bbad649c36d9cf2b4e9b61a6099a158181676c8e79dbce2df58&type=parity#raw

          +

          Use the following link to view the Parity VM trace of your failed transaction (replacing the tx-hash with your own, and using the appropriate etherscan root url):
          +
          +https://goerli.etherscan.io/vmtrace?txhash=0x382bfef03a7f1185a91582b49837740473591fb8715ce7f15e389f1ade630b09&type=parity#raw

          -

          To find out the reversion error signature, go to the "Raw Traces" tab, and scroll down to find the last "subtrace" in which your transaction is reverted. Then find "output" field of that subtrace.

          +


          +To find out the reversion error signature, go to the "Raw Traces" tab, and scroll down to find the last "subtrace" in which your transaction is reverted. Then find "output" field of that subtrace.

          (In the above example the desirable "output" is:
          -{'0xfadf238a0000000000000000000000000000000000000000000000000000c4df7e2903b00000000000000000000000000000000000000000000000000000a39a1d002808'})

          +{'0x7040b58c0000000000000000000000000000000000000000000000000001476b081e80000000000000000000000000000000000000000000000000000000000000000000'} )

          -

          The first four bytes of the output is the custom error signature; in our example it's 0xfadf238a .

          +

          The first four bytes of the output is the custom error signature; in our example it's 0x7040b58c .


          To let's find out which is custom error this signature represents, we can use this handy tool by Samzcsun: https://sig.eth.samczsun.com/

          -

          Checking 0xfadf238a gives us InsufficientSubmissionCost(uint256,uint256).
          +

          Checking 0x7040b58c gives us InsufficientValue(uint256,uint256).

          -### How is the L1 portion of an Arbitrum transaction's gas fee computed? + +### How is the L1 portion of an Arbitrum transaction's gas fee computed? {#how-is-the-l1-portion-of-an-arbitrum-transactions-gas-fee-computed-}

          The L1 fee that a transaction is required to pay is determined by compressing its data with brotli and multiplying the size of the result (in bytes) by ArbOS's current calldata price; the latter value can be queried via the getPricesInWeimethod of the ArbGasInfoprecompile. You can find more information about gas calculations in Understanding Arbitrum: 2-Dimensional Fees and How to estimate gas in Arbitrum.

          -### What is a retryable ticket's "submission fee"? How can I calculate it? What happens if I the fee I provide is insufficient? + +### What is a retryable ticket's "submission fee"? How can I calculate it? What happens if I the fee I provide is insufficient? {#what-is-a-retryable-tickets-submission-fee-how-can-i-calculate-it-what-happens-if-i-the-fee-i-provide-is-insufficient}

          retryable's submission fee is a special fee a user must pay to create a retryable ticket. The fee is directly proportional to the size of the L1 calldata the retryable ticket uses. The fee can be queried using the Inbox.calculateRetryableSubmissionFeemethod. If insufficient fee is provided, the transaction will revert on L1, and the ticket won't get created.

          -### Which method in the Inbox contract should I use to submit a retryable ticket (aka L1 to L2 message)? + +### Which method in the Inbox contract should I use to submit a retryable ticket (aka L1 to L2 message)? {#which-method-in-the-inbox-contract-should-i-use-to-submit-a-retryable-ticket-aka-l1-to-l2-message}

          The method you should (almost certainly) use is Inbox.createRetryableTicket. There is an alternative method, Inbox.unsafeCreateRetryableTicket, which, as the name suggests, should only be used by those who fully understand its implications.

          There are two differences between createRetryableTicket and unsafeCreateRetryableTicket:

          -
          1. Method createRetryableTicket will check that provided L1 callvalue is sufficient to cover the costs of creating and executing the retryable ticket (at the specified parameters) and otherwise revert directly at L1unsafeCreateRetryableTicket, in contrast, will allow a retryable ticket to be created that is guaranteed to revert on L2.
          2. -
          3. Method createRetryableTicket will check if either the provided excessFeeRefundAddress or the callValueRefundAddress are contracts on L1; if they are, to prevent the situation where refunds are guaranteed to be irrecoverable on L2, it will convert them to their address alias, providing a potential path for fund recovery. unsafeCreateRetryableTicket will allow the creation of a retryable ticket with refund addresses that are L1 contracts; since no L1 contract can alias to an address that is also itself an L1 contract, refunds to these addresses on L2 will be irrecoverable.
          4. +
            1. {'createRetryableTicket'} will check that provided L1 callvalue is sufficient to cover the costs of creating and executing the retryable ticket (at the specified parameters) and otherwise revert directly at L1 [TODO: link to "retryable reverts at L1" faq]. unsafeCreateRetryableTicket, in contrast, will allow a retryable ticket to be created that is guaranteed to revert on L2.
            2. +
            3. {'createRetryableTicket'} will check if either the provided excessFeeRefundAddress or the callValueRefundAddress are contracts on L1; if they are, to prevent the situation where refunds are guaranteed to be irrecoverable on L2, it will convert them to their address alias, providing a potential path for fund recovery. unsafeCreateRetryableTicket will allow the creation of a retryable ticket with refund addresses that are L1 contracts; since no L1 contract can alias to an address that is also itself an L1 contract, refunds to these addresses on L2 will be irrecoverable.

            (Astute observers may note a third ticket creation method, createRetryableTicketNoRefundAliasRewrite; this is included only for backwards compatibility, but should be considered deprecated in favor of unsafeCreateRetryableTicket)

            -### Why do I get "custom tx type" errors when I use hardhat? + +### Why do I get "custom tx type" errors when I use hardhat? {#why-do-i-get-custom-tx-type-errors-when-i-use-hardhat}

            In Arbitrum, we use a number of non-standard EIP-2718 typed transactions. See here for the full list and the rationale.

            -

            Note that if you're using Hardhat, v2.12.2 added support for forking networks like Arbitrum with custom transaction types (find more information here).

            +

            Hardhat v2.12.2 added supports for forking networks like Arbitrum with custom transaction types, so if you're using hardhat, upgrade to 2.12.2!

            +

            References

            -### Why does it look like two identical transactions consume a different amount of gas? + +

            + + + +### Why does it look like two identical transactions consume a different amount of gas? {#why-does-it-look-like-two-identical-transactions-consume-a-different-amount-of-gas}

            Calling an Arbitrum node's eth_estimateGas RPC returns a value sufficient to cover both the L1 and L2 components of the fee for the current gas price; this is the value that, e.g., will appear in users' wallets in the "gas limit" field.

            @@ -91,13 +104,15 @@ To let's find out which is custom error this signature represents, we can use th

            -### Why am I getting error "429 Too Many Requests" when using one of Offchain Labs' Public RPCs? + +### Why am I getting error "429 Too Many Requests" when using one of Offchain Labs' Public RPCs? {#why-am-i-getting-error-429-too-many-requests-when-using-one-of-offchain-labs-public-rpcs}

            Offchain Labs offers public RPCs for free, but limits requests to prevent DOSing. Hitting the rate limit could come from your request frequency and/or the resources required to process the requests. If you are hitting our rate limit, we recommend running your own node or using a third party node provider.

            -### How do block.number and block.timestamp work on Arbitrum? + +### How do block.number and block.timestamp work on Arbitrum? {#how-do-blocknumber-and-blocktimestamp-work-on-arbitrum}

            Solidity calls to block.number on Arbitrum will return the block number/ timestamp of the underlying L1 on a slight delay; i.e., updated every few minutes. Note that L2 block numbers (i.e., as seen in block explorers / returned by RPCs) are different, and are typically updated roughly every second.

            Solidity calls to block.timestamp on Arbitrum are not linked to the timestamp of the L1 block. It is updated every L2 block based on the sequencer's clock. Furthermore, for transactions that are force-included from L1 (bypassing the Sequencer) block.timestamp will be equal to the L1 timestamp when the transaction was put in the delayed inbox on L1 (not force-included), or the L2 timestamp of the previous L2 block (whichever is greater of the two timestamps).

            @@ -107,17 +122,19 @@ To let's find out which is custom error this signature represents, we can use th

            -### Do I need to download any special npm libraries in order to use web3.js, ethers.js or viem on Arbitrum? -

            Nope, web3.js, ethers.js and viem will work out of the box just like they do on L1 Ethereum.

            -

            Once upon a time, Arbitrum developers were required to download supplemental packages with names like "arb-provider-ethers" and "arb-ethers-web3-bridge", but these packages are deprecated and no longer required! Any guide that directs devs to use them should be considered outdated.

            +### Do I need to download any special npm libraries in order to use web3.js or ethers-js on Arbitrum? {#do-i-need-to-download-any-special-npm-libraries-in-order-to-use-web3js-or-ethersjs-on-arbitrum-} +

            Nope; web3.js and ethers.js will work out of the box just like they do on L1 Ethereum.
            +
            +Once upon a time, Arbitrum developers were required to download supplemental packages with names like "arb-provider-ethers" and "arb-ethers-web3-bridge", but these packages are deprecated and no longer required! Any guide that directs devs to use them should be considered outdated.

            -### How many block numbers must we wait for in Arbitrum before we can confidently state that the transaction has reached finality? + +### **How many block numbers must we wait for in Arbitrum before we can confidently state that the transaction has reached finality?** {#how-many-block-numbers-must-we-wait-for-in-arbitrum-before-we-can-confidently-state-that-the-transaction-has-reached-finality}

            Arbitrum's block intervals fluctuate with throughput, so relying on block numbers for finality isn't recommended. However, Arbitrum nodes support Ethereum's JSON RPC, enabling the use of eth_getBlockByNumber() to determine block finality. Here, we provide additional details on how to achieve this.

            @@ -126,9 +143,9 @@ To let's find out which is custom error this signature represents, we can use th

            -
            • latest: Provides you with the most recent Arbitrum block number that the node has observed on the L1 and indicates that the Sequencer's batch has been just published as an L1 block on the Ethereum network. It's important to note that this block has the potential to be re-orged but you can consider and trust this block as final, if you trust the sequencer.
            • -
            • safe: Provides you with the most recent Arbitrum block number that has achieved attestations from a two-thirds majority of Ethereum's validator set. This occurs when the Sequencer's batch is posted as an L1 block on Ethereum and then the batch transactions achieve safe finality there. While safe blocks are typically resistant to re-orgs, they can still be re-orged in the event of a significant L1 re-org.
            • -
            • finalized: Provides you with the most recent Arbitrum block number that is finalized on Ethereum. This means that the Sequencer's batch has been published as an L1 block on the Ethereum network and has reached a substantial depth, making it eligible for hard finality. Unlike safe blocks, finalized blocks are highly improbable to undergo re-orgs.
            • +
              • {'latest'}: Provides you with the most recent Arbitrum block number that the node has observed on the L1 and indicates that the Sequencer's batch has been just published as an L1 block on the Ethereum network. It's important to note that this block has the potential to be re-orged but you can consider and trust this block as final, if you trust the sequencer.
              • +
              • {'safe'}: Provides you with the most recent Arbitrum block number that has achieved attestations from a two-thirds majority of Ethereum's validator set. This occurs when the Sequencer's batch is posted as an L1 block on Ethereum and then the batch transactions achieve safe finality there. While safe blocks are typically resistant to re-orgs, they can still be re-orged in the event of a significant L1 re-org.
              • +
              • {'finalized'}: Provides you with the most recent Arbitrum block number that is finalized on Ethereum. This means that the Sequencer's batch has been published as an L1 block on the Ethereum network and has reached a substantial depth, making it eligible for hard finality. Unlike safe blocks, finalized blocks are highly improbable to undergo re-orgs.

              @@ -137,8 +154,9 @@ To let's find out which is custom error this signature represents, we can use th

              -### How can I list my token on the Arbitrum Bridge? -

              The L2 token list used in the Arbitrum bridge is generated from the L1 tokens that are part of the token list of Uniswap, Gemini , Coinmarketcap or Coingecko. This is valid for L1-native tokens that have been bridged over to L2, and for L2-native tokens that have been bridged over to L1 as long as they are part of any of those lists.

              + +### How can I list my token on the Arbitrum Bridge? {#how-can-i-list-my-token-on-the-arbitrum-bridge} +

              The L2 token list used in the Arbitrum bridge is generated from the L1 tokens that are part of the token list of Uniswap, Gemini or Coinmarketcap. This is valid for L1-native tokens that have been bridged over to L2, and for L2-native tokens that have been bridged over to L1 as long as they are part of any of those lists.

              Currently, there isn't any L2-only token list.

              @@ -147,41 +165,45 @@ To let's find out which is custom error this signature represents, we can use th

              -### What is a testnet or a devnet? + +### What is a testnet or a devnet? {#what-is-a-testnet-or-a-devnet}

              Testnets (or devnets) primarily serve developers who want to test out the applications they're building without having to use any real mainnet funds.

              -

              Arbitrum Sepolia is a testnet that has the same full feature-set as the mainnet network. It is also a "true" L2 that runs on top of the Sepolia testnet (L1), using it for security and settlement.

              +

              Arbitrum Goerli and Arbitrum Sepolia are both testnets that have the same full feature-set as the mainnet networks. They are also a "true" L2 that run on top of the Goerli testnet (L1) and the Sepolia testnet (L1) respectively, using them for security and settlement.

              -

              Users can bridge any asset from the Sepolia testnet (L1) into the Arbitrum Sepolia testnet (and back!), using the official bridge.

              +

              Users can bridge any asset from the Goerli testnet (L1) into the Arbitrum Goerli testnet, and from the Sepolia testnet (L1) into the Arbitrum Sepolia testnet (and back!), using the official bridge.

              -### Is there any testnet available on Arbitrum? -

              Yes, there's an Arbitrum Sepolia testnet (421614) that uses the Nitro tech stack and runs on top of Ethereum Sepolia. You can find more information here.

              + +### Is there any testnet available on Arbitrum? {#is-there-any-testnet-available-on-arbitrum} +

              Yes, there's an Arbitrum Goerli testnet (421613) that uses the Nitro tech stack, running on top of Ethereum Goerli, and an Arbitrum Sepolia testnet (421614) that also uses the Nitro tech stack and runs on top of Ethereum Sepolia. You can find more information here.

              -### When was Arbitrum One upgraded from Classic to Nitro? -

              Arbitrum One was upgraded on August 31st, 2022 (block 22207818), from the Classic stack to the improved Nitro tech stack, maintaining the same state.

              -

              +### When was Arbitrum One upgraded from Classic to Nitro? {#when-was-arbitrum-one-upgraded-from-classic-to-nitro} +

              Arbitrum One was upgraded on August 31st, 2022, from the Classic stack to the improved Nitro tech stack, maintaining the same state.

              + -### Do Arbitrum chains support precompiles that are present on Ethereum? +### Do Arbitrum chains support precompiles that are present on Ethereum? {#do-arbitrum-chains-support-precompiles-that-are-present-on-ethereum}

              Yes, all Arbitrum chains support all precompiles that Ethereum supports, as well as others that are not present on Ethereum. Check the precompiles reference page for more information about Arbitrum specific precompiles.

              -### What's the contract code size limit in Arbitrum chains? + +### What's the contract code size limit in Arbitrum chains? {#whats-the-contract-code-size-limit-in-arbitrum-chains}

              As specified in EIP-170, contracts of up to 24KB are deployable on Arbitrum chains.

              -### How can I find the L2 block(s) that corresponds to a given L1 block? + +### How can I find the L2 block(s) that corresponds to a given L1 block? {#how-can-i-find-the-l2-blocks-that-corresponds-to-a-given-l1-block}

              First of all, you should be familiar with how block numbers behave on Arbitrum. You can find information about it in Block numbers and time.

              When you query an RPC node for a transaction receipt or a block information, you obtain as part of the result the property l1BlockNumber, which is the L1 block number that the sequencer viewed when it processed the transaction.

              @@ -191,7 +213,8 @@ To let's find out which is custom error this signature represents, we can use th

              If you want a more specific result, you can perform the same operation with the timestamp from the L1 block, instead of the actual block number.

              -### Why do some old transactions have extremely high gas prices when querying them? + +### Why do some old transactions have extremely high gas prices when querying them? {#why-do-some-old-transactions-have-extremely-high-gas-prices-when-querying-them}

              When Arbitrum One was running under the Arbitrum Classic stack (before Nitro), the gas price was an unbounded bid, so when requesting those transactions via RPC, you may obtain a very high amount in the gasPrice property.

              Instead of that, it is recommended to look at the effectiveGasPrice property from the transaction receipt.

              @@ -199,7 +222,8 @@ To let's find out which is custom error this signature represents, we can use th

              -### What is the WASM module root? + +### What is the WASM module root? {#what-is-the-wasm-module-root}

              The WASM module root is a 32 byte hash, which is a merkelization of the Go replay binary and its dependencies.

              The replay binary is much too large to post on-chain, so this hash is set in the L1 rollup contract to determine the correct replay binary during fraud proofs.

              @@ -209,13 +233,15 @@ To let's find out which is custom error this signature represents, we can use th

              -### Why do I get a "gas required exceeds allowance" when trying to estimate the gas costs of a request? + +### Why do I get a "gas required exceeds allowance" when trying to estimate the gas costs of a request? {#why-do-i-get-a-gas-required-exceeds-allowance-when-trying-to-estimate-the-gas-costs-of-a-request}

              During an eth_estimateGas call the actual request will be simulated on the node, so if the transaction reverts or if there aren't enough funds in the wallet that's making the call (usually the from parameter), the eth_estimateGas request will return the error gas required exceeds allowance.

              Make sure you have enough funds in your wallet, and the gas fields of the request (if you're using them) are correctly set.

              -### How can I verify that an L2 block has been processed as part of a specific RBlock? + +### How can I verify that an L2 block has been processed as part of a specific RBlock? {#how-can-i-verify-that-an-l2-block-has-been-processed-as-part-of-a-specific-rblock}

              If you want to verify that the latest confirmed (or created) assertion has processed a specific L2 block, you can follow these steps:

              1. From the rollup contract, obtain the latest confirmed (or created) Rblock through the function latestConfirmed (or latestNodeCreated). In this context, we refer to RBlocks as "nodes".
              2. @@ -227,52 +253,4 @@ To let's find out which is custom error this signature represents, we can use th

                You can find an example script in our arbitrum-tutorials repository.

                -### Why is the fee of some Classic transactions slightly different than the multiplication of gasLimit and effectiveGasPrice? -

                Gas prices in Classic transactions worked a bit differently than in Nitro transactions. Classic transactions handled four different prices: L1 fixed, L1 calldata, L2 computation and L2 storage. You can see all those prices in the Advanced TxInfo of Arbiscan (here's an example).

                - -

                When querying the receipt of a Classic transaction on a Nitro node, there's some calculation done to get an effectiveGasPrice that is close to (but not exactly) what those four prices represent. That's why if you multiply the gasLimit by the effectiveGasPrice you might end up with a transaction fee that is slightly different than the actual fee paid.

                - -

                To get the exact fees paid, you can query a Classic node, which will return all the exact information.

                - -

                - - -### How can I update the information of my bridged token on Arbiscan? -

                If you have a native-L1 token that was bridged to L2 via the standard gateway, you might find that you can't claim ownership of the L2 contract of your token as it was generated by another contract.

                - -

                To update its information on Arbiscan (logo, socials, etc.), you can open a ticket through Arbiscan support system and request them to replicate the information of your token on L1 to L2.

                - -

                - - -### Why does my transaction revert with InvalidFEOpcode when using Foundry? -

                Foundry and other similar development tools that enable chain forking, do not support Arbitrum precompiles. If your transaction is calling a precompile, it is likely that it will revert with InvalidFEOpcode.

                - -

                To rule out that possibility, it is recommended to send the transaction with a different tool.

                - -

                - - -### Why do I receive an "intrinsic gas too low" error when sending a transaction even with a high gas price? -

                The error intrinsic gas too low usually refers to not providing enough gas to pay for the L1 component of the transaction fees. This is usually a problem related to not setting a high enough gas limit (instead of gas price), due to how Arbitrum handles gas. You can find more information in the article Understanding Arbitrum: 2-dimensional fees and the page How to estimate gas.

                - -

                - - -### How can I interpret Arbitrum transaction traces? -

                In Arbitrum, every block contains a system transaction of type ArbitrumInternalTxType, which is created by the ArbOS itself for specific state updates, such as the L1 base fee and the block number. These transactions are distinct from typical Ethereum transactions and are exclusively generated by the ArbOS state transition function, not by external entities like externally owned accounts (EOAs) or smart contracts. Despite having an INVALID opcode, these transactions are represented in the trace API to signify their presence in the block, even though they're not triggered by an opcode within EVM execution.

                - -

                One of the key functionalities of ArbitrumInternalTxType involves managing value transfers related to acknowledging batch postings. When batches of transactions are submitted to Layer 1, a special cross-chain message is produced as a receipt, confirming the successful posting of the batch. The function ApplyInternalTxUpdate is responsible for processing and updating the system's state based on these cross-chain messages, ensuring consistency and integrity across the Arbitrum network.

                - -

                Another functionality of ArbitrumInternalTxType transactions is handling the value held in retryables when they are discarded. Retryable transactions are essentially transactions that can be retried if they fail to execute on the destination chain. However, in certain scenarios, these retryable transactions might get discarded, for instance, due to expiration or other conditions.

                - -

                In such cases, the escrowed call value, which is the value associated with the retryable transaction, will be paid out to a specified callValueRefundAddress account. This address is designated during the initial submission of the transaction on the parent chain. The purpose of this mechanism is to ensure that funds associated with retryable transactions are not lost in case they cannot be successfully executed, thereby maintaining the integrity and reliability of the Arbitrum network.

                - -

                To accurately reflect value transfers associated with these transactions, we employ a unique callType parameter: invalid. Unlike conventional EVM calls (such as delegatecall, call, etc.), this designation signifies a different system transaction. Essentially, it denotes a straightforward value transfer from one account to another, with no inherent invocation of smart contract logic. While technically feasible to conduct this transfer within a conventional call type, our deliberate choice of invalid aims to enhance the clarity and distinctiveness of this transaction type within the EVM ecosystem.

                - -

                Notably, the sender account remains consistent across all instances of this transaction type for the batch posting receipt version. However, it's important to note that for retryable transactions, the sender account differs as each retryable transaction escrows its value in a unique vault specific to that transaction. This ensures that funds associated with each retryable transaction are securely held until either successful execution or eventual refund.

                - -

                - -

                diff --git a/arbitrum-docs/partials/_troubleshooting-nodes-partial.md b/arbitrum-docs/partials/_troubleshooting-nodes-partial.md index 40861f9e61..9693d0932b 100644 --- a/arbitrum-docs/partials/_troubleshooting-nodes-partial.md +++ b/arbitrum-docs/partials/_troubleshooting-nodes-partial.md @@ -1,24 +1,27 @@ -### How do I run a node? +### How do I run a node? {#how-do-i-run-a-node}

                See instructions here!

                -### How to verify the integrity of the Nitro database I currently have? + +### How to verify the integrity of the Nitro database I currently have? {#how--to-verify-the-integrity-of-the-nitro-database-i-currently-have}

                We have an accumulator hash on all messages, which means that a message can't be added to the database without the previous message being correct.

                -

                To confirm that everything's working properly, you could just make sure that it's syncing and that the latest block is consistent with other Arbitrum nodes; e.g., you could check it against Arbiscan (note that Arbiscan's search field doesn't support searching by block hash).

                +

                To confirm that everything's working properly, you could just make sure that it's syncing and that the latest block is consistent with other Arbitrum nodes; e.g., you could check it against Arbiscan (note that Arbiscan's search field doesn't support searching by block hash).

                -### How can I check if the node is running properly and diagnose the issue if it is not? + +### How can I check if the node is running properly and diagnose the issue if it is not? {#how-can-i-check-if-the-node-is-running-properly-and-diagnose-the-issue-if-it-is-not}

                We have trace-level logging RPC request implemented on our node. You could use it to log all requests and responses at the trace level. (The performance impact of this should be negligible compared to the network overhead of an RPC request in the first place, especially considering that the request/response will only be serialized for logging if that log level is enabled.)

                -### Why do I need an L1 node to run an Arbitrum node? + +### Why do I need an L1 node to run an Arbitrum node? {#why-do-i-need-an-l1-node-to-run-an-arbitrum-node}

                On the node syncing stage, Arbitrum nodes read transactions from batches that were previously posted on L1 and have been executed. They then connect to the Sequencer feed to receive new incoming batched transactions that have not yet been posted on L1.

                When fully synced, the Arbitrum node uses the State Transition Function (STF) to consume transactions coming from the Sequencer feed and creates a new state. It also waits for the L1 batch to be posted. If the L1 batch that is finalized on L1 is different from what the Sequencer published, the node will change the state based on the L1 batched transactions.

                @@ -26,20 +29,23 @@

                -### Can I run an Arbitrum node in p2p mode? + +### Can I run an Arbitrum node in p2p mode? {#can-i-run-an-arbitrum-node-in-p2p-mode}

                Arbitrum doesn't have a consensus mechanism, so "p2p mode" doesn't apply. For nodes to sync to the latest chain state, they connect to an L1 node to sync the chain's history that's been posted in calldata and connect to the Sequencer feed for the transactions that have yet to be posted in batches. In no case do nodes need to peer up and sync with each other.

                -### How do I read messages from the Sequencer feed? -

                Running an Arbitrum relay locally as a Feed Relay lets you subscribe to the Sequencer feed for real-time data as the Sequencer accepts and orders transactions off-chain. Visit How to read the sequencer feed for a detailed how-to.

                + +### How do I read messages from the Sequencer feed? {#how-do-i-read-messages-from-the-sequencer-feed} +

                Running an Arbitrum relay locally as a Feed Relay lets you subscribe to the Sequencer feed for real-time data as the Sequencer accepts and orders transactions off-chain. Visit How to read the sequencer feed for a detailed how-to.

                -### How do I run a node locally for development? + +### How do I run a node locally for development? {#how-do-i-run-a-node-locally-for-development}

                See instructions here.

                -

                We recommend running nitro nodes via docker; to compile directly / run without docker, you can follow the steps in How to build Nitro locally.

                +

                We recommend running nitro nodes via docker; to compile directly / run without docker, you can follow the steps in this file then run the executable directly.

                @@ -48,23 +54,24 @@

                -### Is there any way to retrieve pre-Nitro archive data from a Nitro node? -

                The pre-nitro stack is also referred to as the "classic" stack. Full nitro nodes start with a database that contains the information from the "classic" era.

                -

                However, it is not possible for a nitro node to query archive information contained in "classic" blocks right away. To do that, you need to also run a classic node (instructions here) and set the parameter —node.rpc.classic-redirect=your-classic-node-RPC.

                +### **Is there any way to retrieve pre-Nitro archive data from a Nitro node?** {#is-there-any-way-to-retrieve-prenitro-archive-data-from-a-nitro-node} +

                The pre-nitro stack is also referred to as a "classic" stack. Full nitro nodes start with a database that contains the information from the "classic" era. However, it is not possible for a nitro node to query archive information contained in "classic" blocks right away. To do that, you need to also run a classic node (instructions here) and set the parameter —node.rpc.classic-redirect=your-classic-node-RPC.

                -

                Keep in mind that this information only applies to Arbitrum One nodes. Arbitrum Nova and Arbitrum Sepolia nodes started with a Nitro stack from the beginning, so they don't have "classic" data.

                +

                Keep in mind that this information only applies to Arbitrum One nodes. Arbitrum Nova, Arbitrum Goerli and Arbitrum Sepolia nodes started with a Nitro stack from the beginning, so they don't have "classic" data.

                -### How can I verify that my node is syncing at a desirable speed? -

                Syncing speed can vary depending on multiple factors. You can find the minimum hardware requirements to run your node in this page. You should also verify your network and disk speed, and make sure that the L1 node is running correctly.

                + +### How can I verify that my node is syncing at a desirable speed? {#how-can-i-verify-that-my-node-is-syncing-at-a-desirable-speed} +

                Syncing speed can vary depending on multiple factors. You can find the minimum hardware requirements to run your node in this page. You should also verify your network and disk speed.

                -### How can I verify that my node is fully synced? + +### How can I verify that my node is fully synced? {#how-can-i-verify-that-my-node-is-fully-synced}

                You can make an eth_syncing RPC call to your node. When a nitro node is fully synced, eth_syncing returns the value false (just like a normal Geth node).

                When a nitro node is still syncing, eth_syncing returns a map of values to help understand why the node is not synced. Nitro execution and bottleneck are different from a normal Geth node, so eth_syncing output is unique to nitro.

                @@ -74,19 +81,22 @@

                -### Is there an alternative to Docker when running a node? -

                We recommend running Nitro nodes via Docker, using the guides provided within our documentation. However, you can try to compile the code directly by following the steps described in this guide.

                + +### **Is there an alternative to docker when running a node?** {#is-there-an-alternative-to-docker-when-running-a-node} +

                We recommend running nitro nodes via docker, using the guides provided within our documentation. However, you can try to compile the code directly by following the steps described in the Dockerfile, or following this guide for Debian.

                -### What are the minimum hardware requirements to run a full node? + +### **What are the minimum hardware requirements to run a full node?** {#what-are-the-minimum-hardware-requirements-to-run-a-full-node}

                You can see the minimum hardware configuration in this section.

                -### How can I migrate the date of one synced node to a new one? + +### How can I migrate the date of one synced node to a new one? {#how-can-i-migrate-the-date-of-one-synced-node-to-a-new-one}

                From a fully synced node, you can copy its database (the .arbitrum directory in a default setup) to the same database folder of the new node, and it will start from the same state.

                Keep in mind that this must be done after a clean shutdown, while the node is not running.

                @@ -94,8 +104,4 @@

                -### When querying Classic transactions from a Nitro node, I sometimes get incorrect data, like the zero address as the sender. Why is that? -

                Some old Nitro genesis database snapshots didn't properly set the retry sender for Classic blocks and contain said error. If you need to access that information, you can either resync your nitro node with one of the current snapshots, or run a Classic node along with your nitro node and configure a redirection for requests to Classic blocks. Please note that this only happens on Arbitrum One.

                - -

                diff --git a/arbitrum-docs/partials/_troubleshooting-orbit-partial.md b/arbitrum-docs/partials/_troubleshooting-orbit-partial.md deleted file mode 100644 index 5aee1e2a71..0000000000 --- a/arbitrum-docs/partials/_troubleshooting-orbit-partial.md +++ /dev/null @@ -1,198 +0,0 @@ -### Can I use Orbit to deploy a mainnet chain? - -

                - Yes! Arbitrum Orbit's core technology has undergone a comprehensive audit and is now able to - support deployments to mainnet. You can read more about it{' '} - - here - - . -

                - -

                - -### How can I deploy an Orbit-based Layer 3 (L3) chain? - -

                - Check our Quickstart to - learn how to launch your own Orbit chain today. -

                - -

                - -### Do I need permission/license to launch an Orbit chain? - -

                - You can permissionlessly launch an L3 Orbit chain that settles to one of Arbitrum's Layer 2 (L2) - chains. There is an emerging licensing structure will soon make it possible to permissionlessly - launch an L2 Orbit chain that settles directly to Ethereum. Please get in touch with the Arbitrum - Foundation or Offchain Labs for more information. -

                - -

                Note that launching a testnet doesn't require any license.

                - -

                - -### Does Arbitrum officially deploy and/or maintain L3s for external teams? - -

                - No. Teams are required to deploy and maintain their Orbit chains. There are, however, several RaaS - (Rollup as a Service) providers that can deploy and maintain the Orbit chain for you. -

                - -

                - -### Can I modify Orbit's underlying technology to customize my chain? - -

                Yes, you can make any changes you require to the underlying Nitro code base.

                - -

                - -### What Data Availability (DA) solutions are currently available for Orbit chains? - -

                Arbitrum Orbit currently supports 3 different DA solutions:

                - -
                  -
                • Rollup, posting data to the parent chain which ultimately posts the data to Ethereum.
                • -
                • AnyTrust, posting data to a Data Availability Committee, selected by the chain owner.
                • -
                • - Celestia, posting data to{' '} - - Celestia network - - . -
                • -
                -

                Note that using AnyTrust gives the chain owner the most flexibility and cheapest fees.

                - -

                - -### What token is used to pay gas fees on Orbit chains? - -

                - By default, Orbit chains pay gas in ETH. However, Orbit chains using AnyTrust can be configured to - use any ERC-20 token as the gas fee token of the chain. -

                - -

                - -### Can I use Ethereum toolkits to develop on my Orbit chain? - -

                - Orbit chains are fully EVM-compatible. Most tools that support Ethereum should be able to support - an Orbit chain. There are, however, certain differences that developers need to keep in mind when - building on an Orbit chain. You can find them{' '} - - here - - . -

                - -

                - -### Do Orbit chains have any built-in AA solution? - -

                Not by default, but they can be customized to have native AA.

                - -### Is there any cross-chain bridging solution between two Orbit chains? - -

                - There is currently no Orbit-to-Orbit native bridging solution, other than going through the parent - chain (if they share the same parent chain). However, there are many third-party bridges that have - expressed interest in supporting Orbit chains. -

                - -

                - -### Is there an official block explorer for Orbit chains? - -

                - Orbit chains deployments usually come with an open-source blockscout explorer by default, but - there are many third-party solutions that have expressed interest in supporting Orbit chains. -

                - -

                - -### Is there any indexing solution that supports Orbit chains? - -

                - Similar to bridges and block explorers, there are many third-party indexing solutions that have - expressed interest in supporting Orbit chains. -

                - -

                - -### Can I increase the maximum contract size for my Orbit chain? - -

                - Yes, but only on testnets for now. You can use our{' '} - Orbit SDK (available for - deployments on testnet), and configure the parameters{' '} - - MaxCodeSize and MaxInitCodeSize - {' '} - when calling{' '} - - prepareNodeConfig - - . -

                - -

                - -### How can I modify Nitro to force posting an invalid assertion and test the fraud proof mechanism? - -

                - Forcing an invalid assertion in the chain is not supported at the moment. However, if you're - building Nitro locally, you can run the following test that goes through the whole - rollup/challenge mechanism: -

                - -```shell -go test ./system_tests/ -tags=challengetest -run=TestChallenge - -``` - -

                - -### What fee collectors can be configured on my chain? - -

                There are 4 fee types that can be configured on an Orbit chain:

                - -
                  -
                • - L2 base fee: L2 execution fees corresponding to the minimum base price of the chain. This is - paid to the infraFeeAccount, which can be set by calling{' '} - ArbOwner.setInfraFeeAccount(). -
                • -
                • - L2 surplus fee: L2 execution fees above the minimum base price (in the case of congestion). This - is paid to the networkFeeAccount, which can be set by calling{' '} - ArbOwner.setNetworkFeeAccount(). -
                • -
                • - L1 base fee: Relative fees for posting a transaction on the parent chain. This is paid - ultimately to the fee collector of the active batch poster. The batch poster can be set by - calling SequencerInbox.setIsBatchPoster() on the parent chain. And a different fee - collector for that batch poster can be specified by calling{' '} - ArbAggregator.setFeeCollector(). -
                • -
                • - L1 surplus fee: Any extra fees rewarded to the batch poster. This is paid to a specific - L1RewardRecipient, which can be set by calling{' '} - ArbOwner.setL1PricingRewardRecipient() -
                • -
                -

                - More detailed information about fees can be found in the{' '} - L1 fees and{' '} - L2 fees pages. -

                - -

                - Information about the precompiles methods can be found in the{' '} - - Precompiles reference page - - . -

                diff --git a/arbitrum-docs/partials/_troubleshooting-stylus-partial.md b/arbitrum-docs/partials/_troubleshooting-stylus-partial.md deleted file mode 100644 index 942130f88f..0000000000 --- a/arbitrum-docs/partials/_troubleshooting-stylus-partial.md +++ /dev/null @@ -1,131 +0,0 @@ -### How does Stylus manage security issues in smart contracts when interacting with so many different languages? - -

                - All languages are compiled to WASM for them to be able to work with Stylus. So it just needs to - verify that the produced WASM programs behave as they should inside the new virtual machine. -

                - -

                - -### Is there any analogue of the fallback function from Solidity in the Rust Stylus SDK? - -

                - Currently there isn't any analogue. However, you can use a minimal entrypoint and perform raw - delegate calls, forwarding your calldata. You can find more information in{' '} - - Bytes-in, bytes-out programming - {' '} - and{' '} - - call, static_call and delegate_call - - . -

                - -

                - -### Why are constructors not yet supported for Stylus contracts? - -

                - Constructors use EVM bytecode to initialize state. While one could add EVM bytecode manually to - their Stylus deployment, we don't allow WASM execution in the constructor so there's no way to - express this in the SDK. -

                - -

                - We're working on models that will make init easier, so there might be better solutions available - in the future. For now, we suggest calling an init method after deploying. -

                - -

                - -### Is it possible to verify Stylus contracts on the block explorer? - -

                - Currently it is not possible to verify contracts compiled to WASM on the block explorer, but we - are actively working with providers to have the verification process ready for when Stylus reaches - mainnet-ready status. -

                - -

                - -### Do Stylus contracts compile down to EVM bytecode like prior other attempts? - -

                - No. Stylus contracts are compiled down to WASM. The user writes a program in Rust / C / C++ which - is then compiled down to WebAssembly. -

                - -

                - -### How is a Stylus contract deployed? - -

                - Stylus contracts are deployed on chain as a blob of bytes, just like EVM ones. The only difference - is that when the contract is executed, instead of invoking the EVM, we invoke a separate WASM - runtime. Note that a special EOF-inspired prefix distinguishes Stylus contracts from traditional - EVM contracts: when a contract's bytecode starts with the magic 0xEF000000 prefix, - it's a Stylus WASM contract. -

                - -

                - -### Is there a new transaction type to deploy Stylus contracts? - -

                - You deploy a Stylus contract the same way that Solidity contracts are deployed. There are no - special transaction types. As a UX note: a WASM will revert until a special instrumentation - operation is performed by a call to the new  ArbWasm precompile, which readies the - program for calls on-chain. -

                - -

                - You can find instructions for deploying a Stylus contract in our{' '} - - Quickstart - - . -

                - -### Do Stylus contracts use a different type of ABI? - -

                - Stylus contracts use solidity ABIs. Methods, signatures, logs, calls, etc. work exactly as in the - EVM. From a user's / explorer's perspective, it all just looks and behaves like solidity. -

                - -

                - -### Does the Stylus SDK for Rust support custom data structures? - -

                - For in-memory usage, you should be able to use any implementation of custom data structures - without problems. -

                - -

                - For storage usage, it might be a bit more complicated. Stylus uses the EVM storage system, so - you'll need to define the data structure on top of it. However, in the SDK there's a storage trait - that custom types can implement to back their collections with the EVM state trie. The SDK macros - are compatible with them too, although fundamentally it's still a global key-value system. -

                - -

                - You can read more about it in the{' '} - - Stylus Rust SDK page - - . -

                - -

                - As an alternative solution, you can use{' '} - - entrypoint-style contracts - {' '} - for your custom data structures. -

                - -

                - -

                diff --git a/arbitrum-docs/partials/_troubleshooting-users-partial.md b/arbitrum-docs/partials/_troubleshooting-users-partial.md index 155e032ff1..fe4f973ed7 100644 --- a/arbitrum-docs/partials/_troubleshooting-users-partial.md +++ b/arbitrum-docs/partials/_troubleshooting-users-partial.md @@ -1,35 +1,42 @@ -### Why do I need ETH to use the Arbitrum network? -

                ETH is the currency used to pay gas fees on Arbitrum, and all Arbitrum transactions are powered by ETH. You can bridge ETH (and other tokens) from Ethereum to Arbitrum through Arbitrum's bridge.

                +### Why do I need ETH to use the Arbitrum network? {#why-do-i-need-eth-to-use-the-arbitrum-network} +

                When moving funds (ETH and non-ETH) from Ethereum (L1) to Arbitrum (L2), you'll need to have ETH in your wallet on the corresponding Arbitrum chain. This is because ETH is the currency used for gas fees on Arbitrum and all Arbitrum transactions are powered by ETH.

                +

                + + -### Do I need to pay a tip or priority fee for my Arbitrum transactions? +### Do I need to pay a tip / Priority fee for my Arbitrum transactions? {#do-i-need-to-pay-a-tip--priority-fee-for-my-arbitrum-transactions}

                Since transactions are processed in the order that the Sequencer receives them, no priority fee is necessary for Arbitrum transactions; if a transaction does include a priority fee, it will be refunded to the transaction's origin address at the end of the execution.

                -### How can I see the balance of ETH and other tokens in my wallet on Arbitrum? -

                Most wallets are "connected" to one given network at a time. To view your ETH or token balances, ensure that you are connected to the appropriate Arbitrum chain. In MetaMask, you can switch networks via the "networks" dropdown. In this dropdown, select your desired network (either Arbitrum One or Arbitrum Nova for our mainnet networks). If your desired network hasn't been added to your wallet yet, you can add it at https://bridge.arbitrum.io/.

                + +### How can I see the balance of my ETH / Tokens on Arbitrum in my wallet? {#how-can-i-see-the-balance-of-my-eth--tokens-on-arbitrum-in-my-wallet} +

                Most wallets are "connected" to one given network at a time. To view your Ether / Token balances, ensure that you are connected to the appropriate Arbitrum chain. In MetaMask, you can switch networks via the "networks" dropdown. In this dropdown, select your desired network (either Arbitrum One or Arbitrum Nova for our mainnet networks). If your desired network hasn't been added to your wallet yet, you can add it at https://bridge.arbitrum.io/.

                -### What happens if I send my funds to an exchange that doesn't support Arbitrum? -

                If you send the funds and the receiving wallet/exchange doesn't support the Arbitrum network you are sending funds through, there is unfortunately nothing that we can do to recover your funds. You would need to contact the wallet/exchange support and see if they can do anything to help you retrieve the funds.

                + +### What happens if I send my funds to an exchange that does not support Arbitrum? {#what-happens-if-i-send-my-funds-to-an-exchange-that-does-not-support-arbitrum} +

                If you send the funds and the receiving wallet/exchange does not support the Arbitrum network you are sending funds through, there is unfortunately nothing that we can do to recover your funds. You would need to contact the wallet/exchange support and see if they can do anything to help you retrieve the funds.

                -### Does Arbitrum have a mempool? + +### Does Arbitrum have a mempool? {#does-arbitrum-have-a-mempool}

                The Arbitrum Sequencer orders transactions on a first come, first served basis; the Sequencer inserts transactions into a queue based on the order they are received and executes them accordingly. This queue thus exists in lieu of a mempool. The Sequencer's queue has no space limit; transactions on the queue will eventually timeout and be discarded if not executed in time. Under normal conditions, the queue is empty, since transactions are executed near-instantaneously.

                -### What's the difference between Arbitrum Rollup and Arbitrum AnyTrust? -

                Arbitrum Rollup is an Optimistic Rollup protocol; it is trustless and permissionless. Part of how these properties are achieved is by requiring all chain data to be posted on layer 1. This means the availability of this data follows directly from the security properties of Ethereum itself, and, in turn, that any party can participate in validating the chain and ensuring its safety. For more information, see Inside Arbitrum Nitro.

                -

                By contrast, Arbitrum AnyTrust introduces a trust assumption in exchange for lower fees; data availability is managed by a Data Availability Committee (DAC), a fixed, permissioned set of entities. We introduce some threshold, K, with the assumption that at least K members of the committee are honest. For simplicity, we'll hereby assume a committee of size 20 and a K value of 2:

                +### What's the difference between Arbitrum Rollup and Arbitrum AnyTrust? {#whats-the-difference-between-arbitrum-rollup-and-arbitrum-anytrust} +

                Arbitrum Rollup is an Optimistic Rollup protocol; it is trustless and permissionless. Part of how these properties are achieved is by requiring all chain data to be posted on layer 1. This means the availability of this data follows directly from the security properties of Ethereum itself, and, in turn, that any party can participate in validating the chain and ensuring its safety.

                + +

                By contrast, Arbitrum AnyTrust introduces a trust assumption in exchange for lower fees; data availability is managed by a Data Availability Committee (DAC), a fixed, permissioned set of entities. We introduce some threshold, K, with the assumption that at least K members of the committee are honest. For simplicity, we'll hereby assume a committee of size 20 and a K value of 2:

                If 19 out of the 20 committee members and the Sequencer are malicious and colluding together, they can break the chain's safety (and, e.g., steal users' funds); this is the new trust assumption.

                @@ -44,7 +51,8 @@

                -### How can I check the status of my cross chain message? + +### How can I check the status of my cross chain message? {#how-can-i-check-the-status-of-my-cross-chain-message}

                You can check the status of any Arbitrum cross chain message at https://retryable-dashboard.arbitrum.io/ (you will also be able to execute the cross chain message there, if applicable).

                You'll need the transaction hash of the "initiating transaction": the L1 transaction hash for an L1-to-L2 message (e.g., a deposit), or the L2 transaction hash for an L2-to-L1 message (e.g., a withdrawal).

                @@ -56,19 +64,19 @@

                -### If there is a dispute, can my L2 transaction get reorged / thrown out / "yeeted"? -

                Nope; once an Arbitrum transaction is included on L1, there is no way it can be reorged (unless the L1 itself reorgs, of course). A "dispute" involves Validators disagreeing over execution, i.e., the outputted state of a chain. The inputs, however, can't be disputed; they are determined by the Inbox on L1. (See Transaction Lifecycle)

                -

                +### If there is a dispute, can my L2 transaction get reorged / thrown out / "yeeted"? {#if-there-is-a-dispute-can-my-l2-transaction-get-reorged--thrown-out--yeeted} +

                Nope; once an Arbitrum transaction is included on L1, there is no way it can be reorged (unless the L1 itself reorgs, of course). A "dispute" involves Validators disagreeing over execution, i.e., the outputted state of a chain. The inputs, however, can't be disputed; they are determined by the Inbox on L1. (See Transaction Lifecycle)

                -### ...okay but if there's a dispute, will my transaction get delayed? +### ...okay but if there's a dispute, will my transaction get delayed?

                The only thing that a dispute can add delay to is the confirmation of L2-to-L1 messages. All other transactions continue to be processed, even while a dispute is still undergoing. (Additionally: in practice, most L2-to-L1 messages represent withdrawals of fungible assets; these can be trustlessly completed even during a dispute via trustless fast "liquidity exit" applications. See L2-to-L1 Messages).

                -

                +## -### Are "Sequencers" the same entities as "Validators"? Can a centralized Sequencer act maliciously (e.g., steal all my money)? + +### Are "Sequencers" the same entities as "Validators"? Can a centralized Sequencer act maliciously (e.g., steal all my money)? {#are-sequencers-the-same-entities-as-validators-can-a-centralized-sequencer-act-maliciously-eg-steal-all-my-money}

                No and no!

                An Arbitrum Chain's Sequencer(s) and Validators and completely distinct entities, with their own distinct roles.

                @@ -90,27 +98,31 @@

                -### Why was "one week" chosen for Arbitrum One's dispute window? -

                Generally, some amount of time is necessary for the Arbitrum validators to dispute an invalid assertion.

                -

                A week is expected to be more than enough time for validators to carry out an interactive dispute, assuming they don't encounter difficulty in getting their transactions included on L1. One week was chosen following the general consensus among the Ethereum research community — as well as other layer 2 projects — to provide enough time for the community to socially coordinate in the case of a coordinated Ethereum-staker censorship attack.

                +### Why was "one week" chosen for Arbitrum One's dispute window? {#why-was-one-week-chosen-for-arbitrum-ones-dispute-window} +

                Generally, some amount of time is necessary for the Arbitrum validators to dispute an invalid assertion.
                +
                +A week is expected to be more than enough time for validators to carry out an interactive dispute, assuming they don't encounter difficulty in getting their transactions included on L1. One week was chosen following the general consensus among the Ethereum research community — as well as other layer 2 projects — to provide enough time for the community to socially coordinate in the case of a coordinated Ethereum-staker censorship attack.

                -### What's the state of Arbitrum One's decentralization? + +### What's the state of Arbitrum One's decentralization? {#whats-the-state-of-arbitrum-ones-decentralization}

                See "State of Progressive Decentralization", or check out the work of our friends at L2BEAT.

                -### Are there any Fiat on-ramps that support Arbitrum? + +### Are there any Fiat on-ramps that support Arbitrum? {#are-there-any-fiat-onramps-that-support-arbitrum}

                Yes, you can find a list of Fiat on-ramps that support Arbitrum on our portal.

                -### How many blocks are needed for a transaction to be confirmed/finalized in Arbitrum? + +### How many blocks are needed for a transaction to be confirmed/finalized in Arbitrum? {#how-many-blocks-are-needed-for-a-transaction-to-be-confirmedfinalized-in-arbitrum}

                There are two levels of finality in a transaction lifecycle:

                • Soft finality: once the Sequencer receives and processes a transaction, it emits a receipt through the Sequencer's feed. At this point, if the Sequencer is trusted, the transaction will not be reordered and the state of the chain after processing the transaction can be determined.
                • @@ -119,41 +131,36 @@

                  -### Where can I find stats for Arbitrum? + +### Where can I find stats for Arbitrum? {#where-can-i-find-stats-for-arbitrum}

                  Although we currently don't maintain any stats dashboard for Arbitrum, you can find many community created dashboards in Dune.

                  -### Will transactions with a higher "gas price bid" be confirmed first? + +### Will transactions with a higher "gas price bid" be confirmed first? {#will-transactions-with-a-higher-gas-price-bid-be-confirmed-first}

                  There is no notion of mempool on Arbitrum, transactions are processed on a first come first served basis by the Sequencer. Thus, the gas price bid parameter does not influence the order in which a transaction is processed.

                  -### Where can I find a list of the current validators of the Arbitrum chains? + +### Where can I find a list of the current validators of the Arbitrum chains? {#where-can-i-find-a-list-of-the-current-validators-of-the-arbitrum-chains}

                  Validation on both Arbitrum One and Arbitrum Nova is currently allow-listed to a committee of public entities. You can see the list of validators here. Governance currently has the power to change this status.

                  -### Where can I find the current Data Availability Committee members? + +### Where can I find the current Data Availability Committee members? {#where-can-i-find-the-current-data-availability-committee-members}

                  The Arbitrum Nova chain has a 7-party DAC, whose members can be seen here. Governance has the ability to remove or add members to the committee.

                  -### Can I withdraw my funds from Arbitrum back to Ethereum without going through the Sequencer? What about funds that are in a contract? -

                  Yes, it is possible to permissionlessly send a message from Ethereum to be executed on Arbitrum, while bypassing the Sequencer. You can do this by using the DelayedInbox contract and force-including the message after a certain amount of time has passed (currently ~24 hours). You can find more information about this behavior here.

                  - -

                  Keep in mind that you can execute any message in this way, be it a withdrawal of funds back to Ethereum, or a call to a contract.

                  -

                  You can also find an example of force-inclusion in this tutorial.

                  - -

                  - - -### Are there any plans to reduce the time a transaction needs to wait before being able to be force-included from Ethereum into the Arbitrum chain, bypassing the sequencer? (Currently 24 hours) +### Are there any plans to reduce the time a transaction needs to wait before being able to be force-included from Ethereum into the Arbitrum chain, bypassing the sequencer? (Currently 24 hours) {#are-there-any-plans-to-reduce-the-time-a-transaction-needs-to-wait-before-being-able-to-be-forceincluded-from-ethereum-into-the-arbitrum-chain-bypassing-the-sequencer-currently-24-hours}

                  The mechanism that allows force-including transactions from Ethereum (bypassing the sequencer) is intended to be used in very rare cases, especially when it is expected that the sequencer will not be operational again, so that users have a way of interacting with Arbitrum in a trustless way.

                  When using this mechanism, if the sequencer is down for longer than the time window for force-including transactions from Ethereum, the moment it is online again, it can lead to a reorganization of blocks in Arbitrum (it would have received transactions timestamped before the force-included one).

                  @@ -165,7 +172,15 @@

                  -### What is the difference between an L2 block and a RBlock? + +### Why do Arbitrum chains enforce a speed limit? Isn't it better that the speed grows without limits? {#why-do-arbitrum-chains-enforce-a-speed-limit-isnt-it-better-that-the-speed-grows-without-limits} +

                  The transaction lifecycle sets a limit that we have to take into account: validators have to execute each transaction, get the status of the chain, and post an assertion to Ethereum every certain amount of time. If the speed of the chain increases too much, there is a risk that validators won't have enough computation power to process all transactions in a timely manner, and will fall behind on validating them, which would cause the chain to delay confirmations of its state.

                  + +

                  + + + +### What is the difference between an L2 block and a RBlock? {#what-is-the-difference-between-an-l2-block-and-a-rblock}

                  An L2 block is very similar to the concept of an L1 block. These blocks are generated by validator nodes of Arbitrum by executing the state transition function on sequenced transactions. The structure of an L2 block is similar to that of an Ethereum block, with a few differences that you can see here.

                  On the other hand, an RBlock is a distinctive block that is transmitted back to L1 to serve as a fingerprint of the most recent state of the Arbitrum chain. It comprises an assertion of the present state root of the Arbitrum chain and other essential information pertaining to withdrawals and challenges. The structure of RBlocks can be viewed here.

                  @@ -175,8 +190,4 @@

                  -### Why do Arbitrum chains enforce a speed limit? Isn't it better that the speed grows without limits? -

                  The transaction lifecycle sets a limit that we have to take into account: validators have to execute each transaction, get the status of the chain, and post an assertion to Ethereum every certain amount of time. If the speed of the chain increases too much, there is a risk that validators won't have enough computation power to process all transactions in a timely manner, and will fall behind on validating them, which would cause the chain to delay confirmations of its state.

                  - -

                  diff --git a/arbitrum-docs/stylus/reference/rust-sdk-guide.md b/arbitrum-docs/stylus/reference/rust-sdk-guide.md index a4f73e1045..992a5f4ffc 100644 --- a/arbitrum-docs/stylus/reference/rust-sdk-guide.md +++ b/arbitrum-docs/stylus/reference/rust-sdk-guide.md @@ -103,15 +103,16 @@ You can access storage types via getters and setters. For example, the `Contract ```rust impl Contract { /// Gets the owner from storage. - pub fn owner(&self) -> Address { - self.owner.get() + pub fn owner(&self) -> Result> { + Ok(self.owner.get()) } /// Updates the owner in storage - pub fn set_owner(&mut self, new_owner: Address) { - if msg::sender() == self.owner.get() { // we'll discuss msg::sender later + pub fn set_owner(&mut self, new_owner: Address) -> Result<(), Vec> { + if msg::sender() == self.owner()? { // we'll discuss msg::sender later self.owner.set(new_owner); } + Ok(()) } } ``` @@ -130,11 +131,11 @@ Collections like [`StorageVec`][StorageVec] and [`StorageMap`][StorageMap] are d ```rust impl SubStruct { - pub fn add_delegate(&mut self, delegate: Address) { + pub fn add_delegate(&mut self, delegate: Delegate) -> Result<(), Vec> { self.delegates.push(delegate); } - pub fn track_balance(&mut self, address: Address) { + pub fn track_balance(&mut self, address: Address) -> Result> { self.balances.insert(address, address.balance()); } } diff --git a/arbitrum-docs/stylus/reference/testnet-information.md b/arbitrum-docs/stylus/reference/testnet-information.md index 42fbc49351..a112514c95 100644 --- a/arbitrum-docs/stylus/reference/testnet-information.md +++ b/arbitrum-docs/stylus/reference/testnet-information.md @@ -21,7 +21,7 @@ Stylus is undergoing major upgrades, and some improvements are expected to requi This table provides an overview of the available public RPC endpoints for the Stylus testnet and necessary details to interact with them. -| Name | RPC URL | Chain ID | Block explorer | Underlying chain | Tech stack | Sequencer feed URL | Sequencer endpoint⚠️ | +| Name | RPC URL | Chain ID | Block explorer | Underlying chain | Tech stack | Sequencer feed URL | Sequencer endpoint⚠️ | | -------------- | -------------------------------------- | -------- | -------------------------------------------- | ---------------- | -------------- | ------------------------------------- | ------------------------------------------------ | | Stylus testnet | https://stylus-testnet.arbitrum.io/rpc | 23011913 | https://stylus-testnet-explorer.arbitrum.io/ | Arbitrum Sepolia | Nitro (Rollup) | wss://stylus-testnet.arbitrum.io/feed | https://stylus-testnet-sequencer.arbitrum.io/rpc | diff --git a/arbitrum-docs/stylus/troubleshooting-building-stylus.md b/arbitrum-docs/stylus/troubleshooting-building-stylus.md index 483d4317cc..6e43604973 100644 --- a/arbitrum-docs/stylus/troubleshooting-building-stylus.md +++ b/arbitrum-docs/stylus/troubleshooting-building-stylus.md @@ -5,8 +5,6 @@ user_story: As a developer, I want to understand how to troubleshoot common issu content_type: faq --- -import FAQStructuredDataJsonLd from '@site/src/components/FAQStructuredData'; -import FAQQuestions from '../partials/_troubleshooting-stylus-partial.md'; +import FAQStructuredData from '@site/src/components/FAQStructuredData'; - - + diff --git a/arbitrum-docs/welcome/get-started.md b/arbitrum-docs/welcome/get-started.md index 587f10f22f..5bffc7b4c8 100644 --- a/arbitrum-docs/welcome/get-started.md +++ b/arbitrum-docs/welcome/get-started.md @@ -19,7 +19,7 @@ The Arbitrum suite includes the protocols, chains, services, and SDKs that power | [Arbitrum Rollup](/inside-arbitrum-nitro) | A **protocol** for scaling Ethereum smart contracts. | | [Arbitrum AnyTrust](/inside-anytrust) | A **protocol** for scaling Ethereum smart contracts even further, with a mild trust assumption. | | [Arbitrum Nitro](/inside-arbitrum-nitro) | The node **software** that codifies the Rollup and AnyTrust protocols. | -| [Arbitrum nodes](/run-arbitrum-node/03-run-full-node.md) | **Machines** that run Nitro in order to service and/or interact with an Arbitrum chain. | +| [Arbitrum nodes](/node-running/how-tos/running-a-full-node) | **Machines** that run Nitro in order to service and/or interact with an Arbitrum chain. | | [Arbitrum One](https://portal.arbitrum.io/?chains=arbitrum-one) | A public Rollup **chain**. | | [Arbitrum Nova](https://portal.arbitrum.io/?chains=arbitrum-nova) | A public AnyTrust **chain**. | | [Arbitrum bridge](https://bridge.arbitrum.io/) | Lets you move ETH and ERC-20 tokens between Ethereum, Arbitrum, and select Orbit chains. | @@ -30,11 +30,11 @@ The Arbitrum suite includes the protocols, chains, services, and SDKs that power **Users** interact with Arbitrum either through the Arbitrum bridge or by using dApps that have been deployed to an Arbitrum chain. -| Resource | Description | -| -------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| [Arbitrum bridge](https://bridge.arbitrum.io/) | Lets you move ETH and ERC-20 tokens between Ethereum, Arbitrum, and select Orbit chains. | -| [Arbitrum Portal](https://portal.arbitrum.io/) | A directory of dApps on Arbitrum. | -| [Quickstart (bridge)](/arbitrum-bridge/01-quickstart.md) | Provides step-by-step instructions for first-time bridge users. | +| Resource | Description | +| ---------------------------------------------- | ---------------------------------------------------------------------------------------- | +| [Arbitrum bridge](https://bridge.arbitrum.io/) | Lets you move ETH and ERC-20 tokens between Ethereum, Arbitrum, and select Orbit chains. | +| [Arbitrum Portal](https://portal.arbitrum.io/) | A directory of dApps on Arbitrum. | +| [Quickstart (bridge)](/getting-started-users) | Provides step-by-step instructions for first-time bridge users. | ## Arbitrum for developers @@ -52,7 +52,7 @@ The Arbitrum suite includes the protocols, chains, services, and SDKs that power | Resource | Description | | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| [Run a full node](/run-arbitrum-node/03-run-full-node.md) | Targeted at node runners who want to access Arbitrum chains without having to connect to a third-party node. | +| [Run a full node](/node-running/how-tos/running-a-full-node) | Targeted at node runners who want to access Arbitrum chains without having to connect to a third-party node. | | [Configure a Data Availability Committee](/node-running/how-tos/data-availability-committee/introduction) | Targeted at Data Availability Committee members and Orbit chain operators who want to run a Data Availability Server. | ## Arbitrum for chain operators diff --git a/arbitrum-sdk b/arbitrum-sdk index c8aa61ee10..a0c7147456 160000 --- a/arbitrum-sdk +++ b/arbitrum-sdk @@ -1 +1 @@ -Subproject commit c8aa61ee10c7bb2f622c2603f3d2a81287390d4b +Subproject commit a0c71474569cd6d7331d262f2fd969af953f24ae diff --git a/notion-docs/scripts/update.ts b/notion-docs/scripts/update.ts index 180485bc31..c4f574828b 100644 --- a/notion-docs/scripts/update.ts +++ b/notion-docs/scripts/update.ts @@ -242,7 +242,7 @@ const getContentFromCMS = async (): Promise => { // Renderer for FAQs structured data in JSON const renderJSONFAQStructuredData = (faqs: RenderedKnowledgeItem[]) => { const printItem = (faq: RenderedKnowledgeItem) => { - const faqQuestion = escapeForJSON(faq.titleforSort) + const faqQuestion = escapeForJSON(faq.title) const faqAnswer = escapeForJSON(faq.text) const faqKey = escapeForJSON(faq.key) return `{"question": "${faqQuestion}","answer": "${faqAnswer}","key": "${faqKey}"}` @@ -251,15 +251,6 @@ const renderJSONFAQStructuredData = (faqs: RenderedKnowledgeItem[]) => { return '[\n' + faqs.map(printItem).join(',\n') + '\n]' } -// Renderer for FAQ questions and answers -const renderFAQs = (faqs: RenderedKnowledgeItem[]) => { - const printItem = (faq: RenderedKnowledgeItem) => { - return `### ${faq.title}` + '\n' + `${faq.text}` - } - - return faqs.map(printItem).join('\n') -} - async function generateFiles() { const linkableTerms: LinkableTerms = {} @@ -295,65 +286,35 @@ async function generateFiles() { // FAQs // ---- - // Get started fs.writeFileSync( '../website/static/get-started-faqs.json', renderJSONFAQStructuredData(cmsContents.getStartedFAQs) ) - fs.writeFileSync( - '../arbitrum-docs/partials/_troubleshooting-users-partial.md', - renderFAQs(cmsContents.getStartedFAQs) - ) - // Node running fs.writeFileSync( '../website/static/node-running-faqs.json', renderJSONFAQStructuredData(cmsContents.nodeRunningFAQs) ) - fs.writeFileSync( - '../arbitrum-docs/partials/_troubleshooting-nodes-partial.md', - renderFAQs(cmsContents.nodeRunningFAQs) - ) - // Building fs.writeFileSync( '../website/static/building-faqs.json', renderJSONFAQStructuredData(cmsContents.buildingFAQs) ) - fs.writeFileSync( - '../arbitrum-docs/partials/_troubleshooting-building-partial.md', - renderFAQs(cmsContents.buildingFAQs) - ) - // Stylus fs.writeFileSync( '../website/static/building-stylus-faqs.json', renderJSONFAQStructuredData(cmsContents.buildingStylusFAQs) ) - fs.writeFileSync( - '../arbitrum-docs/partials/_troubleshooting-stylus-partial.md', - renderFAQs(cmsContents.buildingStylusFAQs) - ) - // Orbit fs.writeFileSync( '../website/static/building-orbit-faqs.json', renderJSONFAQStructuredData(cmsContents.orbitFAQs) ) - fs.writeFileSync( - '../arbitrum-docs/partials/_troubleshooting-orbit-partial.md', - renderFAQs(cmsContents.orbitFAQs) - ) - // Bridging fs.writeFileSync( '../website/static/bridging-faqs.json', renderJSONFAQStructuredData(cmsContents.bridgingFAQs) ) - fs.writeFileSync( - '../arbitrum-docs/partials/_troubleshooting-bridging-partial.md', - renderFAQs(cmsContents.bridgingFAQs) - ) } async function main() { diff --git a/vercel.json b/vercel.json index f2e23337c3..2f55e05481 100644 --- a/vercel.json +++ b/vercel.json @@ -1,60 +1,5 @@ { "redirects": [ - { - "source": "/(node-running/reference/arbos-software-releases/arbos20/?)", - "destination": "/run-arbitrum-node/arbos-releases/arbos20", - "permanent": false - }, - { - "source": "/(node-running/reference/arbos-software-releases/arbos11/?)", - "destination": "/run-arbitrum-node/arbos-releases/arbos11", - "permanent": false - }, - { - "source": "/(node-running/reference/arbos-software-releases/overview/?)", - "destination": "/run-arbitrum-node/arbos-releases/overview", - "permanent": false - }, - { - "source": "/(node-running/reference/ethereum-beacon-rpc-providers/?)", - "destination": "/run-arbitrum-node/l1-ethereum-beacon-chain-rpc-providers", - "permanent": false - }, - { - "source": "/(node-running/how-tos/local-dev-node/?)", - "destination": "/run-arbitrum-node/run-local-dev-node", - "permanent": false - }, - { - "source": "/(node-running/how-tos/running-a-full-node/?)", - "destination": "/run-arbitrum-node/run-full-node", - "permanent": false - }, - { - "source": "/(node-running/quickstart-running-a-node/?)", - "destination": "/run-arbitrum-node/quickstart", - "permanent": false - }, - { - "source": "/(node-running/gentle-introduction-run-node/?)", - "destination": "/run-arbitrum-node/overview", - "permanent": false - }, - { - "source": "/(bridge-tokens/concepts/usdc-concept/?)", - "destination": "/arbitrum-bridge/usdc-arbitrum-one", - "permanent": false - }, - { - "source": "/(for-users/troubleshooting-users/?)", - "destination": "/arbitrum-bridge/troubleshooting", - "permanent": false - }, - { - "source": "/(getting-started-users/?)", - "destination": "/arbitrum-bridge/quickstart", - "permanent": false - }, { "source": "/(mainnet-risks/?)", "destination": "/build-decentralized-apps/reference/mainnet-risks", @@ -207,7 +152,7 @@ }, { "source": "/(node-running/reference/software-releases/?)", - "destination": "/run-arbitrum-node/arbos-releases/overview", + "destination": "/node-running/reference/arbos-software-releases/overview", "permanent": false }, { @@ -317,22 +262,22 @@ }, { "source": "/docs/running_node", - "destination": "/run-arbitrum-node/run-full-node", + "destination": "/node-running/how-tos/running-a-full-node", "permanent": false }, { "source": "/docs/running_nitro_node", - "destination": "/run-arbitrum-node/run-full-node", + "destination": "/node-running/how-tos/running-a-full-node", "permanent": false }, { "source": "/docs/running_goerli_nitro_node", - "destination": "/run-arbitrum-node/run-full-node", + "destination": "/node-running/how-tos/running-a-full-node", "permanent": false }, { "source": "/docs/running_rinkeby_nitro_node", - "destination": "/run-arbitrum-node/run-full-node", + "destination": "/node-running/how-tos/running-a-full-node", "permanent": false }, { @@ -357,7 +302,7 @@ }, { "source": "/docs/installation", - "destination": "/run-arbitrum-node/run-full-node", + "destination": "/node-running/how-tos/running-a-full-node", "permanent": false }, { @@ -592,7 +537,7 @@ }, { "source": "/node-running/local-dev-node", - "destination": "/run-arbitrum-node/run-local-dev-node", + "destination": "/node-running/how-tos/local-dev-node", "permanent": false }, { @@ -617,7 +562,7 @@ }, { "source": "/node-running/running-a-node", - "destination": "/run-arbitrum-node/run-full-node", + "destination": "/node-running/how-tos/running-a-full-node", "permanent": false }, { diff --git a/website/i18n/ja/docusaurus-plugin-content-docs/current.json b/website/i18n/ja/docusaurus-plugin-content-docs/current.json index f196ef7ecb..c149d3413a 100644 --- a/website/i18n/ja/docusaurus-plugin-content-docs/current.json +++ b/website/i18n/ja/docusaurus-plugin-content-docs/current.json @@ -165,11 +165,11 @@ }, "sidebar.bridgeTokensSidebar.doc.Quickstart": { "message": "Quickstart", - "description": "The label for the doc item Quickstart in sidebar bridgeTokensSidebar, linking to the doc arbitrum-bridge/quickstart" + "description": "The label for the doc item Quickstart in sidebar bridgeTokensSidebar, linking to the doc getting-started-users" }, "sidebar.bridgeTokensSidebar.doc.Troubleshooting": { "message": "Troubleshooting", - "description": "The label for the doc item Troubleshooting in sidebar bridgeTokensSidebar, linking to the doc arbitrum-bridge/troubleshooting" + "description": "The label for the doc item Troubleshooting in sidebar bridgeTokensSidebar, linking to the doc for-users/troubleshooting-users" }, "sidebar.runNodesSidebar.category.Get started": { "message": "Get started", @@ -185,11 +185,11 @@ }, "sidebar.runNodesSidebar.doc.A gentle introduction": { "message": "A gentle introduction", - "description": "The label for the doc item A gentle introduction in sidebar runNodesSidebar, linking to the doc run-arbitrum-node/overview" + "description": "The label for the doc item A gentle introduction in sidebar runNodesSidebar, linking to the doc node-running/gentle-introduction-run-node" }, "sidebar.runNodesSidebar.doc.Quickstart": { "message": "Quickstart", - "description": "The label for the doc item Quickstart in sidebar runNodesSidebar, linking to the doc run-arbitrum-node/quickstart" + "description": "The label for the doc item Quickstart in sidebar runNodesSidebar, linking to the doc node-running/quickstart-running-a-node" }, "sidebar.runNodesSidebar.doc.Troubleshooting": { "message": "Troubleshooting", diff --git a/website/i18n/zh/docusaurus-plugin-content-docs/current.json b/website/i18n/zh/docusaurus-plugin-content-docs/current.json index b70f95c96b..c149d3413a 100644 --- a/website/i18n/zh/docusaurus-plugin-content-docs/current.json +++ b/website/i18n/zh/docusaurus-plugin-content-docs/current.json @@ -159,13 +159,17 @@ "message": "More", "description": "The label for category More in sidebar bridgeTokensSidebar" }, + "sidebar.bridgeTokensSidebar.doc.A gentle introduction": { + "message": "A gentle introduction", + "description": "The label for the doc item A gentle introduction in sidebar bridgeTokensSidebar, linking to the doc bridge-tokens/gentle-introduction-bridge" + }, "sidebar.bridgeTokensSidebar.doc.Quickstart": { "message": "Quickstart", - "description": "The label for the doc item Quickstart in sidebar bridgeTokensSidebar, linking to the doc arbitrum-bridge/quickstart" + "description": "The label for the doc item Quickstart in sidebar bridgeTokensSidebar, linking to the doc getting-started-users" }, "sidebar.bridgeTokensSidebar.doc.Troubleshooting": { "message": "Troubleshooting", - "description": "The label for the doc item Troubleshooting in sidebar bridgeTokensSidebar, linking to the doc arbitrum-bridge/troubleshooting" + "description": "The label for the doc item Troubleshooting in sidebar bridgeTokensSidebar, linking to the doc for-users/troubleshooting-users" }, "sidebar.runNodesSidebar.category.Get started": { "message": "Get started", @@ -181,11 +185,11 @@ }, "sidebar.runNodesSidebar.doc.A gentle introduction": { "message": "A gentle introduction", - "description": "The label for the doc item A gentle introduction in sidebar runNodesSidebar, linking to the doc run-arbitrum-node/overview" + "description": "The label for the doc item A gentle introduction in sidebar runNodesSidebar, linking to the doc node-running/gentle-introduction-run-node" }, "sidebar.runNodesSidebar.doc.Quickstart": { "message": "Quickstart", - "description": "The label for the doc item Quickstart in sidebar runNodesSidebar, linking to the doc run-arbitrum-node/quickstart" + "description": "The label for the doc item Quickstart in sidebar runNodesSidebar, linking to the doc node-running/quickstart-running-a-node" }, "sidebar.runNodesSidebar.doc.Troubleshooting": { "message": "Troubleshooting", diff --git a/website/sidebars.js b/website/sidebars.js index 044094d405..bc34684e21 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -284,16 +284,6 @@ const sidebars = { id: 'launch-orbit-chain/how-tos/customize-stf', label: `Customize your chain's behavior`, }, - { - type: 'doc', - id: 'launch-orbit-chain/how-tos/orbit-chain-finality', - label: `Configure delayed inbox finality`, - }, - { - type: 'doc', - id: 'launch-orbit-chain/how-tos/manage-fee-collectors', - label: `Manage the fee collectors`, - }, ], }, { @@ -304,9 +294,11 @@ const sidebars = { { type: 'html', value: - 'ArbOS software releases', + 'ArbOS software releases', // q: why use an anchor html tag here? - // a: see note at end of file + // a: because this page lives in multiple sidebar sections, we pick one to be the "canonical" location for the page in the sidebar + // if we link to them both via id or standard href, multiple sections of the sidebar will be opened at once when the user visits this page; we don't want that + // if we use a fully qualified link, localhost won't work }, { type: 'doc', @@ -352,21 +344,6 @@ const sidebars = { id: 'launch-orbit-chain/concepts/custom-gas-token-sdk', label: 'Custom gas token SDK', }, - { - type: 'doc', - id: 'launch-orbit-chain/concepts/public-preview-expectations', - label: 'Public preview', - }, - { - type: 'doc', - id: 'launch-orbit-chain/infra-options-orbit-chains', - label: 'Third-party infrastructure providers', - }, - { - type: 'doc', - id: 'launch-orbit-chain/troubleshooting-building-orbit', - label: 'FAQ', - }, { type: 'category', label: 'Orbit SDK', @@ -374,41 +351,36 @@ const sidebars = { items: [ { type: 'doc', - id: 'launch-orbit-chain/orbit-sdk-introduction', - label: `Introduction`, - }, - { - type: 'doc', - id: 'launch-orbit-chain/how-tos/orbit-sdk-deploying-rollup-chain', - label: `Rollup Orbit Deployment`, - }, - { - type: 'doc', - id: 'launch-orbit-chain/how-tos/orbit-sdk-deploying-anytrust-chain', - label: `AnyTrust Orbit Deployment`, - }, - { - type: 'doc', - id: 'launch-orbit-chain/how-tos/orbit-sdk-deploying-custom-gas-token-chain', - label: `Custom Gas Token Orbit Deployment`, + id: 'launch-orbit-chain/orbit-sdk-deploying-orbit-chain', + label: 'Introduction', }, { - type: 'doc', - id: 'launch-orbit-chain/how-tos/orbit-sdk-preparing-node-config', - label: `Node Config Generation`, + type: 'link', + label: 'Rollup chain', + href: '/launch-orbit-chain/orbit-sdk-deploying-orbit-chain?current-chain=rollup-chain', }, { - type: 'doc', - id: 'launch-orbit-chain/how-tos/orbit-sdk-deploying-token-bridge', - label: `Token bridge deployment`, + type: 'link', + label: 'AnyTrust chain', + href: '/launch-orbit-chain/orbit-sdk-deploying-orbit-chain?current-chain=anytrust-chain', }, { - type: 'doc', - id: 'launch-orbit-chain/how-tos/orbit-sdk-configuring-orbit-chain', - label: `Orbit Chain Configuration`, + type: 'link', + label: 'Custom token chain', + href: '/launch-orbit-chain/orbit-sdk-deploying-orbit-chain?current-chain=custom-token-chain', }, ], }, + { + type: 'doc', + id: 'launch-orbit-chain/concepts/public-preview-expectations', + label: 'Public preview', + }, + { + type: 'doc', + id: 'launch-orbit-chain/troubleshooting-building-orbit', + label: 'FAQ', + }, ], }, { @@ -510,25 +482,25 @@ const sidebars = { items: [ { type: 'doc', - id: 'run-arbitrum-node/overview', + id: 'node-running/gentle-introduction-run-node', label: 'Overview', }, { type: 'doc', - id: 'run-arbitrum-node/quickstart', + id: 'node-running/quickstart-running-a-node', label: 'Quickstart', }, { type: 'doc', - id: 'run-arbitrum-node/run-full-node', + id: 'node-running/how-tos/running-a-full-node', label: 'Run a full node', }, { type: 'doc', - id: 'run-arbitrum-node/run-local-dev-node', + id: 'node-running/how-tos/local-dev-node', label: 'Run a local dev node', }, - { + { type: 'html', value: 'Run a full Orbit node ', @@ -537,27 +509,27 @@ const sidebars = { }, { type: 'doc', - id: 'run-arbitrum-node/l1-ethereum-beacon-chain-rpc-providers', + id: 'node-running/reference/ethereum-beacon-rpc-providers', label: 'L1 Ethereum RPC providers', }, { type: 'category', - label: 'ArbOS software releases', + label: 'Customize your chain', collapsed: true, items: [ { type: 'doc', - id: 'run-arbitrum-node/arbos-releases/overview', + id: 'node-running/reference/arbos-software-releases/overview', label: 'Overview', }, { type: 'doc', - id: 'run-arbitrum-node/arbos-releases/arbos20', + id: 'node-running/reference/arbos-software-releases/arbos20', label: 'ArbOS 20 Atlas', }, { type: 'doc', - id: 'run-arbitrum-node/arbos-releases/arbos11', + id: 'node-running/reference/arbos-software-releases/arbos11', label: 'ArbOS 11', }, ], @@ -669,18 +641,18 @@ const sidebars = { items: [ { type: 'doc', - id: 'arbitrum-bridge/quickstart', + id: 'getting-started-users', label: 'Quickstart', }, { type: 'doc', - id: 'arbitrum-bridge/usdc-arbitrum-one', - label: 'USDC on Arbitrum One', + id: 'for-users/troubleshooting-users', + label: 'Troubleshooting', }, { type: 'doc', - id: 'arbitrum-bridge/troubleshooting', - label: 'Troubleshooting', + id: 'bridge-tokens/concepts/usdc-concept', + label: 'USDC on Arbitrum One', }, ], }, @@ -820,47 +792,6 @@ const sidebars = { }, ], }, - { - type: 'category', - label: 'The BOLD dispute protocol', - items: [ - { - type: 'doc', - id: 'bold/bold-gentle-introduction', - label: 'A gentle introduction', - }, - { - type: 'link', - href: 'https://github.com/offchainlabs/bold-validator-starter-kit', - label: 'Deploy a validator on testnet', - }, - { - type: 'link', - href: 'https://arxiv.org/abs/2404.10491', - label: 'BOLD Whitepaper', - }, - { - type: 'link', - href: 'https://github.com/OffchainLabs/bold/blob/main/docs/research-specs/TechnicalDeepDive.pdf', - label: 'Technical deep dive', - }, - { - type: 'link', - href: 'https://github.com/OffchainLabs/bold/blob/main/docs/research-specs/Economics.pdf', - label: 'Economics of disputes', - }, - { - type: 'link', - href: 'https://github.com/OffchainLabs/bold', - label: 'Specification on Github', - }, - { - type: 'doc', - id: 'bold/concepts/public-preview-expectations', - label: 'Public preview', - }, - ], - }, ], }, ], diff --git a/website/src/components/FAQStructuredData/index.js b/website/src/components/FAQStructuredData/index.js index 43c9b4e882..d0b133a41b 100644 --- a/website/src/components/FAQStructuredData/index.js +++ b/website/src/components/FAQStructuredData/index.js @@ -39,7 +39,6 @@ export default function FAQStructuredData(props) { const faqStructuredData = { '@context': 'https://schema.org', '@type': 'FAQPage', - 'name': 'FAQs for ' + props.faqsId, 'mainEntity': faqs.map((faq) => ({ '@type': 'Question', 'name': faq.question, @@ -58,16 +57,15 @@ export default function FAQStructuredData(props) { dangerouslySetInnerHTML={{ __html: JSON.stringify(faqStructuredData) }} /> - {props.renderFaqs && - faqs.map((faq) => ( -
                  -

                  - {faq.question} - -

                  -
                  -
                  - ))} + {faqs.map((faq) => ( +
                  +

                  + {faq.question} + +

                  +
                  +
                  + ))} ); } diff --git a/website/src/components/FAQStructuredData/types.d.ts b/website/src/components/FAQStructuredData/types.d.ts index 6d4526c684..77c8fa0379 100644 --- a/website/src/components/FAQStructuredData/types.d.ts +++ b/website/src/components/FAQStructuredData/types.d.ts @@ -5,16 +5,7 @@ export interface FAQ { } export interface FAQStructuredDataProps { - /** - * Identifier used to find the correct json file - * (The JSON file should live in /website/static/{faqsId}-faqs.json) - */ faqsId: string; - /** - * Whether or not to also return the text of the questions - * (By default it will only return the JSON-LD object inside a script tag) - */ - renderFaqs?: boolean; } export interface FAQStructuredData { diff --git a/website/src/components/HomepageFeatures/index.tsx b/website/src/components/HomepageFeatures/index.tsx index d44ce5d383..cabdb0537e 100644 --- a/website/src/components/HomepageFeatures/index.tsx +++ b/website/src/components/HomepageFeatures/index.tsx @@ -27,13 +27,13 @@ const FeatureList: FeatureItem[] = [ { title: 'Quickstart: Run a node', Svg: require('@site/static/img/node.svg').default, - href: '/run-arbitrum-node/quickstart', + href: '/node-running/quickstart-running-a-node', description: 'Learn how to run a node to interact with any Arbitrum network.', }, { title: 'Quickstart: Bridge tokens', Svg: require('@site/static/img/bridge_token.svg').default, - href: '/arbitrum-bridge/quickstart', + href: '/getting-started-users', description: "Learn how to transfer tokens between Ethereum's L1 chain and Arbitrum's L2 chains using Arbitrum Bridge.", }, diff --git a/website/src/css/partials/_dynamic-content-tabs-toc.scss b/website/src/css/partials/_dynamic-content-tabs-toc.scss new file mode 100644 index 0000000000..a24b7aded7 --- /dev/null +++ b/website/src/css/partials/_dynamic-content-tabs-toc.scss @@ -0,0 +1,101 @@ +/* used to hide all but the topmost tabs when using the multidimensional content widget */ + +@mixin hidden { + visibility: hidden !important; + height: 0 !important; + overflow: hidden; + margin: 0 !important; + padding: 0 !important; +} + +.hide-tabs .tabs { + @include hidden; +} + +.dynamic-content-tabs { + position: relative; + margin-bottom: 25px; + + .tabgroup { + font-size: 13px; + font-weight: 500; + border: 1px solid transparent; + border-radius: 5px; + overflow: hidden; + position: static; + margin-bottom: 10px; + + .tabs__item { + font-size: 13px; + font-weight: 500; + border-top: 1px solid var(--tab-gray); + border-bottom: 1px solid var(--tab-gray); + padding: 10px 15px; + border-radius: 0px !important; + position: relative; + + &:first-child { + border-top-left-radius: 5px !important; + border-bottom-left-radius: 5px !important; + border-left: 1px solid var(--tab-gray); + border-top: 1px solid var(--tab-gray); + border-bottom: 1px solid var(--tab-gray); + border-right: 0px; + } + + &:last-child { + border-top-right-radius: 5px !important; + border-bottom-right-radius: 5px !important; + border-right: 1px solid var(--tab-gray); + border-top: 1px solid var(--tab-gray); + border-bottom: 1px solid var(--tab-gray); + border-left: 0px; + } + + &.tabs__item--active { + font-size: 13px; + font-weight: 500; + background-color: var(--tab-active-color) !important; + border-color: var(--tab-active-color) !important; + color: white !important; + } + + &.disabled-tab { + color: #999 !important; + } + } + + &:after { + font-size: 13px; + font-weight: 500; + padding: 10px 15px; + position: relative; + border-color: transparent !important; + transition: all 0.15s linear; + background: transparent; + color: transparent; + display: inline-block; + content: 'Content updated!'; + } + + &.updated { + &:after { + color: var(--tab-active-color); + } + } + } + + .tabgroup-with-label { + @extend .tabgroup; + + .tabs__item { + &:nth-child(2) { + border-top-left-radius: 5px !important; + border-bottom-left-radius: 5px !important; + border-left: 1px solid var(--tab-gray); + border-right: 0px !important; + z-index: 2; + } + } + } +} diff --git a/website/src/css/partials/_quickstart.scss b/website/src/css/partials/_quickstart.scss new file mode 100644 index 0000000000..fcee0c2624 --- /dev/null +++ b/website/src/css/partials/_quickstart.scss @@ -0,0 +1,161 @@ +:root { + --prysm-pink: #c72a7d; + --tab-active-color: #3578e5; + --tab-active-color-hover: hsl(217, 58%, 36%); + --tab-gray: #ddd; + --prysm-pink-light: #da77ab; +} +html[data-theme="dark"] { + --prysm-pink: var(--prysm-pink-light); + --tab-gray: #aaa; +} +html[data-theme="dark"] .quickstart-tabs .tabs__item:first-child { + color: #eee; +} +html[data-theme="dark"] .quickstart-tabs .tabs__item:first-child:hover { + background-color: transparent !important; +} +html[data-theme="dark"] .troubleshooting-report-area > span { + color: #ddd !important; +} +.navbar__link--active { + color: var(--prysm-pink-light) !important; +} +.hidden, +.hide-tabs, +.quickstart .hidden-in-quickstart, +.jwt-guide .hidden-in-jwt-guide, +.mergeprep-guide .hidden-in-mergeprep-guide, +.docker-guide .hidden-in-docker-guide, +.status-guide .enbn-tabgroup, +.status-guide .hidden-in-status-guide, +.execution-node-guide .hidden-in-execution-guide, +.bazel-guide .os-tabgroup, +.bazel-guide .enbn-tabgroup, +.bazel-guide .el-tabgroup, +.port-guide .enbn-tabgroup, +.port-guide .network-tabgroup, +.port-guide .el-tabgroup { + visibility: hidden !important; + height: 0 !important; + overflow: hidden; + margin: 0 !important; + padding: 0 !important; +} +.port-guide .quickstart-tabs { + margin-bottom: 5px !important; +} +.port-guide .tabgroup-with-label::after { + display: none !important; +} +.quickstart-tabs, +.quickstart-tabs .tabgroup-with-label, +.quickstart-tabs .tabgroup-with-label .tabs__item { + font-size: 13px; + font-weight: 500; +} +.quickstart-tabs { + position: relative; + margin-bottom: 25px; +} +.quickstart-tabs .tabgroup-with-label { + border: 1px solid transparent; + border-radius: 5px; + overflow: hidden; + position: static; + margin-bottom: 10px; +} +.quickstart-tabs .tabgroup-with-label .tabs__item { + border-top: 1px solid var(--tab-gray); + border-bottom: 1px solid var(--tab-gray); + padding: 10px 15px; + border-radius: 0px !important; + position: relative; +} +.quickstart-tabs .tabgroup-with-label .tabs__item:first-child { + cursor: default !important; + color: black; + width: 150px; + border: 1px solid transparent !important; + border-right: 0px !important; +} +.quickstart-tabs .tabgroup-with-label .tabs__item:first-child:hover { + background-color: transparent !important; + cursor: default !important; +} +.quickstart-tabs .tabgroup-with-label .tabs__item:nth-child(2) { + border-top-left-radius: 5px !important; + border-bottom-left-radius: 5px !important; + border-left: 1px solid var(--tab-gray); + border-right: 0px !important; + z-index: 2; +} +.quickstart-tabs .tabgroup-with-label .tabs__item:last-child { + border-top-right-radius: 5px !important; + border-bottom-right-radius: 5px !important; + border-right: 1px solid var(--tab-gray); + border-top: 1px solid var(--tab-gray); + border-bottom: 1px solid var(--tab-gray); + border-left: 0px; +} +.quickstart-tabs .tabgroup-with-label .tabs__item.tabs__item--active { + background-color: var(--tab-active-color) !important; + border-color: var(--tab-active-color) !important; + color: white !important; +} +.quickstart-tabs .tabgroup-with-label .tabs__item.disabled-tab { + color: #999 !important; +} +.quickstart-tabs .tabgroup-with-label:after { + padding: 10px 15px; + position: relative; + border-color: transparent !important; + transition: all 0.15s linear; + background: transparent; + color: transparent; + display: inline-block; + content: "Content updated!"; +} +.quickstart-tabs .tabgroup-with-label.updated:after { + color: var(--tab-active-color); +} +.troubleshooting-report-area { + text-align: left; +} +.troubleshooting-report-area > p { + font-weight: bold; + margin-bottom: 0; + margin-top: 0; + font-size: 16px; +} +.troubleshooting-report-area > span { + display: block; + margin-bottom: 0; + margin-top: 0; + font-size: 13px; + color: #333; +} +.troubleshooting-report-area > textarea { + -ms-overflow-style: none; + /* for Internet Explorer, Edge */ + scrollbar-width: none; + /* for Firefox */ + overflow-x: scroll; + padding: 15px; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", + "Courier New", monospace; + background-color: #f6f6f6; + color: #444 !important; + text-align: left; + border-radius: 5px; + margin-top: 5px; + margin-bottom: 20px; + width: 100%; + min-width: 100%; + border: 1px solid #c2c2c2 !important; + white-space: pre; +} +.troubleshooting-report-area > textarea::-webkit-scrollbar { + display: none; + /* for Chrome, Safari, and Opera */ +} diff --git a/website/src/css/partials/_sidebar.scss b/website/src/css/partials/_sidebar.scss index aa339b3a26..575914c542 100644 --- a/website/src/css/partials/_sidebar.scss +++ b/website/src/css/partials/_sidebar.scss @@ -30,6 +30,8 @@ $child-sidebar-item-font-size: 14px; > div.menu__list-item-collapsible > a.menu__link, > a.menu__link { font-size: $root-sidebar-item-font-size; + + } } @@ -45,12 +47,12 @@ $child-sidebar-item-font-size: 14px; } &.menu__link--active { - font-weight: 600; + font-weight: 600; } - .other-section-icon { - margin-left: auto; - margin-right: 5px; + .other-section-icon{ + margin-left: auto; + margin-right: 5px; margin-top: -2px; opacity: 0.6; font-size: 17px; diff --git a/website/src/scripts/move-untranslated-files.ts b/website/src/scripts/move-untranslated-files.ts index 279486c184..1e5bb47d25 100644 --- a/website/src/scripts/move-untranslated-files.ts +++ b/website/src/scripts/move-untranslated-files.ts @@ -24,7 +24,7 @@ const getFiles = async (dir: string) => { }), ); return files.reduce((a, f) => a.concat(f), []); -}; +} const getTranslatedFiles = async (filePath: string) => { const translatedRoot = 'docusaurus-plugin-content-docs/translated/'; @@ -36,15 +36,9 @@ const getUnTranslatedFiles = async () => { return await getFiles(docsPath); }; -const putTogether = async ( - translateFiles: string[], - untranslatedFiles: string[], - language: string, -) => { +const putTogether = async (translateFiles: string[], untranslatedFiles: string[], language: string) => { const outputFilesMap = new Map(); - const translatedRoot = resolve( - './i18n/' + language + '/docusaurus-plugin-content-docs/translated', - ); + const translatedRoot = resolve('./i18n/' + language +'/docusaurus-plugin-content-docs/translated'); const unTranslatedRoot = resolve('../arbitrum-docs'); translateFiles.forEach((file) => { const key = file.replace(translatedRoot, '');