Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Pricing protocol should not gate connections from bootnode-mode peers

Aperta
#5,496 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@acud ci sta già lavorando.

Dal 22/7/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

seen

Context

Bee's libp2p layer disconnects peers whose pricing ConnectIn / ConnectOut hook returns an error (pkg/p2p/libp2p/libp2p.go around the notifier paths, with the ErrThresholdTooLow / "protocol not supported" failure modes from pkg/pricing/pricing.go). The pricing init always opens a stream to the remote: if the remote does not advertise /swarm/pricing/1.0.0/pricing, bee tears the connection down immediately after handshake.

This makes pricing a hard prerequisite for any peer that wants to stay connected to a bee node — including bootnodes, which conceptually do not participate in chunk accounting at all (they have no payment state to advertise and no incentive to forward chunks). Independent Rust implementations like vertex have a choice between (a) carrying a pricing stub in every bootnode just to satisfy bee's connect notifier, or (b) being forced to disconnect after handshake.

What we are asking for

Make the pricing protocol optional for connections where at least one side advertises itself as a bootnode (whether via the existing BootnodeMode flag, the node type that already drives hive's peersHandler early return, or any other signal bee already has). Concretely: skip the pricing init step entirely when the local node is bootnode-mode, and tolerate "protocol not supported" from the remote when the remote signals bootnode-mode. That removes the requirement for a downstream impl to carry a pricing stub purely for connection-keepalive.

Why this is the right shape

  • Pricing's semantic content is chunk accounting; bootnodes are explicitly outside that subsystem. There is no event a bootnode would generate that pricing needs to observe, and no threshold a bootnode has to announce.
  • Bootnodes already short-circuit hive ingestion via BootnodeMode (pkg/hive/hive.go:283-284). Doing the same for pricing closes a parallel "bootnodes do not participate in this accounting subsystem" hole.
  • Independent implementations are forced to maintain a stub today purely as a compatibility shim. Removing the requirement upstream makes the cross-impl story cleaner and removes a class of "stub kept the connection alive but contributed nothing to operator visibility" bugs.

Acceptance criteria

  • A bee node configured in BootnodeMode does not initiate a pricing stream on outbound / inbound connection establishment.
  • A bee node connecting to a peer that does not advertise /swarm/pricing/1.0.0/pricing does not disconnect on that grounds alone when the remote is signalled as bootnode-mode.
  • Existing pricing / accounting flows between non-bootnode peers are unchanged.
Lingua principale
Go
Stelle
1.5k
Fork
390
Merge medio
2g 23h
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ethersphere/bee

Tutte le issue di ethersphere/bee

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.