Skip to content

Commit

Permalink
chore: update hotshot to 0.1.60, most jf dep to 0.4.5 (#1788)
Browse files Browse the repository at this point in the history
  • Loading branch information
alxiong authored Jul 26, 2024
1 parent b3ec621 commit ffc6122
Show file tree
Hide file tree
Showing 182 changed files with 21,277 additions and 6,183 deletions.
77 changes: 47 additions & 30 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,37 @@ ASYNC_STD_THREAD_COUNT=1
PROVER_RAYON_NUM_THREADS=2

# Internal port inside container
ESPRESSO_CDN_SERVER_PORT=40000
ESPRESSO_CDN_SERVER_PORT=30000
ESPRESSO_CDN_SERVER_METRICS_PORT=9090
ESPRESSO_ORCHESTRATOR_PORT=40001
ESPRESSO_ORCHESTRATOR_PORT=30001
ESPRESSO_ORCHESTRATOR_NUM_NODES=5
ESPRESSO_ORCHESTRATOR_START_DELAY=5s
ESPRESSO_ORCHESTRATOR_NEXT_VIEW_TIMEOUT=30s
ESPRESSO_ORCHESTRATOR_NEXT_VIEW_TIMEOUT=12s
ESPRESSO_ORCHESTRATOR_BUILDER_TIMEOUT=2s
ESPRESSO_SEQUENCER_CDN_ENDPOINT=marshal-0:${ESPRESSO_CDN_SERVER_PORT}
ESPRESSO_SEQUENCER_ORCHESTRATOR_URL=http://orchestrator:${ESPRESSO_ORCHESTRATOR_PORT}
ESPRESSO_SEQUENCER_API_PORT=44000
ESPRESSO_SEQUENCER_HOTSHOT_EVENT_STREAMING_API_PORT=42000
ESPRESSO_SEQUENCER1_API_PORT=44001
ESPRESSO_SEQUENCER2_API_PORT=44002
ESPRESSO_SEQUENCER3_API_PORT=44003
ESPRESSO_SEQUENCER4_API_PORT=44004
ESPRESSO_SEQUENCER_MAX_BLOCK_SIZE=10kb
ESPRESSO_SEQUENCER_BASE_FEE=1
ESPRESSO_SEQUENCER_API_PORT=24000
ESPRESSO_SEQUENCER_HOTSHOT_EVENT_STREAMING_API_PORT=22000
ESPRESSO_SEQUENCER1_API_PORT=24001
ESPRESSO_SEQUENCER2_API_PORT=24002
ESPRESSO_SEQUENCER3_API_PORT=24003
ESPRESSO_SEQUENCER4_API_PORT=24004
ESPRESSO_SEQUENCER_URL=http://sequencer0:${ESPRESSO_SEQUENCER_API_PORT}
ESPRESSO_SEQUENCER_MAX_CONNECTIONS=25
ESPRESSO_SEQUENCER_STORAGE_PATH=/store/sequencer
ESPRESSO_SEQUENCER_GENESIS_FILE=/genesis/demo.toml
ESPRESSO_SEQUENCER_L1_PORT=8545
ESPRESSO_SEQUENCER_L1_WS_PORT=8546
ESPRESSO_SEQUENCER_L1_PROVIDER=http://demo-l1-network:${ESPRESSO_SEQUENCER_L1_PORT}
# Only allow 1 block to be processed for events at a time, simulating a very bad L1 provider.
ESPRESSO_SEQUENCER_L1_EVENTS_MAX_BLOCK_RANGE=1
ESPRESSO_SEQUENCER_ETH_MNEMONIC="test test test test test test test test test test test junk"
# The first account is the permission less builder, the last are sequencer0 to 4
ESPRESSO_SEQUENCER_PREFUNDED_BUILDER_ACCOUNTS=0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f
ESPRESSO_COMMITMENT_TASK_PORT=60000
ESPRESSO_SEQUENCER_DB_PORT=5432
ESPRESSO_STATE_RELAY_SERVER_PORT=40004
ESPRESSO_COMMITMENT_TASK_PORT=30010
ESPRESSO_SEQUENCER0_DB_PORT=5432
ESPRESSO_SEQUENCER1_DB_PORT=5433
ESPRESSO_STATE_RELAY_SERVER_PORT=30011
ESPRESSO_STATE_RELAY_SERVER_URL=http://state-relay-server:${ESPRESSO_STATE_RELAY_SERVER_PORT}
ESPRESSO_BLOCK_EXPLORER_PORT=3000

# Ethereum accounts (note 11-15 are used by the sequencer nodes)
ESPRESSO_SEQUENCER_HOTSHOT_ACCOUNT_INDEX=5
Expand All @@ -52,8 +54,8 @@ ESPRESSO_BUILDER_ETH_ACCOUNT_INDEX=8
ESPRESSO_DEPLOYER_ACCOUNT_INDEX=9

# Contracts
ESPRESSO_SEQUENCER_HOTSHOT_ADDRESS=0x700b6a60ce7eaaea56f065753d8dcb9653dbad35
ESPRESSO_SEQUENCER_LIGHT_CLIENT_PROXY_ADDRESS=0xe1aa25618fa0c7a1cfdab5d6b456af611873b629
ESPRESSO_SEQUENCER_HOTSHOT_ADDRESS=0xb19b36b1456e65e3a6d514d3f715f204bd59f431
ESPRESSO_SEQUENCER_LIGHT_CLIENT_PROXY_ADDRESS=0x0c8e79f3534b00d9a3d4a856b665bf4ebc22f2ba
ESPRESSO_SEQUENCER_LIGHTCLIENT_ADDRESS=$ESPRESSO_SEQUENCER_LIGHT_CLIENT_PROXY_ADDRESS

# Example sequencer demo private keys
Expand All @@ -76,6 +78,9 @@ ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_2=7002
ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_3=7003
ESPRESSO_DEMO_SEQUENCER_LIBP2P_PORT_4=7004

# The demo uses the mock stake table contract, only capacity 10 is supported.
ESPRESSO_SEQUENCER_STAKE_TABLE_CAPACITY=10

# Foundry
# The mnemonic used by foundry to deploy contracts.
MNEMONIC="test test test test test test test test test test test junk"
Expand All @@ -86,31 +91,34 @@ ETHERSCAN_API_KEY="placeholder"

# Temporary flags for state relay server, should remove after integrating with stake table
# Related issue: [https://github.com/EspressoSystems/espresso-sequencer/issues/1022]
ESPRESSO_STATE_SIGNATURE_WEIGHT_THRESHOLD=3
ESPRESSO_STATE_SIGNATURE_TOTAL_STAKE=5

# Prover service
ESPRESSO_PROVER_SERVICE_PORT=40050
ESPRESSO_STATE_PROVER_UPDATE_INTERVAL=10m
ESPRESSO_PROVER_SERVICE_PORT=30050
ESPRESSO_STATE_PROVER_UPDATE_INTERVAL=20s

# Builder service
ESPRESSO_BUILDER_L1_PROVIDER=${ESPRESSO_SEQUENCER_L1_PROVIDER}
ESPRESSO_BUILDER_ETH_MNEMONIC=${ESPRESSO_SEQUENCER_ETH_MNEMONIC}
ESPRESSO_BUILDER_SERVER_PORT=41003
ESPRESSO_BUILDER_CHANNEL_CAPACITY=1024
ESPRESSO_BUILDER_SERVER_PORT=31003
ESPRESSO_BUILDER_TX_CHANNEL_CAPACITY=4096
ESPRESSO_BUILDER_EVENT_CHANNEL_CAPACITY=128
ESPRESSO_BUILDER_INIT_NODE_COUNT=$ESPRESSO_ORCHESTRATOR_NUM_NODES
ESPRESSO_BUILDER_BOOTSTRAPPED_VIEW=0
ESPRESSO_BUILDER_WEBSERVER_RESPONSE_TIMEOUT_DURATION=1s
ESPRESSO_BUILDER_BUFFER_VIEW_NUM_COUNT=15
ESPRESSO_BUILDER_WEBSERVER_RESPONSE_TIMEOUT_DURATION=1500ms
ESPRESSO_BUILDER_BUFFER_VIEW_NUM_COUNT=50
ESPRESSO_BUILDER_GENESIS_FILE=$ESPRESSO_SEQUENCER_GENESIS_FILE

# Load generator
ESPRESSO_SUBMIT_TRANSACTIONS_DELAY=2s
ESPRESSO_SUBMIT_TRANSACTIONS_PUBLIC_PORT=44010
ESPRESSO_SUBMIT_TRANSACTIONS_PRIVATE_PORT=44020
ESPRESSO_SUBMIT_TRANSACTIONS_PUBLIC_PORT=24010
ESPRESSO_SUBMIT_TRANSACTIONS_PRIVATE_PORT=24020

# Query service stress test
ESPRESSO_NASTY_CLIENT_PORT=44011
# Query service fetch requests rate limit
ESPRESSO_SEQUENCER_FETCH_RATE_LIMIT=25

# Query service stress test
ESPRESSO_NASTY_CLIENT_PORT=44011
ESPRESSO_NASTY_CLIENT_PORT=24011

# Openzeppelin Defender Deployment Profile
DEFENDER_KEY=
Expand All @@ -120,3 +128,12 @@ LIGHT_CLIENT_SALT=12
FEE_CONTRACT_UPGRADE_NAME="FeeContract.sol"
LIGHT_CLIENT_UPGRADE_NAME="LightClientV2.sol"
FOUNDRY_OUT=contracts/out

# The Ethereum address of the safe multisig wallet used to deploy and operate the contracts.
SAFE_MULTISIG_ADDRESS=
# The Ethereum private key of the wallet used for the proposing multisig transactions.
SAFE_ORCHESTRATOR_PRIVATE_KEY=

# Light Client
LIGHT_CLIENT_PROXY_CONTRACT_ADDRESS=
APPROVED_PROVER_ADDRESS=
75 changes: 62 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ jobs:
run: |
cargo build --locked --release --workspace
- name: Build Espresso Dev Node
# Espresso Dev Node currently requires testing feature, so it is built separately.
run: |
cargo build --locked --release --features testing --bin espresso-dev-node
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -72,7 +77,9 @@ jobs:
target/release/keygen
target/release/permissionless-builder
target/release/nasty-client
target/release/espresso-dev-node
target/release/pub-key
target/release/espresso-bridge
build-arm:
runs-on: buildjet-4vcpu-ubuntu-2204-arm
Expand All @@ -96,6 +103,11 @@ jobs:
run: |
cargo build --locked --release --workspace
- name: Build Espresso Dev Node
# Espresso Dev Node currently requires testing feature, so it is built separately.
run: |
cargo build --locked --release --features testing --bin espresso-dev-node
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -116,7 +128,9 @@ jobs:
target/release/keygen
target/release/permissionless-builder
target/release/nasty-client
target/release/espresso-dev-node
target/release/pub-key
target/release/espresso-bridge
build-dockers:
runs-on: ubuntu-latest
Expand All @@ -134,6 +148,8 @@ jobs:
deploy-tag: ${{ steps.deploy.outputs.tags }}
builder-tag: ${{ steps.builder.outputs.tags }}
nasty-client-tag: ${{ steps.nasty-client.outputs.tags }}
espresso-dev-node-tag: ${{ steps.espresso-dev-node.outputs.tags }}
bridge-tag: ${{ steps.bridge.outputs.tags }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -235,8 +251,20 @@ jobs:
with:
images: ghcr.io/espressosystems/espresso-sequencer/nasty-client

- name: Generate espresso-dev-node metadata
uses: docker/metadata-action@v5
id: espresso-dev-node
with:
images: ghcr.io/espressosystems/espresso-sequencer/espresso-dev-node

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

- name: Build and push sequencer docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/sequencer.Dockerfile
Expand All @@ -246,7 +274,7 @@ jobs:
labels: ${{ steps.sequencer.outputs.labels }}

- name: Build and push cdn-broker docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/cdn-broker.Dockerfile
Expand All @@ -256,7 +284,7 @@ jobs:
labels: ${{ steps.cdn-broker.outputs.labels }}

- name: Build and push cdn-marshal docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/cdn-marshal.Dockerfile
Expand All @@ -266,7 +294,7 @@ jobs:
labels: ${{ steps.cdn-marshal.outputs.labels }}

- name: Build and push cdn-whitelist docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/cdn-whitelist.Dockerfile
Expand All @@ -276,7 +304,7 @@ jobs:
labels: ${{ steps.cdn-whitelist.outputs.labels }}

- name: Build and push state-relay-server docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/state-relay-server.Dockerfile
Expand All @@ -286,7 +314,7 @@ jobs:
labels: ${{ steps.state-relay-server.outputs.labels }}

- name: Build and push prover-service docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/prover-service.Dockerfile
Expand All @@ -296,7 +324,7 @@ jobs:
labels: ${{ steps.prover-service.outputs.labels }}

- name: Build and push orchestrator docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/orchestrator.Dockerfile
Expand All @@ -306,7 +334,7 @@ jobs:
labels: ${{ steps.orchestrator.outputs.labels }}

- name: Build and push commitment-task docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/commitment-task.Dockerfile
Expand All @@ -316,7 +344,7 @@ jobs:
labels: ${{ steps.commitment-task.outputs.labels }}

- name: Build and push submit-transactions docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/submit-transactions.Dockerfile
Expand All @@ -326,7 +354,7 @@ jobs:
labels: ${{ steps.submit-transactions.outputs.labels }}

- name: Build and push deploy docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/deploy.Dockerfile
Expand All @@ -336,7 +364,7 @@ jobs:
labels: ${{ steps.deploy.outputs.labels }}

- name: Build and push builder docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/permissionless-builder.Dockerfile
Expand All @@ -346,7 +374,7 @@ jobs:
labels: ${{ steps.builder.outputs.labels }}

- name: Build and push nasty-client docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/nasty-client.Dockerfile
Expand All @@ -355,6 +383,25 @@ jobs:
tags: ${{ steps.nasty-client.outputs.tags }}
labels: ${{ steps.nasty-client.outputs.labels }}

- name: Build and push espresso-dev-node docker
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/espresso-dev-node.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.espresso-dev-node.outputs.tags }}
labels: ${{ steps.espresso-dev-node.outputs.labels }}
- name: Build and push bridge docker
uses: docker/build-push-action@v6
with:
context: ./
file: ./docker/espresso-bridge.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.bridge.outputs.tags }}
labels: ${{ steps.bridge.outputs.labels }}

