<!-- XE-13300 · [net/sync.go] M14: peerSyncWorker tidak pakai backoff — sync gagal berulang · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13300>. The page is the record; this is the same page for reading.*

XE-13300 · Bounty

# \[net/sync.go\] M14: peerSyncWorker tidak pakai backoff — sync gagal berulang

Closed · invalid
—
[xe#445](https://github.com/xeprotocol/xe/issues/445)
filed 2026-11-12 02:53 UTC
by wahyu20260100233-ops

Verdict
:   Invalid

Tier
:   —

Claimed
:   —

Area
:   P2P / sync

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:51 UTC

Told
:   2026-11-20 00:49 UTC

### Patches

None linked.

### History

- [557425](https://bounty.xe.network/log/557425) 2026-11-20 00:49 UTC reply.mirrored
- [557080](https://bounty.xe.network/log/557080) 2026-11-20 00:48 UTC reply.sent
- [554840](https://bounty.xe.network/log/554840) 2026-11-20 00:37 UTC github.state\_pushed
- [554833](https://bounty.xe.network/log/554833) 2026-11-20 00:37 UTC github.labels
- [553351](https://bounty.xe.network/log/553351) 2026-11-20 00:33 UTC proposal.adopted
- [553155](https://bounty.xe.network/log/553155) 2026-11-20 00:33 UTC proposal.adopted
- [553154](https://bounty.xe.network/log/553154) 2026-11-20 00:33 UTC ticket.status new → closed
- [552723](https://bounty.xe.network/log/552723) 2026-11-20 00:33 UTC proposal.adopted
- [552722](https://bounty.xe.network/log/552722) 2026-11-20 00:33 UTC ticket.facts area
- [552717](https://bounty.xe.network/log/552717) 2026-11-20 00:33 UTC proposal.adopted
- [552716](https://bounty.xe.network/log/552716) 2026-11-20 00:33 UTC ticket.facts
- [550867](https://bounty.xe.network/log/550867) 2026-11-20 00:31 UTC note.added

[Full history](https://bounty.xe.network/log?ref=XE-13300) · [JSON](https://bounty.xe.network/v1/tickets/XE-13300) · [markdown](https://bounty.xe.network/XE-13300.md)

### Report

## Ringkasan

Kalau sync gagal, worker langsung retry tanpa jeda. Bisa menyebabkan sync storm (banyak sync attempt sekaligus).

## Lokasi

- File: `net/sync.go`
- Lines: 383-404

## Kode

```
func (t *tracker) peerSyncWorker(ctx context.Context, h host.Host, pid peer.ID) {
    ...
    for {
        select {
        case <-ctx.Done():
            return
        case <-t.syncCh[pid]:
            if err := t.SyncTo(ctx, h, pid); err != nil {
                logging.Warnf("sync: failed to sync with %s: %v", pid, err)
            }
        }
    }
}
```

## Impact

Sync gagal berulang tanpa jeda. Network congestion, waste resource.

## Suggested Fix

```
func (t *tracker) peerSyncWorker(ctx context.Context, h host.Host, pid peer.ID) {
    ...
    backoff := time.Second
    for {
        select {
        case <-ctx.Done():
            return
        case <-t.syncCh[pid]:
            if err := t.SyncTo(ctx, h, pid); err != nil {
                logging.Warnf("sync: failed to sync with %s: %v", pid, err)
                time.Sleep(backoff)
                backoff *= 2
                if backoff > 30*time.Second {
                    backoff = 30 * time.Second
                }
            } else {
                backoff = time.Second
            }
        }
    }
}
```

### Thread

**XE desk**team2026-11-20 00:49 UTCgithub

Thanks for the report. We read it against the code and could not confirm a bug in what it describes.

This report is closed as invalid. If we have missed something, file a new report that links
https://bounty.xe.network/XE-13300 and says what; it is read like any other.
