Skip to content

Commit

Permalink
Merge branch 'main' into mock-light-client
Browse files Browse the repository at this point in the history
  • Loading branch information
nomaxg authored Apr 15, 2024
2 parents e4a6333 + 6a1ca73 commit 3c762b1
Show file tree
Hide file tree
Showing 34 changed files with 926 additions and 336 deletions.
15 changes: 10 additions & 5 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@ ASYNC_STD_THREAD_COUNT=1
RAYON_NUM_THREADS=2

# Internal port inside container
ESPRESSO_WEB_SERVER_PORT=40000
ESPRESSO_CDN_SERVER_PORT=40000
ESPRESSO_CDN_SERVER_METRICS_PORT=9090
ESPRESSO_ORCHESTRATOR_PORT=40001
ESPRESSO_ORCHESTRATOR_NUM_NODES=5
ESPRESSO_ORCHESTRATOR_START_DELAY=5s
ESPRESSO_ORCHESTRATOR_NEXT_VIEW_TIMEOUT=30s
ESPRESSO_ORCHESTRATOR_MIN_TRANSACTIONS=50
ESPRESSO_ORCHESTRATOR_MIN_PROPOSE_TIME=1s
ESPRESSO_ORCHESTRATOR_MAX_PROPOSE_TIME=2s
ESPRESSO_CONSENSUS_SERVER_PORT=40002
ESPRESSO_DA_SERVER_PORT=40003
ESPRESSO_SEQUENCER_DA_SERVER_URL=http://da-server:${ESPRESSO_WEB_SERVER_PORT}
ESPRESSO_SEQUENCER_CONSENSUS_SERVER_URL=http://consensus-server:${ESPRESSO_WEB_SERVER_PORT}
ESPRESSO_SEQUENCER_CDN_ENDPOINT=marshal-0:${ESPRESSO_CDN_SERVER_PORT}
ESPRESSO_SEQUENCER_ORCHESTRATOR_URL=http://orchestrator:${ESPRESSO_ORCHESTRATOR_PORT}
ESPRESSO_SEQUENCER_API_PORT=50000
ESPRESSO_SEQUENCER1_API_PORT=50001
Expand Down Expand Up @@ -67,6 +65,13 @@ ESPRESSO_DEMO_SEQUENCER_STATE_PRIVATE_KEY_2=SCHNORR_SIGNING_KEY~s3ld5AYUXdugXYmR
ESPRESSO_DEMO_SEQUENCER_STATE_PRIVATE_KEY_3=SCHNORR_SIGNING_KEY~bUrtzmLjEVW9ggG7UW9jXDROZvICg-ykaWc1za3Y4gOp
ESPRESSO_DEMO_SEQUENCER_STATE_PRIVATE_KEY_4=SCHNORR_SIGNING_KEY~4YXyoT7ZxwXcU0_J6NH9ziGLrG0jShNCtGJIZ7a0yQBr

# Sequencer demo: Libp2p (advertise and bind) ports
ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_0 = 7000
ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_1 = 7001
ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_2 = 7002
ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_3 = 7003
ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_4 = 7004

# Foundry
# The mnemonic used by foundry to deploy contracts.
MNEMONIC="test test test test test test test test test test test junk"
Expand Down
8 changes: 0 additions & 8 deletions .github/actions/install-capnp/action.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install capnproto
uses: ./.github/actions/install-capnp

# See https://github.com/rustsec/audit-check for docs
- uses: rustsec/audit-check@v1
Expand Down
52 changes: 33 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ jobs:
with:
prefix-key: v1-rust

- name: Install capnproto
uses: ./.github/actions/install-capnp

- name: Build
# Build in release without `testing` feature, this should work without `hotshot_example` config.
run: |
Expand All @@ -61,7 +58,8 @@ jobs:
name: x86_64-unknown-linux-gnu-services
path: |
target/release/orchestrator
target/release/web-server
target/release/cdn-broker
target/release/cdn-marshal
target/release/state-relay-server
target/release/state-prover
target/release/sequencer
Expand Down Expand Up @@ -89,10 +87,6 @@ jobs:
with:
submodules: recursive

