Skip to content

Instantly share code, notes, and snippets.

@jcstein
Created March 5, 2023 18:43
Show Gist options
  • Save jcstein/d956aba2cf2e972a2def9b00bd842dba to your computer and use it in GitHub Desktop.
Save jcstein/d956aba2cf2e972a2def9b00bd842dba to your computer and use it in GitHub Desktop.
OP-BTC

Dependency setup

Environment setup and Golang installation

Install dependencies here.

Clone repository

Next, clone the repo:

cd $HOME
git clone https://github.com/celestiaorg/optimism
cd optimism
git checkout bitcoin-da

asdf

Install asdf to allow us to intall a specific version of NPM easily:

cd $HOME
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.2
echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc

Set the path:

export PATH=$PATH:~/.asdf/bin/

Check that it was installed:

asdf

Node.js

Install nodejs 16.16.0:

asdf plugin add nodejs
asdf install nodejs 16.16.0
asdf local nodejs 16.16.0
source ~/.bashrc

Optional: you may need to update NPM:

npm install -g [email protected]

Foundry

curl -L https://foundry.paradigm.xyz/ | bash
source /root/.bashrc

Yarn

Install yarn:

npm install -g yarn

Docker compose

Install docker-compose:

apt install docker-compose

gcc

apt install gcc

Start the Optimism and Bitcoin devnet

Build and start the TypeScript definitions for TS dependencies

cd optimism
yarn && make build-ts
make devnet-up

This starts up the layer 1 (ETH), layer 2 (op-geth), data availability layer (Bitcoin), the sequencer (op-node), batch submitter (op-batcher), intermediate-state root (ISR) service (op-proposer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment