You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Give dig-node a dig_chainsource_interface::ChainSource and wire dig_mirror_coin::census to it, so a
node can record epoch n rather than only the genesis epoch.
Why — this is the gap between "the record store exists" and "a node knows its requirement"
Everything around it shipped today:
shipped
what it does
dig-mirror-collateral 0.3.0
the arithmetic — required_per_store, the controller, the protocol versioning
dig-mirror-coin 0.7.0
census — counts collateralised stores, owners and locked totals at the census height
dig-node-control-interface 0.24.0
four control methods, including control.collateral.buffer
the immutable per-epoch record store, peer-record verification, dig.getCollateralEpoch, retention
But dig-node has no dependency on dig-mirror-coin at all — git grep dig-mirror-coin -- '*/Cargo.toml'
returns nothing on origin/main — and does not implement ChainSource. So:
bring_up_collateral_records() records epoch 1 only, which is derivable from nothing.
dign collateral requirement answers unknown for the current epoch, correctly and indefinitely.
Sampled sync cannot cover for it.verify and adopt are complete and tested against forged
records, but without a chain source the population is unknown, so adopt returns Advisory every
time and never adopts. The safety property holds; the capability does not arrive.
The consequence worth stating plainly
The epoch-104 output quoted as this family's evidence — 3.780 DIG per store, from 17 advertisement(s) across 820 collateralised owner(s) — rendered a hand-placed record. The command genuinely works and
the arithmetic is right; the provenance was a fixture. That was corrected on the epic
(https://github.com/DIG-Network/dig_ecosystem/issues/3173#issuecomment-5457908969), and this ticket is
what makes such output real.
What to build
A ChainSource implementation in dig-node, or an adapter over what the node already has. Check
first whether chia-query already satisfies the trait or nearly does — it is the ecosystem's
canonical coinset access layer, and re-deriving chain reads beside it would be a rival implementation.
Depend on dig-mirror-coin 0.7.0 and call census at the epoch census height.
Write the resulting record through EpochRecordStore::put, which PR feat(collateral): per-epoch record, gossip serve, sampled sync #398 made immutable
(PutOutcome::Conflict on any differing record) and which already distinguishes bootstrap / censused / adopted_from_peers provenance.
What NOT to do
Do not restate any arithmetic.required_per_store is the whole answer; equilibrium × multiplier − handicap omits the floor clamp and is wrong as a formula. Call the function.
Do not let a census failure become a figure. A node that cannot census says unknown with a
reason — never zero, never a stale neighbouring epoch. Six instances of "an unknown rendered as a
reassuring answer" were found and fixed in this family this week; the newest surface is the easiest
place for a seventh.
dign collateral requirement answering for the current epoch on a real node.
Sampled sync becoming meaningful — with a known population, adopt can do something other than Advisory.
The wiring lane's own note from PR feat(collateral): per-epoch record, gossip serve, sampled sync #398: cap the collected set at plan.sample_size at the
collection site, so SampleExceeded stays a backstop rather than the primary bound — otherwise one
identity answering once can deny adoption to everyone.
Acceptance
On a real node with no seeded file: dign collateral requirement reports the current epoch's
requirement, derived from a census this node performed, with provenance: censused and a real census_height in the record. A node that cannot reach a chain source says unknown with its reason.
Parent epic: https://github.com/DIG-Network/dig_ecosystem/issues/3173
Task
Give dig-node a
dig_chainsource_interface::ChainSourceand wiredig_mirror_coin::censusto it, so anode can record epoch n rather than only the genesis epoch.
Why — this is the gap between "the record store exists" and "a node knows its requirement"
Everything around it shipped today:
dig-mirror-collateral0.3.0required_per_store, the controller, the protocol versioningdig-mirror-coin0.7.0census— counts collateralised stores, owners and locked totals at the census heightdig-node-control-interface0.24.0control.collateral.buffer26e640d8)dig.getCollateralEpoch, retentionBut dig-node has no dependency on
dig-mirror-coinat all —git grep dig-mirror-coin -- '*/Cargo.toml'returns nothing on
origin/main— and does not implementChainSource. So:bring_up_collateral_records()records epoch 1 only, which is derivable from nothing.dign collateral requirementanswersunknownfor the current epoch, correctly and indefinitely.verifyandadoptare complete and tested against forgedrecords, but without a chain source the population is unknown, so
adoptreturnsAdvisoryeverytime and never adopts. The safety property holds; the capability does not arrive.
The consequence worth stating plainly
The epoch-104 output quoted as this family's evidence —
3.780 DIG per store, from 17 advertisement(s) across 820 collateralised owner(s)— rendered a hand-placed record. The command genuinely works andthe arithmetic is right; the provenance was a fixture. That was corrected on the epic
(https://github.com/DIG-Network/dig_ecosystem/issues/3173#issuecomment-5457908969), and this ticket is
what makes such output real.
What to build
ChainSourceimplementation in dig-node, or an adapter over what the node already has. Checkfirst whether
chia-queryalready satisfies the trait or nearly does — it is the ecosystem'scanonical coinset access layer, and re-deriving chain reads beside it would be a rival implementation.
dig-mirror-coin0.7.0 and callcensusat the epoch census height.EpochRecordStore::put, which PR feat(collateral): per-epoch record, gossip serve, sampled sync #398 made immutable(
PutOutcome::Conflicton any differing record) and which already distinguishesbootstrap/censused/adopted_from_peersprovenance.What NOT to do
required_per_storeis the whole answer;equilibrium × multiplier − handicapomits the floor clamp and is wrong as a formula. Call the function.reason — never zero, never a stale neighbouring epoch. Six instances of "an unknown rendered as a
reassuring answer" were found and fixed in this family this week; the newest surface is the easiest
place for a seventh.
writes must carry the version that computed it.
What this unblocks
dign collateral requirementanswering for the current epoch on a real node.adoptcan do something other thanAdvisory.plan.sample_sizeat thecollection site, so
SampleExceededstays a backstop rather than the primary bound — otherwise oneidentity answering once can deny adoption to everyone.
Acceptance
On a real node with no seeded file:
dign collateral requirementreports the current epoch'srequirement, derived from a census this node performed, with
provenance: censusedand a realcensus_heightin the record. A node that cannot reach a chain source saysunknownwith its reason.