- name: Install Capn Proto
run: |
apt-get update && apt-get install -y capnproto
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2

Expand All @@ -106,7 +100,8 @@ jobs:
name: aarch64-unknown-linux-gnu-services
path: |
target/release/orchestrator
target/release/web-server
target/release/cdn-broker
target/release/cdn-marshal
target/release/state-relay-server
target/release/state-prover
target/release/sequencer
Expand All @@ -124,7 +119,8 @@ jobs:
needs: [build, build-arm]
outputs:
sequencer-tag: ${{ steps.sequencer.outputs.tags }}
web-server-tag: ${{ steps.web-server.outputs.tags }}
cdn-broker-tag: ${{ steps.cdn-broker.outputs.tags }}
cdn-marshal-tag: ${{ steps.cdn-marshal.outputs.tags }}
state-relay-server-tag: ${{ steps.state-relay-server.outputs.tags }}
prover-service-tag: ${{ steps.prover-service.outputs.tags }}
orchestrator-tag: ${{ steps.orchestrator.outputs.tags }}
Expand Down Expand Up @@ -168,11 +164,17 @@ jobs:
with:
images: ghcr.io/espressosystems/espresso-sequencer/sequencer

- name: Generate web-server docker metadata
- name: Generate cdn-broker docker metadata
uses: docker/metadata-action@v5
id: cdn-broker
with:
images: ghcr.io/espressosystems/espresso-sequencer/cdn-broker

- name: Generate cdn-marshal docker metadata
uses: docker/metadata-action@v5
id: web-server
id: cdn-marshal
with:
images: ghcr.io/espressosystems/espresso-sequencer/web-server
images: ghcr.io/espressosystems/espresso-sequencer/cdn-marshal

- name: Generate state-relay-server docker metadata
uses: docker/metadata-action@v5
Expand Down Expand Up @@ -232,15 +234,25 @@ jobs:
tags: ${{ steps.sequencer.outputs.tags }}
labels: ${{ steps.sequencer.outputs.labels }}

- name: Build and push web-server docker
- name: Build and push cdn-broker docker
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/cdn-broker.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.cdn-broker.outputs.tags }}
labels: ${{ steps.cdn-broker.outputs.labels }}

- name: Build and push cdn-marshal docker
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/web-server.Dockerfile
file: ./docker/cdn-marshal.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.web-server.outputs.tags }}
labels: ${{ steps.web-server.outputs.labels }}
tags: ${{ steps.cdn-marshal.outputs.tags }}
labels: ${{ steps.cdn-marshal.outputs.labels }}