test-demo:
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -382,6 +429,7 @@ jobs:
docker pull ${{ needs.build-dockers.outputs.deploy-tag }}
docker pull ${{ needs.build-dockers.outputs.builder-tag }}
docker pull ${{ needs.build-dockers.outputs.nasty-client-tag }}
docker pull ${{ needs.build-dockers.outputs.bridge-tag }}
- name: Tag new docker images
run: |
docker tag ${{ needs.build-dockers.outputs.sequencer-tag }} ghcr.io/espressosystems/espresso-sequencer/sequencer:main
Expand All @@ -396,8 +444,9 @@ jobs:
docker tag ${{ needs.build-dockers.outputs.deploy-tag }} ghcr.io/espressosystems/espresso-sequencer/deploy:main
docker tag ${{ needs.build-dockers.outputs.builder-tag }} ghcr.io/espressosystems/espresso-sequencer/builder:main
docker tag ${{ needs.build-dockers.outputs.nasty-client-tag }} ghcr.io/espressosystems/espresso-sequencer/nasty-client:main
docker tag ${{ needs.build-dockers.outputs.bridge-tag }} ghcr.io/espressosystems/espresso-sequencer/bridge:main
- name: Test docker demo
run: |
just demo &
timeout 600 scripts/smoke-test-demo
timeout -v 600 scripts/smoke-test-demo | sed -e 's/^/smoke-test: /;'
Loading

0 comments on commit ffc6122

Please sign in to comment.