Skip to content

Commit

Permalink
Merge pull request #32 from chainbound/chore/add-justfile
Browse files Browse the repository at this point in the history
feat: switch makefile -> justfile
  • Loading branch information
merklefruit authored May 24, 2024
2 parents 6bf677c + 854ccb1 commit 7cf2db8
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 71 deletions.
86 changes: 86 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# default recipe to display help information
default:
@just --list --unsorted

# run the web demo locally
demo:
chmod +x ./start-demo.sh
./start-demo.sh

# spin up the bolt devnet
up:
kurtosis run --enclave bolt-devnet github.com/chainbound/ethereum-package --args-file kurtosis_config.yaml

# turn down the bolt devnet and remove the enclave
down:
kurtosis enclave rm -f bolt-devnet

# remove all kurtosis data and stop the engine
clean:
kurtosis clean --all
kurtosis engine stop

# restart the bolt devnet with updated docker images
restart:
@just down
@just build-images
@just up

# show the running containers and port mappings for the bolt devnet
inspect:
kurtosis enclave inspect bolt-devnet

# show the logs for the bolt devnet relay
relay-logs:
docker logs -f `docker ps --format "{{{{.ID}}\t{{{{.Names}}" | grep "mev-relay-api" | awk '{print $$1}'`

# show the logs for the bolt devnet builder
builder-logs:
docker logs -f `docker ps --format "{{{{.ID}}\t{{{{.Names}}" | grep "el-2-geth-builder-lighthouse" | awk '{print $$1}'`

# show the logs for the bolt devnet mev-boost sidecar
boost-logs:
docker logs -f `docker ps --format "{{{{.ID}}\t{{{{.Names}}" | grep "mev-boost-1-lighthouse-geth" | awk '{print $$1}'`

# show the logs for the bolt devnet bolt-sidecar
sidecar-logs:
docker logs -f `docker ps --format "{{{{.ID}}\t{{{{.Names}}" | grep "mev-sidecar-api" | awk '{print $$1}'`

# manually send a preconfirmation to the bolt devnet
send-preconf:
cd bolt-spammer && RUST_LOG=info cargo run -- \
--provider-url $(kurtosis port print bolt-devnet el-1-geth-lighthouse rpc) \
--beacon-client-url $(kurtosis port print bolt-devnet cl-1-lighthouse-geth http) \
--bolt-sidecar-url http://$(kurtosis port print bolt-devnet mev-sidecar-api api) \
--private-key bcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31 \
--slot head

# build all the docker images locally
build-images:
@just _build-builder
@just _build-relay
@just _build-sidecar
@just _build-mevboost

# build the docker image for the bolt builder
_build-builder:
cd builder && docker build -t ghcr.io/chainbound/bolt-builder:0.1.0 .

# build the docker image for the bolt relay
_build-relay:
cd mev-boost-relay && docker build -t ghcr.io/chainbound/bolt-relay:0.1.0 .

# build the docker image for the bolt sidecar
_build-sidecar:
cd bolt-sidecar && docker build -t ghcr.io/chainbound/bolt-sidecar:0.1.0 .

# build the docker image for the bolt mev-boost sidecar
_build-mevboost:
cd mev-boost && docker build -t ghcr.io/chainbound/bolt-mev-boost:0.1.0 .

# push all the docker images to the private github container registry
_push-images:
docker push ghcr.io/chainbound/bolt-builder:0.1.0
docker push ghcr.io/chainbound/bolt-relay:0.1.0
docker push ghcr.io/chainbound/bolt-sidecar:0.1.0
docker push ghcr.io/chainbound/bolt-mev-boost:0.1.0
65 changes: 0 additions & 65 deletions Makefile

This file was deleted.

13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ different fault scenarios and how the system behaves.
Make sure you have the following requirements on your machine:

- [Docker engine](https://docs.docker.com/engine/install/) installed and running
- [Just](https://github.com/casey/just) installed
- [Kurtosis CLI](https://docs.kurtosis.com/install/) installed
- [Foundry](https://book.getfoundry.sh/getting-started/installation) installed

Expand All @@ -88,13 +89,13 @@ installed. Just run the following commands in your terminal:

```shell
# build all necessary docker images locally first
make build-images
just build-images

# spin up the kurtosis devnet on your machine
make up
just up

# run the web demo servers.
make demo
just demo
```

The web demo will be available on your browser at
Expand All @@ -103,16 +104,16 @@ The web demo will be available on your browser at
### Stopping the devnet and demo

The demo app will remain open until you press `Ctrl+C` in the terminal where
you ran the `make demo` command.
you ran the `just demo` command.

To stop the devnet, run the following command:

```shell
# if you want to simply stop all running containers
make down
just down

# if you want to remove all the data and stop the Kurtosis engine
make clean
just clean
```

> [!WARNING]
Expand Down

0 comments on commit 7cf2db8

Please sign in to comment.