child_adopt_refused: The on-chain child does not match the prepared child adoption
POST /owner/v1/streams/:id/children/adopt reads every prepared fact of the child back from the version 2 vault before it records anything: the child's budget, parent stream, sender, service node, session key, rate, cap and holdback, that it binds no terms, and that neither it nor its parent is revoked and that it has settled nothing. When one of them differs, or the preparation has expired or was used for another on-chain stream, the adoption is refused and nothing is recorded. An unused preparation stays usable until its expiresAt. POST /owner/v1/streams/:id/children/adopt-prepare answers the same code, with check adoption_expired, when its requestRef repeats a preparation that expired unused.
errorDetail.check names the check that failed, and errorDetail.param names the request field it concerns (streamRef, txHash or adoptionId). Both child adoption routes send errorDetail to every client, with or without Dynamo-Error-Detail: 1; detail also names the check in words.
check | What differs |
|---|---|
stream_exists | No stream with this id exists on this deployment's vault |
stream_taken | The on-chain stream is already recorded on this deployment |
tx_receipt | The transaction has no receipt, reverted, or did not open exactly one stream on this vault |
child_budget | The stream belongs to another on-chain budget |
child_parent | The stream has another parent stream |
child_opener | The stream (or transaction) was sent by another address than the parent stream's serviceNode |
child_service_node | The child pays another service node |
child_session_key | The child's session key is not the one the core issued |
child_rate | The child's rate differs |
child_cap | The child's cap differs |
child_holdback | The child's holdback differs |
child_terms | The child binds terms or a breach signer the preparation did not |
child_revoked | The child is revoked |
child_settled | The child has already settled value |
parent_revoked | The parent stream is revoked on chain |
adoption_expired | The preparation passed its expiresAt |
adoption_used | The preparation already adopted another on-chain stream |
What to do
- Send exactly the prepared
calldata(or theopenStreamarguments) to the vault from theopeneraddress named in theadopt-prepareanswer. See child streams opened by the parent agent. - Send the
txHashof that transaction, or the on-chainstreamRefit opened. - If the preparation expired, prepare again with a new
requestRef. A mismatched child that was opened on chain holds no value the core will sign for; the budget's sender can revoke it.
On the wire
HTTP 409, error type state_error. Nothing is recorded.
The routes were added in 1.8.0. A single-tenant core answers them whatever Dynamo-Version the request names. On the multi-tenant hosted tier, the front door refuses a request served below 1.8.0 with HTTP 404 version_unavailable before the core sees it; a request that names no version is served the account's default, which is 1.8.0 for new accounts.
Every client gets the detailed body:
{
"error": "state",
"reason": "child_adopt_refused",
"detail": "…",
"errorDetail": {
"type": "state_error",
"code": "child_adopt_refused",
"message": "…",
"param": "streamRef",
"doc_url": "…/errors/child_adopt_refused.md",
"fix": "the on-chain child does not match the prepared child adoption, or the preparation expired or was used (errorDetail.check names the fact); the parent agent sends exactly the prepared openStream from the parent stream's serviceNode, or prepares again (nothing was adopted)",
"check": "child_cap"
}
}
See all error codes.