Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nvm install in Makefile #357

Open
wants to merge 81 commits into
base: celestia-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
6ce4e61
da: use celestia as da
tuxcanfly Apr 21, 2023
2de5055
batcher: fix duplicate cli flag name
tuxcanfly Apr 25, 2023
a1bc96f
docker: use latest devnet image
tuxcanfly Apr 26, 2023
e5765c9
bump local celestia devnet to 0.9.1
tuxcanfly Apr 26, 2023
b245643
docker: wait for da to boot
tuxcanfly Apr 27, 2023
9d55c78
op-ndoe: decodeeETHData - use uint32 for height
tuxcanfly Apr 27, 2023
a4ab863
proposer: fix da rpc, estimate gas
tuxcanfly Apr 28, 2023
98a8553
op-node: fix failed to parse frame error
tuxcanfly Apr 28, 2023
ad653ba
proposer: fix revert
tuxcanfly May 2, 2023
30721f9
proposer: restore gas limit; add explanation
tuxcanfly May 3, 2023
a4ebf2e
proposer: nit
tuxcanfly May 3, 2023
1115643
add celestia logo, update readme
jcstein May 3, 2023
503e69c
Update README.md
jcstein May 3, 2023
d79c24d
style size
jcstein May 3, 2023
7efa76e
plus not x
jcstein May 3, 2023
32f84ba
docs: edit intro
jcstein May 3, 2023
b19aaf7
Update README.md
jcstein May 3, 2023
5b22038
Update README.md
jcstein May 3, 2023
194f4a7
nit
jcstein May 3, 2023
9566df8
docs: add section on deposit bridge
jcstein May 3, 2023
f4fbf6c
add workaround from @Ferret-san
jcstein May 3, 2023
1f8894e
close code block
jcstein May 3, 2023
fdbb754
fix: typo
jcstein May 3, 2023
a8f66af
Update README.md
jcstein May 4, 2023
1c79ab0
docs: add bridging section from guidance from @Ferret-san
jcstein May 4, 2023
8306caa
deps: bump local-devnet to 0.9.2
jcstein May 4, 2023
1d8468f
docker: fix da container name
tuxcanfly May 4, 2023
0e6a8a8
op-node: gracefully retry da connection err
tuxcanfly May 10, 2023
2af6839
test: update e2e tests for celestia da
tuxcanfly May 15, 2023
1911b40
docs: update readme
jcstein May 15, 2023
f2073d8
deps: update local-celestia-devnet to v0.9.5
jcstein May 15, 2023
5ca0497
Add DALC support (#47)
jcstein May 17, 2023
75b2dbf
fix: update path to node store (#52)
jcstein May 19, 2023
7a28e92
devnet: increase block times (#50)
tuxcanfly May 19, 2023
21d4b03
deps: bump celestia-node & local-celestia-devnet image version to v0.…
jcstein May 23, 2023
3a41a52
op-node: log namespaced data details (#94)
tuxcanfly May 23, 2023
029b951
Dependabot and Fork Sync (#93)
MSevey May 24, 2023
adecbc0
fix: resolve `max_subscriptions` and` share sequence` errors (#120)
jcstein May 26, 2023
9a3d941
docs: add wiki to README
jcstein May 30, 2023
5533b8e
proposer: allow non finalized true -> false (#133)
tuxcanfly Jun 1, 2023
e336a81
deps: update to node RC for Arabica (#132)
jcstein Jun 1, 2023
7b442b2
deps: bump celestia-node to v0.11.0-rc2 (#137)
jcstein Jun 5, 2023
4c74de1
deps: remove trailing slash (#139)
jcstein Jun 5, 2023
4e81f22
op-node: continue on retrieval error (#142)
tuxcanfly Jun 6, 2023
9a39bf8
op-node: calldata source - reset pipeline on err (#144)
tuxcanfly Jun 7, 2023
3104137
op-node: da-rpc, namespace-id - use environment flags (#158)
tuxcanfly Jul 10, 2023
c6dd813
testnet: update node rc, flags for arabica-9 (#157)
tuxcanfly Jul 10, 2023
0c0fcb5
devnet: bump local-celestia-devnet to v0.11.0-rc6 (#168)
tuxcanfly Jul 15, 2023
08cf2f9
deps: local-celestia-devnet -> v0.11.0-rc8 (#175)
jcstein Jul 19, 2023
1690468
da: use celestia-openrpc (#187)
tuxcanfly Jul 21, 2023
88b2e8d
docker: testnet add debug log flag (#189)
tuxcanfly Jul 24, 2023
2b11438
da: celestia-openrpc - use blob commitment (#196)
tuxcanfly Aug 11, 2023
5063d9d
da: use celestia da; update config
tuxcanfly Oct 3, 2023
ed767d9
da: go mod tidy
tuxcanfly Nov 2, 2023
d0bf27c
da: update devnet docker-compose.yml
tuxcanfly Nov 2, 2023
38ab6c3
da: fix devnet script; op-stack-go docker; op-celestia
tuxcanfly Nov 2, 2023
aea9df4
.github: update base repo owner (#223)
tuxcanfly Oct 13, 2023
3b38e92
.github: fix base branch (#226)
tuxcanfly Oct 16, 2023
8571293
op-server: bump celestia-openrpc to v0.3.0
tuxcanfly Nov 3, 2023
081a4cd
go mod tidy
tuxcanfly Nov 7, 2023
051f67e
chore: update devnet version to v0.12.1 (#245)
jcstein Nov 14, 2023
85e098d
da: move batcher changes from op-service to batcher/driver
tuxcanfly Nov 13, 2023
6174298
da: celestia-openrpc -> celestia-da
tuxcanfly Nov 16, 2023
41574b9
da: log blob submit and request
tuxcanfly Nov 17, 2023
2b36749
da: log prefix
tuxcanfly Nov 17, 2023
a713ae6
da: reuse rollup config for da rpc url
tuxcanfly Nov 17, 2023
3e09143
da: use env var for da rpc url
tuxcanfly Nov 21, 2023
f42f6a9
da: update local celestia devnet image
tuxcanfly Nov 21, 2023
02cb311
da: reuse da client; bump local celestia devnet version
tuxcanfly Nov 26, 2023
d9ec86a
da: move da client to new file; fix devnet version
tuxcanfly Nov 26, 2023
2690670
da: rpc - default to localhost
tuxcanfly Nov 27, 2023
e4e0ecb
da: bump local-celestia-devnet:v0.12.2
tuxcanfly Nov 27, 2023
aa4f95b
da: update README
tuxcanfly Nov 27, 2023
8479d95
da: rm op-celestia
tuxcanfly Nov 27, 2023
a98e7f8
da: calldata version prefix, eth fallback
tuxcanfly Nov 27, 2023
f88e4a2
da: wait for grpc port
tuxcanfly Nov 28, 2023
b00ef68
chore: bump dependencies
tuxcanfly Jan 12, 2024
e4d22fe
build(deps): update go-da to v0.1.0
tuxcanfly Jan 12, 2024
9f21d29
build(deps): update go-da to v0.2.0; add ctx
tuxcanfly Jan 12, 2024
f1b4c28
da: add cli flags for da config
tuxcanfly Jan 13, 2024
ed0e328
Add `nvm install` in Makefile
AbhinavMir Feb 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version: 2
updates:
# Check for updates on our docker image and for celestia-node
- package-ecosystem: docker
directory: "/ops-bedrock"
schedule:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/fork-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Sync Fork

on:
schedule:
- cron: '*/30 * * * *' # every 30 minutes
workflow_dispatch: # on button click

jobs:
sync:

runs-on: ubuntu-latest

steps:
- uses: tgymnich/[email protected]
with:
base: celestia-develop
head: develop
token: ${{ secrets.REPO_PAT }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ lint-go:

build-ts: submodules
if [ -n "$$NVM_DIR" ]; then \
. $$NVM_DIR/nvm.sh && nvm use; \
. $$NVM_DIR/nvm.sh && nvm install && nvm use; \
fi
pnpm install
pnpm build
Expand Down
91 changes: 72 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,100 @@
<br />
<br />
<a href="https://optimism.io"><img alt="Optimism" src="https://raw.githubusercontent.com/ethereum-optimism/brand-kit/main/assets/svg/OPTIMISM-R.svg" width=600></a>
<h3><a href="https://optimism.io">Optimism</a> is a low-cost and lightning-fast Ethereum L2 blockchain, built with the OP Stack.</h3>
<br />
<h3><a href="https://optimism.io">Optimism</a> is Ethereum, scaled.</h3>
<h3>+</h3>
<a href="https://celestia.org"><img alt="Celestia" src="docs/op-stack/src/assets/docs/understand/Celestia-logo-color-color.svg" width=600></a>
<h3><a href="https://celestia.org">Celestia</a> is a modular data availability network that securely scales with the number of users, making it easy for anyone to launch their own blockchain.</h3>
<br />
</div>

## What is Optimism?
## Celestia + OP Stack tutorial

If you're looking to run the OP Stack + Celestia setup for this repository, please visit the [Optimism & Celestia guides and tutorials](https://docs.celestia.org/developers/intro-to-op-stack/) to get started.

## What are Optimism and the OP Stack?

[Optimism](https://www.optimism.io/) is a project dedicated to scaling Ethereum's technology and expanding its ability to coordinate people from across the world to build effective decentralized economies and governance systems. The [Optimism Collective](https://app.optimism.io/announcement) builds open-source software for running L2 blockchains and aims to address key governance and economic challenges in the wider cryptocurrency ecosystem. Optimism operates on the principle of **impact=profit**, the idea that individuals who positively impact the Collective should be proportionally rewarded with profit. **Change the incentives and you change the world.**

In this repository, you'll find numerous core components of the OP Stack, the decentralized software stack maintained by the Optimism Collective that powers Optimism and forms the backbone of blockchains like [OP Mainnet](https://explorer.optimism.io/) and [Base](https://base.org). Designed to be "aggressively open source," the OP Stack encourages you to explore, modify, extend, and test the code as needed. Although not all elements of the OP Stack are contained here, many of its essential components can be found within this repository. By collaborating on free, open software and shared standards, the Optimism Collective aims to prevent siloed software development and rapidly accelerate the development of the Ethereum ecosystem. Come contribute, build the future, and redefine power, together.
The OP Stack powers Optimism, an Ethereum L2 blockchain, and forms the technical foundation for the [the Optimism Collective](https://app.optimism.io/announcement)—a group committed to the **impact=profit** principle. This principle rewards individuals for their positive contributions to the collective.

Optimism addresses critical coordination failures in the crypto ecosystem, such as funding public goods and infrastructure. The OP Stack focuses on creating a shared, open-source system for developing new L2 blockchains within the proposed Superchain ecosystem, promoting collaboration and preventing redundant efforts.

As Optimism evolves, the OP Stack will adapt, encompassing components ranging from blockchain infrastructure to governance systems. This software suite aims to simplify L2 blockchain creation while supporting the growth and development of the Optimism ecosystem.

## What is Celestia?

Celestia is a modular consensus and data network, built to enable anyone to easily deploy their own blockchain with minimal overhead.

Celestia is a minimal blockchain that only orders and publishes transactions and does not execute them. By decoupling the consensus and application execution layers, Celestia modularizes the blockchain technology stack and unlocks new possibilities for decentralized application builders. Lean more at [Celestia.org](https://celestia.org).

## Maintenance

The maintenance guide for this repository can be found in the Wiki tab of the repository or [here](https://github.com/celestiaorg/optimism/wiki).

## Documentation

- If you want to build on top of OP Mainnet, refer to the [Optimism Community Hub](https://community.optimism.io)
- If you want to build your own OP Stack based blockchain, refer to the [OP Stack docs](https://stack.optimism.io)
- If you want to contribute to the OP Stack, check out the [Protocol Specs](./specs)
If you want to build on top of Celestia, take a look at the documentation at [docs.celestia.org](https://docs.celestia.org).

If you want to learn more about the OP Stack, check out the documentation at [stack.optimism.io](https://stack.optimism.io/).

## Community

### Optimism

General discussion happens most frequently on the [Optimism discord](https://discord.gg/optimism).
Governance discussion can also be found on the [Optimism Governance Forum](https://gov.optimism.io/).

## Contributing
### Celestia

Read through [CONTRIBUTING.md](./CONTRIBUTING.md) for a general overview of the contributing process for this repository.
General discussion happens most frequently on the [Celestia discord](https://discord.com/invite/YsnTPcSfWQ).
Other discussions can be found on the [Celestia forum](https://forum.celestia.org).

<!-- ## Contributing

Read through [CONTRIBUTING.md](./CONTRIBUTING.md) for a general overview of our contribution process.
Use the [Developer Quick Start](./CONTRIBUTING.md#development-quick-start) to get your development environment set up to start working on the Optimism Monorepo.
Then check out the list of [Good First Issues](https://github.com/ethereum-optimism/optimism/contribute) to find something fun to work on!
Then check out our list of [good first issues](https://github.com/ethereum-optimism/optimism/contribute) to find something fun to work on! -->

## e2e testing

This repository has updated end-to-end tests in the `op-e2e` package to work with
Celestia as the data availability (DA) layer.

Currently, the tests assume a working [Celestia devnet](https://github.com/rollkit/local-celestia-devnet) running locally:

## Security Policy and Vulnerability Reporting
```bash
docker run -p 26650:26650 ghcr.io/rollkit/local-celestia-devnet:v0.12.2
```

Please refer to the canonical [Security Policy](https://github.com/ethereum-optimism/.github/blob/master/SECURITY.md) document for detailed information about how to report vulnerabilities in this codebase.
Bounty hunters are encouraged to check out [the Optimism Immunefi bug bounty program](https://immunefi.com/bounty/optimism/).
The Optimism Immunefi program offers up to $2,000,042 for in-scope critical vulnerabilities.
The e2e tests can be triggered with:

## The Bedrock Upgrade
```bash
cd $HOME/optimism
cd op-e2e
OP_E2E_DISABLE_PARALLEL=true OP_E2E_CANNON_ENABLED=false OP_NODE_DA_RPC=localhost:26650 OP_BATCHER_DA_RPC=localhost:26650 make test
```

OP Mainnet is currently preparing for [its next major upgrade, Bedrock](https://dev.optimism.io/introducing-optimism-bedrock/).
You can find detailed specifications for the Bedrock upgrade within the [specs folder](./specs) in this repository.
## Bridging

Please note that a significant number of packages and folders within this repository are part of the Bedrock upgrade and are NOT currently running in production.
Refer to the Directory Structure section below to understand which packages are currently running in production and which are intended for use as part of the Bedrock upgrade.
If you have the OP Stack + Celestia setup running, you can test out bridging from the L1
to the L2.

To do this, first navigate to the `packages/contracts-bedrock` directory and create a
`.env` file with the following contents:

```bash
L1_PROVIDER_URL=http://localhost:8545
L2_PROVIDER_URL=http://localhost:9545
PRIVATE_KEY=bf7604d9d3a1c7748642b1b7b05c2bd219c9faa91458b370f85e5a40f3b03af7
```

Then, run the following from the same directory:

```bash
npx hardhat deposit --network devnetL1 --l1-provider-url http://localhost:8545 --l2-provider-url http://localhost:9545 --amount-eth <AMOUNT> --to <ADDRESS>
```

## Directory Structure

Expand Down Expand Up @@ -73,7 +126,7 @@ Refer to the Directory Structure section below to understand which packages are
├── <a href="./proxyd">proxyd</a>: Configurable RPC request router and proxy
└── <a href="./specs">specs</a>: Specs of the rollup starting at the Bedrock upgrade
</pre>

<!--
## Branching Model

### Active Branches
Expand Down
20 changes: 15 additions & 5 deletions bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,21 @@ def devnet_deploy(paths):
batch_inbox_address = rollup_config['batch_inbox_address']
log.info(f'Using batch inbox {batch_inbox_address}')

log.info('Bringing up `op-node`, `op-proposer` and `op-batcher`.')
run_command(['docker', 'compose', 'up', '-d', 'op-node', 'op-proposer', 'op-batcher'], cwd=paths.ops_bedrock_dir, env={
log.info('Bringing up DA')
run_command(['docker', 'compose', 'up', '-d', 'da'], cwd=paths.ops_bedrock_dir, env={
'PWD': paths.ops_bedrock_dir,
'L2OO_ADDRESS': l2_output_oracle,
'SEQUENCER_BATCH_INBOX_ADDRESS': batch_inbox_address
})
wait_up(26650)

log.info('Bringing up `op-node`, `op-proposer` and `op-batcher`.')
run_command(["docker", "compose", "up", "-d", "op-node", "op-proposer", "op-batcher"], cwd=paths.ops_bedrock_dir,
env={
"PWD": paths.ops_bedrock_dir,
"L2OO_ADDRESS": l2_output_oracle,
"SEQUENCER_BATCH_INBOX_ADDRESS": batch_inbox_address,
},
)


log.info('Bringing up `artifact-server`')
run_command(['docker', 'compose', 'up', '-d', 'artifact-server'], cwd=paths.ops_bedrock_dir, env={
Expand Down Expand Up @@ -368,10 +377,11 @@ def run_command_preset(command: CommandPreset):
return proc.returncode


def run_command(args, check=True, shell=False, cwd=None, env=None, timeout=None):
def run_command(args, check=True, shell=False, cwd=None, env=None, timeout=None, capture_output=False):
env = env if env else {}
return subprocess.run(
args,
capture_output=capture_output,
check=check,
shell=shell,
env={
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading