Todas as lições · Apps and UI · Começa aqui · Glossário
Resolving cell deps per cell after redeploying a data-hashed scriptPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 2026-11-19
After a data/data1 type script is redeployed with a new code hash, old cells still run against the old code. Keep a list of retired deployments and query the indexer for every one. Pick each cell's cell dep by matching the codeHash and hashType of that cell's own type script, not a single 'current' manifest entry.
Porque importa: Indexer scans and holdings filters keyed only to the newest code hash miss every cell made under the replaced contract. A transaction built with the newest contract's cell dep for such a cell is built against the wrong code, and the app's checker refuses it.
Padrão
manifest.scripts[name] used for every cell → resolve per cell: deployments.find(d => d.codeHash===cell.type.codeHash && d.hashType===cell.type.hashType)Um teste mudou no mesmo commit
Está ao lado da correcção. Nós não o corremos.
- toastmanAu/daowow:
apps/web/test/app-shell.test.js,apps/web/test/helpers/fake-chain.js,apps/web/test/manifest.test.js,apps/web/test/model-claim-guard.test.js,apps/web/test/round-cells.test.js
- Conceitos
- Cell deps and script lookup, Type ID and upgrades, Indexer queries and cell collection
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-17
- Última mudança
- 2026-11-17
- Última verificação
- 2026-11-19
- Verificação contra o commit
- certa: a lição sai do commit e continua a valer no código de hoje
Fontes (1)
- 2026-11-17 · toastmanAu/daowow · mais deste projeto
Mais sobre Apps and UI
- Lock-based fallback when a stored out point goes stale
- Exact CKB-to-shannon conversion with BigInt
- Nervos DAO hold time with term-locked withdrawals
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
LusoCryptoLabs, "Resolving cell deps per cell after redeploying a data-hashed script", CKB lessons, https://pulse.lusocryptolabs.com/learned/apps/resolving-cell-deps-per-cell-after-redeploying-a-data-hashed, CC BY 4.0, last changed 2026-11-17.