deso-protocol / run

Run your own DeSo node
https://docs.deso.org
190 stars 94 forks source link

GetProfiles: Max value for NumToFetch exceeded #79

Closed lobovkin closed 3 years ago

lobovkin commented 3 years ago

Hello. There are breaking changes in the latest release. I can no longer request all profiles from my own node. Add the ability to change the fixed value of 100 to a custom value from the config.

maebeam commented 3 years ago

Sorry, we don't plan to make this a config value. You're welcome to run a custom fork if you want to fetch more profiles.

lobovkin commented 3 years ago

I can't just run a custom fork build from bitclout/backend, it shows after replacing /bitclout/bin/backend: "standard_init_linux.go:228: exec user process caused: no such file or directory" Can you post instructions on how you make a binary for bitclout/run docker?

tijno commented 3 years ago

@lobovkin this is what I use the build backend from source. It may help. I

Note that ive not tried this with the new DeSo repos. ll run it later today to make sure it functions as expected.

Assuming working folder /tmp

  1. clone core
  2. clone backend
  3. create dist folder
  4. create Dockerfile as per below
  5. run docker build -t bin --platform linux/amd64 --output dist/ .
  6. linux compatible backend now in /tmp/dist/backend

Dockerfile to build binary

FROM --platform=${BUILDPLATFORM} golang:1.16.5 AS build
WORKDIR /src
#ENV CGO_ENABLED=1

RUN apt update && apt install -y libvips-dev

COPY backend/go.mod backend/
COPY backend/go.sum backend/
COPY core/go.mod core/
COPY core/go.sum core/
COPY core/third_party/ core/third_party/

WORKDIR /src/backend

RUN go mod download

# include backend src
COPY backend/config  config
COPY backend/cmd     cmd
COPY backend/miner   miner
COPY backend/routes  routes
COPY backend/main.go .

# include core src
COPY core/clouthash ../core/clouthash
COPY core/cmd       ../core/cmd
COPY core/lib       ../core/lib
COPY core/migrate   ../core/migrate

# build backend
#RUN GOOS=linux go build -mod=mod -a -installsuffix cgo -o bin/backend main.go
ARG TARGETOS
ARG TARGETARCH
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -mod=mod -a -installsuffix cgo -o /out/backend main.go

FROM scratch AS bin-unix
COPY --from=build /out/backend /

FROM bin-unix AS bin-linux
FROM bin-unix AS bin-darwin

FROM scratch AS bin-windows
COPY --from=build /out/backend /backend.exe

FROM bin-${TARGETOS} AS bin