Skip to content

Routing/HTTP router: routing provide and fast-provide do not provide to HTTP router (kubo 0.38 and 0.39) #11089

@Rinse12

Description

@Rinse12

Checklist

Installation method

dist.ipfs.tech or ipfs-update

Version

`ipfs version 0.39.0`

Config

{
  "API": {
    "HTTPHeaders": null
  },
  "Addresses": {
    "API": "/ip4/127.0.0.1/tcp/0",
    "Announce": [],
    "AppendAnnounce": [],
    "Gateway": "/ip4/127.0.0.1/tcp/0",
    "NoAnnounce": [],
    "Swarm": [
      "/ip4/0.0.0.0/tcp/0"
    ]
  },
  "AutoNAT": {},
  "Autorelay": {},
  "Bootstrap": [],
  "DNS": {
    "Resolvers": {}
  },
  "Datastore": {},
  "Discovery": {
    "MDNS": {
      "Enabled": false
    }
  },
  "Experimental": {},
  "Gateway": {},
  "Identity": {},
  "Internal": {},
  "Ipns": {},
  "Migration": {},
  "Mounts": {},
  "Peering": {},
  "Pinning": {},
  "Plugins": {},
  "Profiles": {},
  "Provider": {},
  "Pubsub": {},
  "Reprovider": {},
  "Routing": {
    "Methods": {
      "find-peers": {
        "RouterName": "HttpRouterNotSupported"
      },
      "find-providers": {
        "RouterName": "HttpRoutersParallel"
      },
      "get-ipns": {
        "RouterName": "HttpRouterNotSupported"
      },
      "provide": {
        "RouterName": "HttpRoutersParallel"
      },
      "put-ipns": {
        "RouterName": "HttpRouterNotSupported"
      }
    },
    "Routers": {
      "HttpRouter1": {
        "Parameters": {
          "Endpoint": "http://127.0.0.1:19575"
        },
        "Type": "http"
      },
      "HttpRouterNotSupported": {
        "Parameters": {
          "Endpoint": "http://kubohttprouternotsupported"
        },
        "Type": "http"
      },
      "HttpRoutersParallel": {
        "Parameters": {
          "Routers": [
            {
              "IgnoreErrors": true,
              "RouterName": "HttpRouter1",
              "Timeout": "10s"
            }
          ]
        },
        "Type": "parallel"
      }
    },
    "Type": "custom"
  },
  "Swarm": {}
}

Description

When Kubo is configured to use an HTTP router, routing provide (and the implicit provide triggered by --fast-provide-wait) does not send any provider records to the HTTP router on Kubo 0.38.x and 0.39.0. On Kubo 0.37.0, a plain ipfs add still sends PUTs to the HTTP router containing the CID.

What I was doing: Starting a fresh repo, configuring Routing.* to point at a local mock HTTP router, starting the daemon, then adding a file with ipfs add (with --fast-provide-wait when available on 0.39) and calling ipfs routing provide --recursive --verbose on the added CID and its raw-multihash form. The mock HTTP router records all requests.

What happened: On Kubo 0.38.x and 0.39.0, the HTTP router receives zero requests (no PUT /routing/v1/providers). On Kubo 0.37.0, the add triggers PUTs that include the CID.

Error messages: None from routing provide on 0.38/0.39 (it returns 200);

Steps to reproduce (self-contained repo):

  1. Clone repo: https://github.com/Rinse12/Reproduce-not-providing-on-0.39
  2. npm install (uses kubo npm package)
  3. Run npm run repro
    • Starts a mock HTTP router on 127.0.0.1:19575
    • Inits a fresh Kubo repo, sets Routing.* to the mock router, randomizes ports, disables MDNS
    • Starts daemon, ipfs add --fast-provide-wait (or falls back to plain add), then ipfs routing provide --recursive --verbose (CID + raw multihash)
    • Prints every request the mock router received and checks for the added CID in v0, v1, and raw (0x55) forms
  4. Observe output:
    • 0.39.0: Router requests: [] (no provider PUTs)
    • 0.38.0: PUTs arrive but contain unrelated keys, not the added CID
    • 0.37.0: PUTs contain the added CID after add; explicit routing/provide fails with “no connected peers.”

Expected: provider records for the added CID (dag-pb and raw multihash) should be sent to the configured HTTP router.

Metadata

Metadata

Assignees

Labels

kind/bugA bug in existing code (including security flaws)need/maintainer-inputNeeds input from the current maintainer(s)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions