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

Use branch'd ink-wrapper for compatibility with aleph-node 12.1 release #23

Merged
merged 5 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ENV RUSTUP_HOME=/usr/local/rustup \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.71.0 \
CARGO_CONTRACT_VERSION=3.2.0 \
INK_WRAPPER_VERSION=0.6.1
INK_WRAPPER_VERSION=57fde9f0e31f1de610efe1879715c028849f4bc0
Marcin-Radecki marked this conversation as resolved.
Show resolved Hide resolved

LABEL cargo-contract="$CARGO_CONTRACT_VERSION" \
Copy link
Collaborator Author

@deuszx deuszx Nov 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can now inspect the labels:

docker image inspect --format='{{json .Config.Labels}}' cardinal-cryptography/ink-dev-arm64

{"cargo-contract":"3.2.0","ink-wrapper":"rev-57fde9f0e31f1de610efe1879715c028849f4bc0","rust":"1.71.0"}

rust="$RUST_VERSION" \
ink-wrapper="$INK_WRAPPER_VERSION"
ink-wrapper="rev-$INK_WRAPPER_VERSION"

# Minimal Rust dependencies.
RUN set -eux \
Expand Down Expand Up @@ -64,7 +64,7 @@ RUN rm -rf cargo-contract
FROM slimmed-rust as ink-wrapper-builder

RUN rustup toolchain install nightly-2023-04-20 \
&& cargo +nightly-2023-04-20 install ink-wrapper --version ${INK_WRAPPER_VERSION} --locked --force
&& cargo +nightly-2023-04-20 install ink-wrapper --git https://github.com/Cardinal-Cryptography/ink-wrapper.git --rev ${INK_WRAPPER_VERSION} --locked --force

#
# ink! 4.0 optimizer
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

MAKEFILE_NAME := Ink development docker
DOCKER_NAME_INK_DEV := cardinal-cryptography/ink-dev
DOCKER_TAG := 1.8.0
DOCKER_TAG := 1.8.0-r12.1-57fde9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm like meh, if you can inspect the version and it's documented just bump semver?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So 1.9.0 or 2.0.0? I am not really sure how I should go about the versioning here. The variables are:

  1. cargo-contract
  2. ink-wrapper
  3. rust
  4. aleph-node version this particular image is compatible with.

Not every aleph-node change breaks the backwards compatibility, so the same ink-dev image can work with many deployments. Same with other packages here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not backward compatible, ie ink-dev won't work with aleph-node 11.X anymore, then 2.0.0 is a must

Copy link
Collaborator Author

@deuszx deuszx Nov 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's tricky b/c it will work and won't work at the same time. Since we added ink-wrapper to this image (and we hadn't initially) this adds another option to break backwards compatibility. For example, this particular image's cargoc-contract will work with 12 and 11 while its ink-wrapper won't.

I'll bump to 2.0.0 anyway.

I think it's more important to be clear about versions in the labels than correct numbering anyway.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# Native arch
BUILDARCH := $(shell uname -m)
Expand Down
Loading