Skip to content

Commit

Permalink
Revert malachite upgrade (#201)
Browse files Browse the repository at this point in the history
Consensus is breaking after the malachite upgrade. Try reverting to see
if the cause is related to the upgrade.
  • Loading branch information
sanjayprabhu authored Jan 14, 2025
1 parent c137499 commit ec9785c
Show file tree
Hide file tree
Showing 13 changed files with 327 additions and 491 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
MALACHITE_GIT_REF: "8a9f3702eb41199bc8a7f45139adba233a04744a"

jobs:
build:
timeout-minutes: 20
Expand All @@ -35,15 +38,26 @@ jobs:
uses: arduino/setup-protoc@v3

- uses: actions/checkout@v4
with:
repository: informalsystems/malachite
ref: ${{ env.MALACHITE_GIT_REF }}
path: ./malachite

- uses: actions/checkout@v4
with:
path: ./snapchain

- env:
- working-directory: ./snapchain
env:
RUSTFLAGS: "-Dwarnings"
run: cargo test

- env:
- working-directory: ./snapchain
env:
RUSTFLAGS: "-Dwarnings"
run: cargo build --bins

- env:
- working-directory: ./snapchain
env:
RUSTFLAGS: "-Dwarnings"
run: cargo fmt --all --check
221 changes: 92 additions & 129 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ async-trait = "0.1.68"
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "fmt", "json"] }
hex = "0.4.3"
ractor = "0.11.2"
informalsystems-malachitebft-core-consensus = { version = "0.0.1" }
informalsystems-malachitebft-core-types = { version = "0.0.1"}
informalsystems-malachitebft-config = { version = "0.0.1"}
informalsystems-malachitebft-metrics = { version = "0.0.1" }
malachite-consensus = { path = "../malachite/code/crates/consensus" }
malachite-common = { path = "../malachite/code/crates/common" }
malachite-config = { path = "../malachite/code/crates/config" }
malachite-node = { path = "../malachite/code/crates/node" }
malachite-metrics = { path = "../malachite/code/crates/metrics" }
blake3 = "1.4.1"
tracing = "0.1.40"
thiserror = "1.0.66"
Expand Down
18 changes: 16 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,25 @@ FROM rust:1.83 AS builder

WORKDIR /usr/src/app

RUN apt-get update && apt-get install -y libclang-dev libjemalloc-dev llvm-dev make protobuf-compiler cmake
# Build Malachite first
ARG MALACHITE_GIT_REPO_URL=https://github.com/informalsystems/malachite.git
ENV MALACHITE_GIT_REPO_URL=$MALACHITE_GIT_REPO_URL
ARG MALACHITE_GIT_REF=8a9f3702eb41199bc8a7f45139adba233a04744a
ENV RUST_BACKTRACE=1
RUN <<EOF
set -eu
apt-get update && apt-get install -y libclang-dev git libjemalloc-dev llvm-dev make protobuf-compiler libssl-dev openssh-client cmake
cd ..
git clone $MALACHITE_GIT_REPO_URL
cd malachite
git checkout $MALACHITE_GIT_REF
cd code
cargo build
EOF

# Unfortunately, we can't prefetch creates without including the source code,
# since the Cargo configuration references files in src.
# This means we'll re-fetch all crates every time the source code changes,
# This means we'll re-fetch all creates every time the source code changes,
# which isn't ideal.
COPY Cargo.toml build.rs ./
COPY src ./src
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build
build:
docker compose build
docker compose build --ssh default

.PHONY: dev
dev: build
Expand Down
Loading

0 comments on commit ec9785c

Please sign in to comment.