From 0406e23e96c4c9f02f0ff90a65b24fcbce6b7942 Mon Sep 17 00:00:00 2001 From: James Walker Date: Wed, 11 Dec 2024 15:34:31 -0500 Subject: [PATCH] rebase, add docker related pieces, fix logging --- .local.dev | 2 +- docker/bacalhau/Dockerfile | 4 +-- docker/docker-compose.base.yml | 29 ++------------------ docker/docker-compose.dev.yml | 3 +-- docker/docker-compose.yml | 28 ++------------------ docker/resource-provider/Dockerfile | 13 +-------- go.mod | 9 ++++--- go.sum | 41 ++++++++++------------------- pkg/options/bacalhau.go | 8 ++---- pkg/system/log.go | 2 ++ stack | 36 ------------------------- test/integration_test.go | 2 +- 12 files changed, 33 insertions(+), 144 deletions(-) diff --git a/.local.dev b/.local.dev index 2f93860d..daac550c 100644 --- a/.local.dev +++ b/.local.dev @@ -28,7 +28,7 @@ WEB3_STORAGE_ADDRESS_=0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e WEB3_TOKEN_ADDRESS_=0xa513E6E4b8f2a923D98304ec87F64353C4D5C853 WEB3_USERS_ADDRESS=0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82 BACALHAU_API_HOST=localhost -BACALHAU_API_PORT=20000 +BACALHAU_API_PORT=1234 JOB_STATUS_POLL_INTERVAL=5 BACALHAU_RESULTS_DIRECTORY= diff --git a/docker/bacalhau/Dockerfile b/docker/bacalhau/Dockerfile index e9d0869b..fdb92ef6 100644 --- a/docker/bacalhau/Dockerfile +++ b/docker/bacalhau/Dockerfile @@ -17,8 +17,8 @@ RUN mkdir -pm755 /etc/apt/keyrings && curl -o /etc/apt/keyrings/docker.asc -fsSL RUN nvidia-ctk runtime configure --runtime=docker --set-as-default # Install Bacalhau -ADD https://github.com/bacalhau-project/bacalhau/releases/download/v1.3.2/bacalhau_v1.3.2_linux_amd64.tar.gz . -RUN tar xfv bacalhau_v1.3.2_linux_amd64.tar.gz +ADD https://github.com/bacalhau-project/bacalhau/releases/download/v1.5.1/bacalhau_v1.5.1_linux_amd64.tar.gz . +RUN tar xfv bacalhau_v1.5.1_linux_amd64.tar.gz RUN mv bacalhau /usr/local/bin ADD https://raw.githubusercontent.com/moby/moby/refs/heads/master/hack/dind /usr/local/bin/dind diff --git a/docker/docker-compose.base.yml b/docker/docker-compose.base.yml index b70dee39..9bb88c2b 100644 --- a/docker/docker-compose.base.yml +++ b/docker/docker-compose.base.yml @@ -48,23 +48,11 @@ services: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=solver-db - ipfs: - image: ipfs/kubo:v0.32.1 - container_name: ipfs - restart: unless-stopped - ports: - - 127.0.0.1:5001:5001 - - 127.0.0.1:8080:8080 - volumes: - - ipfs-data:/data/ipfs bacalhau: image: ghcr.io/lilypad-tech/bacalhau container_name: bacalhau restart: unless-stopped privileged: true - depends_on: - ipfs: - condition: service_healthy build: context: .. dockerfile: ./docker/bacalhau/Dockerfile @@ -74,23 +62,10 @@ services: - BACALHAU_ENVIRONMENT=local ports: - 1234:1234 - command: - [ - "bacalhau", - "serve", - "--node-type", - "compute,requester", - "--peer", - "none", - "--private-internal-ipfs=false", - "--job-selection-accept-networked", - "--ipfs-connect", - "/dns4/ipfs/tcp/5001", - ] + command: ["bacalhau", "serve", "--orchestrator", "--compute"] volumes: - - bacalhau-data:/root/.bacalhau + - ${HOME}/.bacalhau:/root/.bacalhau volumes: chain-data: ipfs-data: - bacalhau-data: postgres-data: diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 2a6c1432..4ed9160a 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -50,8 +50,6 @@ services: container_name: resource-provider restart: unless-stopped depends_on: - ipfs: - condition: service_healthy solver: condition: service_healthy bacalhau: @@ -68,6 +66,7 @@ services: - "localhost:host-gateway" volumes: - lilypad-data:/tmp/lilypad/data + - ${HOME}/.bacalhau:/root/.bacalhau environment: - WEB3_PRIVATE_KEY=${RESOURCE_PROVIDER_PRIVATE_KEY} - IPFS_CONNECT=/dns4/ipfs/tcp/5001 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 0923e5c2..768aa871 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,41 +1,16 @@ # This is a docker-compose file for use by Resource Providers services: - ipfs: - image: ipfs/kubo:v0.32.1 - container_name: ipfs - restart: unless-stopped - ports: - - 4001:4001 - - 127.0.0.1:5001:5001 - - 127.0.0.1:8080:8080 - volumes: - - ipfs-data:/data/ipfs bacalhau: image: ghcr.io/lilypad-tech/bacalhau container_name: bacalhau restart: unless-stopped privileged: true - depends_on: - ipfs: - condition: service_healthy build: context: .. dockerfile: ./docker/bacalhau/Dockerfile environment: - BACALHAU_ENVIRONMENT=local - command: - [ - "bacalhau", - "serve", - "--node-type", - "compute,requester", - "--peer", - "none", - "--private-internal-ipfs=false", - "--job-selection-accept-networked", - "--ipfs-connect", - "/dns4/ipfs/tcp/5001", - ] + command: ["bacalhau", "serve", "--orchestrator", "--compute"] volumes: - bacalhau-data:/root/.bacalhau resource-provider: @@ -51,6 +26,7 @@ services: - COMPUTE_MODE=gpu volumes: - lilypad-data:/tmp/lilypad/data + - bacalhau-data:/root/.bacalhau environment: - WEB3_PRIVATE_KEY - WEB3_RPC_URL diff --git a/docker/resource-provider/Dockerfile b/docker/resource-provider/Dockerfile index ee04be1c..318b7ae4 100644 --- a/docker/resource-provider/Dockerfile +++ b/docker/resource-provider/Dockerfile @@ -1,6 +1,6 @@ ARG COMPUTE_MODE=gpu -FROM golang:1.22.4 AS base +FROM golang:latest AS base WORKDIR /usr/src/app ARG NETWORK=testnet ARG VERSION @@ -33,13 +33,6 @@ RUN mv lilypad /usr/local/bin # Install necessary dependencies RUN apt update && apt install -y wget bash curl && apt clean -# Install Bacalhau -RUN cd /tmp && \ - wget https://github.com/bacalhau-project/bacalhau/releases/download/v1.3.2/bacalhau_v1.3.2_linux_amd64.tar.gz && \ - tar xfv bacalhau_v1.3.2_linux_amd64.tar.gz && \ - mv bacalhau /usr/local/bin/bacalhau && \ - rm bacalhau_v1.3.2_linux_amd64.tar.gz - # Add both lilypad and bacalhau executables to PATH ENV PATH="/usr/local/bin:${PATH}" @@ -47,10 +40,6 @@ ENV PATH="/usr/local/bin:${PATH}" RUN touch run RUN echo "#!/bin/bash" >> run -# Ensure bacalhau is initialized -RUN echo "export BACALHAU_ENVIRONMENT=local" >> run -RUN echo "bacalhau id" >> run - # Launch Lilypad RUN echo "/usr/local/bin/lilypad resource-provider --network ${NETWORK} --disable-pow=${DISABLE_POW} --disable-telemetry=${DISABLE_TELEMETRY} &" >> run RUN echo "wait -n" >> run diff --git a/go.mod b/go.mod index 996dfa26..ac8dcf2f 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ toolchain go1.23.2 require ( github.com/BurntSushi/toml v0.3.1 - github.com/bacalhau-project/bacalhau v1.5.2 + github.com/bacalhau-project/bacalhau v1.5.1 github.com/ethereum/go-ethereum v1.13.4 - github.com/fatih/color v1.15.0 + github.com/fatih/color v1.16.0 github.com/go-chi/httprate v0.14.1 github.com/go-git/go-git/v5 v5.10.0 github.com/google/uuid v1.6.0 @@ -35,8 +35,8 @@ require ( go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.55.0 go.opentelemetry.io/otel v1.32.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0 go.opentelemetry.io/otel/metric v1.32.0 go.opentelemetry.io/otel/sdk v1.32.0 go.opentelemetry.io/otel/sdk/metric v1.32.0 @@ -190,6 +190,7 @@ require ( github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect diff --git a/go.sum b/go.sum index e7073a8c..0a0a2e61 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,8 @@ github.com/apache/arrow/go/arrow v0.0.0-20210105145422-88aaea5262db/go.mod h1:c9 github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/awalterschulze/gographviz v0.0.0-20190221210632-1e9ccb565bca/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= -github.com/bacalhau-project/bacalhau v1.5.2 h1:NZ1SNv+YfV0DmvJsQFOa2JgFEUsSyC7rnYheas1F1I8= -github.com/bacalhau-project/bacalhau v1.5.2/go.mod h1:ksxN9z3COsbEckJ1ydxvIkJiWQP24iSmhjmgH2bmVlY= +github.com/bacalhau-project/bacalhau v1.5.1 h1:E3QT2ecdDlP2CgWNMwCw36lXACmBtwg8lbHU3mTf8TU= +github.com/bacalhau-project/bacalhau v1.5.1/go.mod h1:6YHQlLmu4qMcN0qdEfeEXZfYyUDVxpCT6f4y8ANlP8s= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -274,9 +274,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= @@ -464,8 +462,8 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= -github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0= +github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0= @@ -803,12 +801,12 @@ go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 h1:t/Qur3vKSkUCcDVaSumWF2PKHt85pc7fRvFuoVT8qFU= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0/go.mod h1:Rl61tySSdcOJWoEgYZVtmnKdA0GeKrSqkHC1t+91CH8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 h1:IJFEoHiytixx8cMiVAO+GmHR6Frwu+u5Ur8njpFO6Ac= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0/go.mod h1:3rHrKNtLIoS0oZwkY2vxi+oJcwFRWdtUyRII+so45p8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0 h1:cMyu9O88joYEaI47CnQkxO1XZdpoTF9fEnW2duIddhw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0/go.mod h1:6Am3rn7P9TVVeXYG+wtcGE7IE1tsQ+bP3AuWcKt/gOI= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= go.opentelemetry.io/otel/exporters/zipkin v1.27.0 h1:aXcxb7F6ZDC1o2Z52LDfS2g6M2FB5CrxdR2gzY4QRNs= @@ -834,8 +832,8 @@ go.uber.org/fx v1.22.1/go.mod h1:HT2M7d7RHo+ebKGh9NRcrsrHHfpZ60nW3QRubMRfv48= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= -go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -968,10 +966,7 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1012,8 +1007,8 @@ golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1098,12 +1093,6 @@ google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200911024640-645f7a48b24f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= @@ -1118,8 +1107,6 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v0.0.0-20200910201057-6591123024b3/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= diff --git a/pkg/options/bacalhau.go b/pkg/options/bacalhau.go index 0cec186f..a3a0bb5e 100644 --- a/pkg/options/bacalhau.go +++ b/pkg/options/bacalhau.go @@ -17,13 +17,9 @@ func GetDefaultBacalhauOptions() bacalhau.BacalhauExecutorOptions { resultsPath := filepath.Join(home, ".bacalhau", "compute", "results", "local-publisher") - - - - return bacalhau.BacalhauExecutorOptions{ - ApiHost: GetDefaultServeOptionString("BACALHAU_API_HOST", "localhost"), - ApiPort: GetDefaultServeOptionString("BACALHAU_API_PORT", "20000"), + ApiHost: GetDefaultServeOptionString("BACALHAU_API_HOST", "localhost"), + ApiPort: GetDefaultServeOptionString("BACALHAU_API_PORT", "1234"), JobStatusPollInterval: GetDefaultServeOptionUint64("JOB_STATUS_POLL_INTERVAL", 5), ResultsDirectory: GetDefaultServeOptionString("BACALHAU_RESULTS_DIRECTORY", resultsPath), } diff --git a/pkg/system/log.go b/pkg/system/log.go index 742f84c0..4583f258 100644 --- a/pkg/system/log.go +++ b/pkg/system/log.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "time" + "github.com/rs/zerolog" "github.com/rs/zerolog/log" ) @@ -49,6 +50,7 @@ func SetupLogging() { logLevel = parsedLogLevel } zerolog.CallerSkipFrameCount = 3 // Skip 3 frames (this function, log.Output, log.Logger) + zerolog.SetGlobalLevel(logLevel) log.Logger = log.Output(output).With().Caller().Logger().Level(logLevel) } diff --git a/stack b/stack index 3dae423f..3521d307 100755 --- a/stack +++ b/stack @@ -252,42 +252,6 @@ function integration-tests() { go test -v -tags="integration" -count 1 ./... } -############################################################################ -# run -# -# Note: The presence of the WEB3_PRIVATE_KEY here is only necessary for local development. You are advised not to import this key into a wallet nor use it for anything other for testing Lilypad locally -############################################################################ -function dev1(){ - export DISABLE_TELEMETRY=true - chain-clean - echo "========CHAIN CLEANED========" - clear - echo "========CHAIN========" - chain -} - -function dev2(){ - export DISABLE_TELEMETRY=true - echo "========BOOTING UP CHAIN========" - chain-boot - echo "========CHAIN BOOTED========" - clear - echo "========SOLVER========" - solver -} -function dev3(){ - export DISABLE_TELEMETRY=true - echo "========BACALHAU EXECUTOR========" - bacalhau-node -} - -function dev4(){ - export DISABLE_TELEMETRY=true - echo "========RESOURCE PROVIDER========" - resource-provider -} - - ############################################################################ # run # diff --git a/test/integration_test.go b/test/integration_test.go index 86620adc..e59ecafe 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -122,7 +122,7 @@ func TestNoModeration(t *testing.T) { }) assert.NoError(t, err, "there was an error running the job") - assert.Equal(t, "QmbCi3yoKzckff24rUJML1ZesVb35cd2LUNMiMYksEGkWv", result.Result.DataID, "the data ID was correct") + assert.Equal(t, "bafkreiha5hvgjgjufi4ecc4enp7bpq3jwxiha465nmibyuljnpw4rs2d5m", result.Result.DataID, "the data ID was correct") localPath := solver.GetDownloadsFilePath(result.Result.DealID) fmt.Printf("local path: %s\n", localPath)