- name: Build and push state-relay-server docker
uses: docker/build-push-action@v5
Expand Down Expand Up @@ -338,7 +350,8 @@ jobs:
- name: Pull docker images
run: |
docker pull ${{ needs.build-dockers.outputs.sequencer-tag }}
docker pull ${{ needs.build-dockers.outputs.web-server-tag }}
docker pull ${{ needs.build-dockers.outputs.cdn-broker-tag }}
docker pull ${{ needs.build-dockers.outputs.cdn-marshal-tag }}
docker pull ${{ needs.build-dockers.outputs.state-relay-server-tag }}
docker pull ${{ needs.build-dockers.outputs.prover-service-tag }}
docker pull ${{ needs.build-dockers.outputs.orchestrator-tag }}
Expand All @@ -350,7 +363,8 @@ jobs:
- name: Tag new docker images
run: |
docker tag ${{ needs.build-dockers.outputs.sequencer-tag }} ghcr.io/espressosystems/espresso-sequencer/sequencer:main
docker tag ${{ needs.build-dockers.outputs.web-server-tag }} ghcr.io/espressosystems/espresso-sequencer/web-server:main
docker tag ${{ needs.build-dockers.outputs.cdn-broker-tag }} ghcr.io/espressosystems/espresso-sequencer/cdn-broker:main
docker tag ${{ needs.build-dockers.outputs.cdn-marshal-tag }} ghcr.io/espressosystems/espresso-sequencer/cdn-marshal:main
docker tag ${{ needs.build-dockers.outputs.state-relay-server-tag }} ghcr.io/espressosystems/espresso-sequencer/state-relay-server:main
docker tag ${{ needs.build-dockers.outputs.prover-service-tag }} ghcr.io/espressosystems/espresso-sequencer/prover-service:main
docker tag ${{ needs.build-dockers.outputs.orchestrator-tag }} ghcr.io/espressosystems/espresso-sequencer/orchestrator:main
Expand Down
34 changes: 26 additions & 8 deletions .github/workflows/build_static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ jobs:
name: ${{ env.TARGET_TRIPLET }}-services
path: |
${{ env.CARGO_TARGET_DIR }}/${{ env.TARGET_TRIPLET }}/release/orchestrator
${{ env.CARGO_TARGET_DIR }}/${{ env.TARGET_TRIPLET }}/release/web-server
${{ env.CARGO_TARGET_DIR }}/${{ env.TARGET_TRIPLET }}/release/cdn-broker
${{ env.CARGO_TARGET_DIR }}/${{ env.TARGET_TRIPLET }}/release/cdn-marshal
${{ env.CARGO_TARGET_DIR }}/${{ env.TARGET_TRIPLET }}/release/state-relay-server
${{ env.CARGO_TARGET_DIR }}/${{ env.TARGET_TRIPLET }}/release/state-prover
${{ env.CARGO_TARGET_DIR }}/${{ env.TARGET_TRIPLET }}/release/sequencer
Expand Down Expand Up @@ -126,11 +127,18 @@ jobs:
images: ghcr.io/espressosystems/espresso-sequencer/sequencer
flavor: suffix=musl

- name: Generate web-server docker metadata
- name: Generate cdn-broker docker metadata
uses: docker/metadata-action@v5
id: web-server
id: cdn-broker
with:
images: ghcr.io/espressosystems/espresso-sequencer/web-server
images: ghcr.io/espressosystems/espresso-sequencer/cdn-broker
flavor: suffix=musl

- name: Generate cdn-marshal docker metadata
uses: docker/metadata-action@v5
id: cdn-marshal
with:
images: ghcr.io/espressosystems/espresso-sequencer/cdn-marshal
flavor: suffix=musl

- name: Generate state-relay-server docker metadata
Expand Down Expand Up @@ -185,15 +193,25 @@ jobs:
tags: ${{ steps.sequencer.outputs.tags }}
labels: ${{ steps.sequencer.outputs.labels }}

- name: Build and push web-server docker
- name: Build and push cdn-broker docker
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/cdn-broker.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.cdn-broker.outputs.tags }}
labels: ${{ steps.cdn-broker.outputs.labels }}

- name: Build and push cdn-marshal docker
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/web-server.Dockerfile
file: ./docker/cdn-marshal.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.web-server.outputs.tags }}
labels: ${{ steps.web-server.outputs.labels }}
tags: ${{ steps.cdn-marshal.outputs.tags }}
labels: ${{ steps.cdn-marshal.outputs.labels }}

- name: Build and push state-relay-server docker
uses: docker/build-push-action@v5
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
- uses: Swatinem/rust-cache@v2
name: Enable Rust Caching

- name: Install capnproto
uses: ./.github/actions/install-capnp

- name: Format Check
run: cargo fmt -- --check

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test-demo-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ jobs:
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2

- name: Install capnproto
uses: ./.github/actions/install-capnp

- name: Build
run: cargo build --release

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ jobs:
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2

- name: Install capnproto
uses: ./.github/actions/install-capnp

- name: Test
# Build test binary with `testing` feature, which requires `hotshot_example` config
run: |
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/unused-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ jobs:

- uses: Swatinem/rust-cache@v2

- name: Install capnproto
uses: ./.github/actions/install-capnp

- name: Run cargo-udeps
uses: aig787/cargo-udeps-action@v1
with:
Expand Down
Loading

0 comments on commit 3c762b1

Please sign in to comment.