版本比较

密钥

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。

...

  1. 累加器(Accumulator),在其他项目中叫定序器(Sequencer)或者聚合器(Aggregator)。它主要的功能是给交易排序,并且定期将 Layer2 的交易提交到 Layer1 。Stargate 的 Rollup 方案中,它不仅仅提供排序,同时会将交易哈希进行累加,用于提供交易的顺序证明。累加器同时也要执行交易,并且定时将每个交易执行之后的状态树的根哈希提交到 Layer1。

  2. 状态提供者(State Provider),按照累加器提供的交易顺序,执行交易,给第三方提供状态查询接口。

  3. 校验者(Verifier),执行交易并与累加器提交到 Layer1 的状态树的根哈希进行比较,如果发现累加器作弊则向 Layer1 提交欺诈证明。

Rollup is a scaling solution and there are several roles in Rollup:

  1. Accumulator, called Sequencer or Aggregator in other projects. Stargate's Rollup solution, not only provides sorting but also accumulates transaction hashes, which are used to provide proof of the order of transactions. The accumulator also executes transactions and periodically commits the root hash of the state tree to Layer1 after each transaction is executed.

  2. The State Provider executes the transactions according to the transaction order provided by the accumulator and provides the state query API to users.

  3. Verifier, executes transactions and compares them with the root hash of the state tree submitted to Layer1 by the accumulator, and submits proof of fraud to Layer1 if the accumulator is found to be cheating.

当前 Stargate 的 Rollup 方案属于 Optimistic Rollup 的一种。Optimistic Rollup 方案下,Layer1 并不会校验 Layer2 的每个交易,而是乐观的相信 Layer2 的 Accumulator 节点,直到有校验者提出欺诈证明,这样相当于把计算和状态都迁移到了 Layer2。

...