hashgraph / hashgraph/solo-weaver

Add support to configure BN backfill sources

Open
#648 0 comments 0 reactions 0 assignees View on GitHub
New Feature Pending Triage
Dominant language
Go
Stars
3
Forks
0
Avg merge
3d 2h
Merged PRs (30d)
46

Description

### Requested Feature

Add support for solo-weaver to provision **default Block Node (BN) backfill sources** when it installs
a **Tier-1 BN**, mirroring the shape of the block-node chart override
[`charts/block-node-server/values-overrides/backfill.yaml`](https://github.com/hiero-ledger/hiero-block-node/blob/main/charts/block-node-server/values-overrides/backfill.yaml)
(the `blockNode.backfill.*` / `block-node-sources.json` configuration).

Concretely:

- **Maintain a default, version-controlled backfill sources list** in solo-weaver — the set of
well-known source BNs a freshly installed Tier-1 BN should pull from (e.g. the special-purpose /
"Tier-0" WRB source and peer Tier-1 nodes), each with an `address`, `port`, and `priority`.
- **On a Tier-1 BN install, set the backfill properties in the BN Helm chart values** so the operator
gets a working configuration out of the box, i.e. populate:
- `blockNode.config.BACKFILL_BLOCK_NODE_SOURCES_PATH`
- `blockNode.backfill.path` / `blockNode.backfill.filename` (must match the path above)
- `blockNode.backfill.sources` (the list of `{address, port, priority}`)
- **Notify the operator that the list is customizable** — they may reorder/adjust `priority`, add or
remove sources, or substitute their own list for their environment.

Example of the target format (one source on the same cluster):

```yaml
blockNode:
config:
BACKFILL_BLOCK_NODE_SOURCES_PATH: "/opt/hiero/block-node/backfill/block-node-sources.json"
backfill:
path: "/opt/hiero/block-node/backfill"
filename: "block-node-sources.json"
sources:
- address: "source-block-node-helm-chart.source.svc.cluster.local"
port: 40840
priority: 1
```

### TUI consideration

During a Tier-1 install, the TUI should make it easy for the operator to:

1. **Review/validate** the default backfill sources list before it is applied (show
address/port/priority; flag obvious issues such as duplicates, unreachable-looking addresses, or a
`path` that does not match `BACKFILL_BLOCK_NODE_SOURCES_PATH`).
2. **Modify priorities** (and add/remove sources) inline, or
3. **Point to a file on disk** that already contains the desired backfill list in the
`blockNode.backfill.sources` format, which solo-weaver uses instead of the bundled default.

The default should apply automatically (with the customize prompt) so the common case needs no manual
editing, while operators with specific routing needs can override.

### Business Need

Tier-1 BNs rely on a backfill source list to pull historical and missed blocks from upstream BNs. This
is required for the WRB rollout, where Council-operated Tier-1 nodes must backfill from the
special-purpose ("Tier-0") WRB Block Node (and peers). Today an operator must hand-author
`backfill.yaml`/`block-node-sources.json`, which is error-prone (path mismatches, wrong ports/priorities)
and easy to omit entirely. Having solo-weaver ship and apply a **maintained default** gives Tier-1
operators a working configuration immediately, reduces misconfiguration during onboarding, and lets the
recommended source set evolve centrally as the topology changes — while still letting operators tune
priorities or supply their own list.

### Additional Context

- Reference shape and field semantics: hiero-block-node
`charts/block-node-server/values-overrides/backfill.yaml` and the BN backfill plugin
(`BACKFILL_BLOCK_NODE_SOURCES_PATH`, `blockNode.backfill.sources` with `address`/`port`/`priority`;
lower `priority` value = preferred source).
- Constraint to validate: `blockNode.backfill.path` + `filename` must resolve to the same location as
`blockNode.config.BACKFILL_BLOCK_NODE_SOURCES_PATH`.
- Vendor-agnostic: this is BN configuration provisioning (Helm values + a TUI prompt), not a
cloud-vendor integration.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.