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
{{ message }}
Repository navigation
[BUG] findSpores / findSporesBySigner with clusterId: "" Also Return Clustered Spores #599
import{ccc}from"@ckb-ccc/core";import{spore}from"@ckb-ccc/spore";import{packRawSporeData}from"@ckb-ccc/spore/advanced";constclient=newccc.ClientPublicTestnet();client.findCellsOnChain=asyncfunction*(){};// Only the cells below, no node.constlock={codeHash: "0x"+"00".repeat(32),hashType: "type",args: "0x"}asconst;const{ codeHash, hashType }=spore.getSporeScriptInfo(client);// One public spore and one in a cluster.for(const[i,clusterId]of[undefined,"0x"+"66".repeat(32)].entries()){awaitclient.cache.markUsable({outPoint: {txHash: "0x"+"77".repeat(32),index: i},cellOutput: { lock,type: { codeHash, hashType,args: "0x"+`0${i}`.repeat(32)}},outputData: packRawSporeData({contentType: "",content: "0x", clusterId }),});}forawait(const{ sporeData }ofspore.findSpores({ client, lock,clusterId: ""})){console.log(sporeData.clusterId??"public");}
Behavior
public
0x6666666666666666666666666666666666666666666666666666666666666666
Only public should be printed. The filter in findSpores and findSporesBySigner starts with !clusterId, which is already true for "". So the clusterId === "" branch never gets to exclude clustered spores.
Activity
ashuralyk commentedon Oct 24, 2026
Great work, bro, I'm on it now.
refactor(spore): keep cluster filter private and drop local tests