Skip to content

Commit

Permalink
Update Kakarot to v0.9.3 (#1482)
Browse files Browse the repository at this point in the history
* Update kakarot to v0.9.3

* corrections to make setup

Signed-off-by: Gregory Edison <[email protected]>

* fix dockerfiles

Signed-off-by: Gregory Edison <[email protected]>

---------

Signed-off-by: Gregory Edison <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: Gregory Edison <[email protected]>
  • Loading branch information
3 people authored Oct 22, 2024
1 parent 24b6452 commit 579af89
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ docs/*
rpc-call-examples/*
.github/*
.vscode/*
.env.example
target/*
Dockerfile
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MONGO_CONNECTION_STRING=mongodb+srv://
MONGO_DATABASE_NAME=Kakarot-Testnet-0

# Starknet Environment
STARKNET_NETWORK=
STARKNET_NETWORK=katana
## Katana specific configurations
KATANA_ACCOUNT_ADDRESS=0xb3ff441a68610b30fd5e2abbf3a1548eb6ba6f3559f2862bf2dc757e5828ca
KATANA_PRIVATE_KEY=0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ usage:
setup: .gitmodules
chmod +x ./scripts/extract_abi.sh
git submodule update --init --recursive
cd lib/kakarot && make setup && make build && make build-sol && \
cp .env.example .env
cd lib/kakarot && uv sync --all-extras --dev && make build && make build-sol && \
mv build/ssj/contracts_Cairo1Helpers.contract_class.json build/cairo1_helpers.json && rm -fr build/ssj
./scripts/extract_abi.sh

Expand Down
11 changes: 8 additions & 3 deletions docker/hive/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ FROM mongo:6.0.8 as mongo
FROM python:3.10.13 as compiler
ENV PATH="$PATH:/root/.local/bin:/root/.foundry/bin:/root/.cargo/bin"


# Install dependencies
RUN --mount=type=cache,target=/root/.cache curl -L https://foundry.paradigm.xyz -o foundry.sh \
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
Expand Down Expand Up @@ -87,7 +86,8 @@ RUN --mount=type=cache,target=/root/.cache \
source "$HOME/.asdf/asdf.sh" \
&& chmod +x ./scripts/extract_abi.sh \
&& git submodule update --init --recursive \
&& cd lib/kakarot && make setup && make build \
&& cp .env.example .env \
&& cd lib/kakarot && uv sync --all-extras --dev && make build \
&& mv build/ssj/contracts_Cairo1Helpers.contract_class.json build/cairo1_helpers.json && rm -fr build/ssj && cd ../.. \
&& ./scripts/extract_abi.sh

Expand All @@ -103,7 +103,6 @@ COPY . .
RUN cargo chef prepare --recipe-path recipe.json

FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json

# Build application
COPY . .
Expand All @@ -119,6 +118,12 @@ COPY . .

COPY --from=compiler /usr/src/compiler/.kakarot/artifacts /usr/src/rpc/.kakarot/artifacts

# Builds dependencies
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --features hive --recipe-path recipe.json

# Build application
COPY . .
RUN --mount=type=cache,target=/root/.cache/cargo cargo build \
--features hive --release --target-dir /usr/src/rpc/target && \
cargo build \
Expand Down
6 changes: 6 additions & 0 deletions docker/rpc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ COPY . .
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install --no-install-recommends -y libclang-dev

# Builds dependencies
RUN cargo chef cook --release --recipe-path recipe.json

# Build application
COPY . .
RUN --mount=type=cache,target=/root/.cache/cargo cargo build --release --bin kakarot-rpc

FROM debian:bookworm-slim AS runtime
Expand Down
2 changes: 1 addition & 1 deletion lib/kakarot
Submodule kakarot updated 374 files

0 comments on commit 579af89

Please sign in to comment.