# OP-Stack

{% hint style="info" %}
GitHub access for Elder is currently limited to early partner projects and may not be available to everyone.
{% endhint %}

{% hint style="info" %}
The documentation may be outdated due to rapid development. Expect improvements as the code goes public and the project approaches its internal testnet phase.
{% endhint %}

### Steps for running an op-stack rollup with ELDER

* Ensure your op-stack rollup is operational. For thoroughness, verify that both the batcher and proposer have sufficient funding.
* When not utilizing an existing internal devnet, a private Elder Node can be set up by following these steps - [Run an ELDER Node](/elder-docs/architecture/run-an-elder-node.md)

{% hint style="info" %}
Make sure the ports of machines for Elder ( 1317, 26657, 9090 ) and Op-stack (8545, 8546 ) are public.
{% endhint %}

### Register a rollup on Elder Chain

* **Register the rollup on Elder.**

{% code overflow="wrap" %}

```bash
elderd tx registration register [executor] [name] [min-tx-fess] [max-txs] [stack] [data-layer] [stake] [flags]
```

{% endcode %}

* **Pull latest tags/main from 0xElder github and build their binaries.**

{% embed url="<https://github.com/0xElder/optimism.git>" %}
0xelder/optimism
{% endembed %}

{% embed url="<https://github.com/0xElder/op-geth>" %}
0xelder/op-geth
{% endembed %}

* Build their binaries and replace with the original OP binaries.

**Restart op-geth with the following additional command flags :**

{% code overflow="wrap" %}

```bash
--rollup.disabletxpoolgossip=true --elder-seq --elder-seq-url=<Elder MACHINE IP>:9090 --elder-roll-id=<Rollup ID during registration> --elder-executor=<Elder executer private key> --elder-roll-start-block=<rollup geth block when the Elder connection should establish i.e. hardfork >
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://elder-2.gitbook.io/elder-docs/integrations/op-stack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
