Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Johnw/nix build #2003

Open
wants to merge 18 commits into
base: rsoeldner/plonk-verifier
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

ARG UBUNTU_VERSION=22.04
ARG GHC_VERSION=9.10.1
ARG GO_VERSION=1.23.0
ARG PROJECT_NAME=chainweb

# ############################################################################ #
Expand Down Expand Up @@ -100,6 +101,7 @@ RUN <<EOF
echo "TARGETPLATFORM: $TARGETPLATFORM"
EOF
ARG GHC_VERSION
ARG GO_VERSION
ARG TARGETPLATFORM
ARG DEBIAN_FRONTEND=noninteractive
RUN <<EOF
Expand Down Expand Up @@ -152,6 +154,26 @@ RUN --mount=type=cache,target=/root/.cabal,id=${TARGETPLATFORM} <<EOF
cabal update
EOF

# Install Go toolchain
ARG GO_TARGETPLATFORM=${TARGETPLATFORM/\//-}
ARG GOLANG_ARCHIVE=go${GO_VERSION}.${GO_TARGETPLATFORM}.tar.gz
ENV PATH="${PATH}:/usr/local/go/bin"
RUN <<EOF
curl -L https://go.dev/dl/$GOLANG_ARCHIVE -O
rm -rf /usr/local/go && tar -C /usr/local -xzf $GOLANG_ARCHIVE
rm -f go${GO_VERSION}.${GO_TARGETPLATFORM}.tar.gz
go version
EOF

# Install Rust toolchain
ENV PATH="${PATH}:/root/.cargo/bin"
RUN <<EOF
curl -sSf https://sh.rustup.rs | sh -s -- -y
curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-/root/.cargo}/bin
cargo version
rustc --version
EOF

# ############################################################################ #
# Builds
# ############################################################################ #
Expand Down Expand Up @@ -319,6 +341,7 @@ EOF
# Chainweb-node Application

FROM chainweb-runtime AS chainweb-node
ENV PATH=/chainweb:$PATH
COPY --from=chainweb-build-node /chainweb/artifacts/chainweb-node .
COPY --from=chainweb-build-node /chainweb/LICENSE .
COPY --from=chainweb-build-node /chainweb/README.md .
Expand Down
14 changes: 14 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,20 @@ source-repository-package
tag: 174af3523616c8fe01449da5ccbb9f16df097ac3
--sha256: 0grssxgjygi4ijiqaa87diwv6sdqz77hldf3lr4k7p93w35lhlci


-- Required for the plonk verifier
-- source-repository-package
-- type: git
-- location: https://github.com/argumentcomputer/lurk-hs
-- tag: fd4bca56d2a2b3f8a3339ba9c63a4f4f1a285095
-- --sha256: sha256-kVFIy+Aj3TNJpsM1Cs/5uGmzeWwHKYWjjCQ+L1/XOj8=

source-repository-package
type: git
location: https://github.com/larskuhtz/lurk-hs.git
tag: 7e71572e478f9d4c2c60af7f39ca6218776937d5
--sha256: sha256-S4K+xmEY7vzdEOPlLtQtq13Lf1xe+IAE5N0rZHVWIN4=

-- -------------------------------------------------------------------------- --
-- Relaxed Bounds

Expand Down
7 changes: 7 additions & 0 deletions chainweb.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ extra-source-files:

rewards/miner_rewards.csv

-- verifier assets

verifier-assets/v1.0.8-testnet.bin

-- pact test data

pact/coin-contract/*.repl
Expand Down Expand Up @@ -264,6 +268,7 @@ library
, Chainweb.VerifierPlugin.Hyperlane.Message.After225
, Chainweb.VerifierPlugin.Hyperlane.Message.Before225
, Chainweb.VerifierPlugin.Hyperlane.Utils
, Chainweb.VerifierPlugin.Plonk
, Chainweb.Version
, Chainweb.Version.Development
, Chainweb.Version.Guards
Expand Down Expand Up @@ -460,6 +465,7 @@ library
, warp-tls >= 3.4
, yaml >= 0.11
, yet-another-logger >= 0.4.1
, plonk-verify

if flag(ed25519)
cpp-options: -DWITH_ED25519=1
Expand Down Expand Up @@ -505,6 +511,7 @@ test-suite chainweb-tests
Chainweb.Test.Pact.GrandHash
Chainweb.Test.Pact.PactMultiChainTest
Chainweb.Test.Pact.VerifierPluginTest
Chainweb.Test.Pact.VerifierPluginTest.PlonkVerifier
Chainweb.Test.Pact.VerifierPluginTest.Transaction
Chainweb.Test.Pact.VerifierPluginTest.Transaction.Message.After225
Chainweb.Test.Pact.VerifierPluginTest.Transaction.Message.Before225
Expand Down
10 changes: 10 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ let haskellSrc = with nix-filter.lib; filter {
zlib
pkg-config
sqlite
openssl
# The version of Rust desired can be fixed here by changing `latest`
# to a version string, like `"1.81.0"`.
rust-bin.stable."1.81.0".minimal
rustPlatform.bindgenHook
go_1_22
llvmPackages.libclang.dev
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.CoreServices
];
modules = [
{
Expand Down
138 changes: 100 additions & 38 deletions flake.lock

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

Loading
Loading