社区教程:借 netlist() 把数据写进 NAND 网表Community guide: storing data in NAND netlists via netlist()
社区成员 boostbob 提出用处理器合约 netlist() 存数据的思路:流片时提交的网表会被原样返回,合约不校验门的逻辑,只要求编号合法,输入编号最多可开到 65536 个。每个 NAND 有两个输入编号,按 65536 进 1 出流片时每个编号可填一个 16 位数,一个门即容纳 4 字节;把 TXT/JSON 压成二进制后每 4 字节编成一个 NAND 去流片,读取时调用 netlist() 拆出编号拼回数据,且读取免费、可直接在网页调用。开容器费用为 opener 合约的 FEE(),0.08 OKB。Community member boostbob outlined a way to store data through the processor contract's netlist(): a netlist submitted at tape-out is returned unchanged, the contract does not check gate logic, only that IDs are valid, and up to 65,536 inputs are allowed. Each NAND has two input IDs, so with 65,536 inputs and one output each ID can hold a 16-bit number, giving 4 bytes per gate. Compress TXT/JSON to binary, encode every 4 bytes as one NAND and tape out; reading calls netlist() and reassembles the IDs, free of charge and callable directly from a web page. Opening a container costs the opener contract's FEE(), 0.08 OKB.
