DogeCoin full node

Im running a small k3s cluster and I was trying to run a full DogeCoin node to do some investigation about how to get info from the chain on a cryptocurrency

Here is a way to run a node on arm64 arquitecture:

Dockerfile

FROM arm64v8/ubuntu:latest
RUN apt-get update
RUN apt-get -y install wget
WORKDIR /usr/src
RUN wget https://github.com/dogecoin/dogecoin/releases/download/v1.14.2/dogecoin-1.14.2-aarch64-linux-gnu.tar.gz
RUN tar -xzvf dogecoin-1.14.2-aarch64-linux-gnu.tar.gz
RUN chmod +x dogecoin-1.14.2/bin/dogecoind dogecoin-1.14.2/bin/dogecoin-cli
RUN ln -s /usr/src/dogecoin-1.14.2/bin/dogecoind /usr/bin/dogecoind
RUN ln -s /usr/src/dogecoin-1.14.2/bin/dogecoin-cli /usr/bin/dogecoin-cli
WORKDIR /root/.dogecoin
EXPOSE 22555 22556 44555 44556
CMD ["dogecoind", "-printtoconsole"]

If you need any specific version, on the release page of the project you can get the link.

When you start a node on a cryptocurrency will pull all the data to verify, a good practice is to pull the data to bootstrap the node. DogeCoin people provide a .dat file with it here: https://bootstrap.sochain.com/

In my case using kubernetes this is a deployment file to create a pod for the node and a pod to initialize:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: dogecoind
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: dogecoind
      app.kubernetes.io/instance: dogecoind
  template:
    metadata:
      labels:
        app.kubernetes.io/name: dogecoind
        app.kubernetes.io/instance: dogecoindabag
      imagePullSecrets:
      - name: regcred
      containers:
      - name: dogecoind
        image: your-registry.com/dogecoin-core:latest
        imagePullPolicy: IfNotPresent
        command: ["dogecoind"]
        args:
          - -printtoconsole
          - -server=1
          - -txindex=1
          - -rpcallowip=0.0.0.0/0
          - -disablewallet=0
          - -shrinkdebuglog=1
          - -rpcuser=your-user
          - -rpcpassword=your-password
        resources:
            limits:
              cpu: 750m
              memory: 1Gi
            requests:
              cpu: 750m
              memory: 1Gi
        volumeMounts:
        - name: dogecoin
          mountPath: /root/.dogecoin
      initContainers:
        - name: download-bootstrap-dat
          image: arm64v8/ubuntu:latest
          command: ["/bin/sh","-c"]
          args: ["apt update; apt install -y wget; cd /root/.dogecoin; wget https://bootstrap.sochain.com/bootstrap.dat -P /root/.dogecoin"]
          volumeMounts:
          - name: dogecoin
            mountPath: /root/.dogecoin
      volumes:
      - name: dogecoin
        persistentVolumeClaim:
          claimName: dogecoin

After download-bootstrap-dat finish the pod will start and will reindex bootstrap.dat with all the node information.

#dogecoin #fullnode #blockchain