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

Hardfork issues with docker setup #360

Closed
0x4r45h opened this issue Mar 27, 2024 · 0 comments
Closed

Hardfork issues with docker setup #360

0x4r45h opened this issue Mar 27, 2024 · 0 comments

Comments

@0x4r45h
Copy link
Contributor

0x4r45h commented Mar 27, 2024

The hard fork procedure and state migration are tricky and problematic for docker setups. I created this issue to discuss potential workarounds with the team and pilots using docker.

Issues

  1. the namada binary inside docker image ghcr.io/anoma/namada:namada-v0.31.10 is on version 0.31.9 instead of 0.31.10
  2. you can't download and run pre-built binaries https://github.com/anoma/namada/releases/tag/v0.31.10 inside the previous docker containers because it requires a higher version of glibc GLIBC_2.33 but the version on bullseye image is GLIBC_2.31

Workarounds

I made an intermediate image just for the migration step. something like this :

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
    curl \
    nano \
    jq \
    dnsutils \
    wget \
    perl \
    iputils-ping \
    && apt-get clean

RUN useradd namada
RUN mkdir /hardfork && chown namada:namada /hardfork
USER namada
COPY hardfork /hardfork
WORKDIR /hardfork

The hardfork directory has the following structure (download the files manually before building the docker image)

hardfork
├── make-db-migration
├── namada-0.31.10
├── namadac-0.31.10
├── namadan-0.31.10
├── namadaw-0.31.10
└── wasm
    ├── checksums.json
    └── vp_user.6065919f895d43099a567cb120ebdfa0c99c3ba4e803fe99159a14bd8f97f0ea.wasm

build and tag this image. i call it hardfork

Steps

  1. wait until node reaches the target block and suspends, then stop and remove the container
  2. MAKE A BACKUP from volume/bindmount somewhere else
  3. run a new container with hardfork image we just created earlier, with Exact mount paths. exec into it.
  4. inside the container cd into /hardfork path. now if you mounted the namada data dir correctly, you have everything needed to generate migrations.json file
  5. wait for team to announce the shasum of the file, if everything is correct copy it into the volumes directory before leaving the intermediate container
  6. from this step you can use the official docker image ghcr.io/anoma/namada:namada-v0.32.1 for your validators container. make sure before running it with the default command, change its entry point and exec into it, and follow the instructions for the rest of the migration

Please share your thoughts. did I miss anything? is there a better and cleaner approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant