LiçõesO que a CKB aprendeu
Começa aqui · Glossário · Testa-te · Feed
As lições estão escritas em inglês, por isso pesquise em inglês.
ckb-service-runner/ckb-service-runner ✕
Lições de ckb-service-runner/ckb-service-runner
github.com/ckb-service-runner/ckb-service-runner
Manténs este projeto? Confirma as lições dele num só issue
4 lições encontradas. Todas as lições
A plain secp256k1_blake160 cell occupies 61 CKB, so when a wallet sends X it must keep at least 61 CKB (the occupied capacity of its own lock) in the change cell, plus the fee, and refuse the send otherwise. The recipient output must also be at least the occupied capacity of the recipient's lock, never less than 61 CKB for a plain address. Enforce the change floor in the transaction builder, and use extra headroom (this runner uses threshold >= amount + 100) for automatic sweeps so fee and change always fit.
#Capacity and cell size #Transaction building and fees · Fontes (1) · 2026-10-21
Treat a cell as a Nervos DAO deposit only if its type script exactly matches the DAO type script and its data is exactly 8 zero bytes. The DAO type script has code hash 0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e, hash_type type and empty args. A phase one withdrawing cell has the same type script but a nonzero block number in its 8 data bytes, so it fails this check, as do data of any other length and look alike type scripts.
joined with the ckb-service-runner card teaching the same check
#Indexer queries and cell collection #Data encoding (molecule, hex, bigints) · Fontes (2) · 2026-10-20
When a test signer for the secp256k1 sighash_all lock fills the first witness of a script group, it should parse the existing WitnessArgs (for example one with data in output_type) and replace only the lock field: zeroed to 65 bytes while hashing, then set to the signature. Building a fresh WitnessArgs drops output_type or input_type data that a type script reads, and sighash_all hashes the whole first witness with only the lock zeroed, so those fields must already be in place when hashing.
#Witnesses and signatures #Testing and devnet · Fontes (1) · 2026-10-20
A Nervos DAO deposit cell has the DAO type script (code hash 0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e, hash_type type, empty args) and 8 zero bytes of data; a withdrawing cell has the same type script but the deposit block number as data. A contract that accepts one as a cell dep must check code hash, hash_type, empty args and data == 8 zero bytes, since the DAO script does not run for a dep. For the same reason a ckb_testtool test can create such cells directly with the DAO type script and zero data, without deploying the DAO binary.
#Cell deps and script lookup #Testing and devnet · Fontes (1) · 2026-10-20
Texto sob CC BY 4.0: dá crédito à LusoCryptoLabs, CKB lessons, com uma ligação para a lição. JSON · Queres que uma lição seja mudada ou retirada? Abre um issue.