TapeOutWorld 详解 Circuit 可组合性与无状态安全TapeOutWorld Details Circuit Composability and Stateless Safety
TapeOutWorld 说明 Circuit 的两大特性。可组合性方面:每个 Processor 都由同一工厂克隆生成、字节码完全一致,因此用户在自有 Processor 上构建的 Circuit 可以调用他人 Processor 上的 Circuit,他人也能复用你的电路,工厂可以有很多个而部件是通用的;BNB Chain 上任意合约都能把 Circuit 当作自身逻辑调用,调用前即可知道成本、逻辑公开可查,用户无需重写代码或信任任何服务器。安全边界方面:Circuit 只做计算,不能调用其他合约、没有可写入的状态,给出输入即返回输出,最坏情况只是一个错误答案。TapeOutWorld explains two properties of Circuits. On composability: every Processor is cloned from the same factory with identical bytecode, so a Circuit built on your own Processor can call Circuits on someone else's Processor and others can reuse yours — there can be many factories, the parts are universal; any contract on BNB Chain can take a Circuit and use it as its own logic, with the cost known before the call and the logic public and checkable, so users need not rewrite code or trust anyone's server. On safety: a Circuit only computes, it cannot call anything else and has no state it can write to; give it an input and it returns an output, and the worst case is just a wrong answer.
来源 · 3 条Sources · 3
- @TapeOutWorld
Running something a stranger wrote On Chain is usually nerve-racking A Circuit is different, all it does is compute It can't call anything else It has no state it can write to You give it an input, it gives you an output the worst case is just a wrong answer
- @TapeOutWorld
Any contract on BNB Chain can take a Circuit and use it as its own logic You know the cost before you call The logic is public, anyone can check it first Users don't have to rewrite it or trust anyone's server
- @TapeOutWorld
Every Processor is cloned from the same factory, with identical bytecode So a Circuit you build on your own Processor can call Circuits on someone else's Processor and others can pick yours up and use it There can be many factories, the parts are universal