Skip to content

Commit

Permalink
E2e devnet (#143)
Browse files Browse the repository at this point in the history
* feat: add Dockerfile for avs contract deployment and avs, add env sample file

* debug: add temp env

* debug: add temp beancon genesis time and fork url

* fix: update rust lib

* logging improved, read lookahead at before preconf loop

* rust:1.80 docker file

* entrypoint instead of cmd in dockerfile

* Coping only needed sources for docker build

* Dockerfile with cache for faster builds

* Better error handling for the registration

* fixed call view function for registration

* fixed switching epoch at the beginning

* Add CLI command for force pushing lookahead

* gas limit increased to 500_000

* force update lookahead when no txs

* operator using epoch instead of timestamp

* slot clock test

* build fixed

* slot clock genesis log

* better debug logs

* removed eth_call from force lookahead

* removed misleading lookahead kept for next epoch in operator
increased gas limit for the force lookahead

* rpc url for the tx spammer

* remove validator

* Fix force push lookahead

* Block proposed event receiving fixed

* Automatically detect parentMetaHash in the smart contract

* enable preconfirmation env flag

Added a lookahead monitor for this case, not to complicate the node, which is entirely aimed at preconfirmation.

* Remove unused variable

* .env.sample

* Improve the process of sending new block proposals

* removed private keys and URLs from scripts

---------

Co-authored-by: nmjustinchan <[email protected]>
Co-authored-by: mikhailUshakoff <[email protected]>
  • Loading branch information
3 people authored Sep 28, 2024
1 parent 271cfa3 commit e88f399
Show file tree
Hide file tree
Showing 22 changed files with 526 additions and 253 deletions.
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM docker.io/library/rust:1.80 AS builder

# Set the working directory inside the container
WORKDIR /usr/src/taiko_preconf_avs_node

# Copy the project files
COPY ../Node/src /usr/src/taiko_preconf_avs_node/src
COPY ../Node/Cargo.toml /usr/src/taiko_preconf_avs_node/Cargo.toml
COPY ../Node/Cargo.lock /usr/src/taiko_preconf_avs_node/Cargo.lock

# Copy the dependency directory
COPY ../p2pNode/p2pNetwork /usr/src/p2pNode/p2pNetwork

# Build the project in release mode
RUN cargo build -p taiko_preconf_avs_node --release

# Use ubuntu as the base image
FROM ubuntu:latest

# Copy the build artifact from the builder stage
COPY --from=builder /usr/src/taiko_preconf_avs_node/target/release/taiko_preconf_avs_node /usr/local/bin/taiko_preconf_avs_node

# Expose the port that the server will run on
# EXPOSE 9000

# Run the binary
ENTRYPOINT ["taiko_preconf_avs_node"]
29 changes: 29 additions & 0 deletions Dockerfile_cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM docker.io/library/rust:1.80 AS builder

# Set the working directory inside the container
WORKDIR /usr/src/taiko_preconf_avs_node

# Copy the project files
COPY ../Node/src /usr/src/taiko_preconf_avs_node/src
COPY ../Node/Cargo.toml /usr/src/taiko_preconf_avs_node/Cargo.toml
COPY ../Node/Cargo.lock /usr/src/taiko_preconf_avs_node/Cargo.lock

# Copy the dependency directory
COPY ../p2pNode/p2pNetwork /usr/src/p2pNode/p2pNetwork

# Build the project in release mode
RUN --mount=type=cache,target=/usr/local/cargo/registry --mount=type=cache,target=/usr/src/taiko_preconf_avs_node/target \
cargo build -p taiko_preconf_avs_node --release && \
mv /usr/src/taiko_preconf_avs_node/target/release/taiko_preconf_avs_node /root

# Use ubuntu as the base image
FROM ubuntu:latest

# Copy the build artifact from the builder stage
COPY --from=builder /root/taiko_preconf_avs_node /usr/local/bin/taiko_preconf_avs_node

# Expose the port that the server will run on
# EXPOSE 9000

# Run the binary
ENTRYPOINT ["taiko_preconf_avs_node"]
21 changes: 21 additions & 0 deletions Node/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
AVS_NODE_ECDSA_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000000
VALIDATOR_BLS_PRIVATEKEY=1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
AVS_PRECONF_TASK_MANAGER_CONTRACT_ADDRESS=0x0000000000000000000000000000000000000000
AVS_DIRECTORY_CONTRACT_ADDRESS=0x0000000000000000000000000000000000000000
AVS_SERVICE_MANAGER_CONTRACT_ADDRESS=0x0000000000000000000000000000000000000000
AVS_PRECONF_REGISTRY_CONTRACT_ADDRESS=0x0000000000000000000000000000000000000000
EIGEN_LAYER_STRATEGY_MANAGER_CONTRACT_ADDRESS=0x0000000000000000000000000000000000000000
EIGEN_LAYER_SLASHER_CONTRACT_ADDRESS=0x0000000000000000000000000000000000000000
TAIKO_L1_ADDRESS=0x0000000000000000000000000000000000000000
TAIKO_CHAIN_ID=167
L1_CHAIN_ID=3151908
VALIDATOR_INDEX=1
TAIKO_PROPOSER_URL=http://127.0.0.1:1234
TAIKO_DRIVER_URL=http://127.0.0.1:1235
MEV_BOOST_URL=http://127.0.0.1:33661
L1_WS_RPC_URL=ws://127.0.0.1:32003
L1_BEACON_URL=http://127.0.0.1:33001
ENABLE_P2P=true
ENABLE_PRECONFIRMATION=true
RUST_LOG=debug,reqwest=info,hyper=info,alloy_transport=info,alloy_rpc_client=info,alloy_provider=info

Loading

0 comments on commit e88f399

Please sign in to comment.