Anoma中的account

1. 引言

前序博客有:

  • Anoma——多方加密资产隐秘交换

Anoma定位为多方加密资产隐秘交互协议,为Layer 1 方案,采用PoS共识。目前已上测试网feigenbaum。

当前Anoma采用ed25519。
Anoma中的address和key支持alias假名模式:

anoma wallet key gen --alias my-key

默认新建的账号在:.anoma/{chain_id}/wallet.toml (with the default --base-dir)。

All accounts in the Anoma ledger have a unique address, exactly one validity predicate and optionally any additional data in its dynamic storage sub-space.

Anoma只有一种账号类型。Anoma每个账号关联了:

  • 1)a unique address
  • 2)a validity predicate
  • 3)dynamic storage

2. Address

Anoma中的address分为:

  • transparent address:关联了dynamic storage sub-spaces,地址为the prefix key segment of its sub-space。
  • shielded address:用于隐私交易,不直接与storage sub-spaces关联。

2.1 transparent address

Anoma中有3种transparent address:

  • 1)Implicit address:当前Anoma未完全支持。基于某公钥 派生而来,可用于授权特定的交易。可用作recipients of transactions without even when the account has not been used on-chain before。
  • 2)Established address:支持the deployment of custom validation logic。基于当前address nonce生成,必须通过交易在链上创建。直到交易提交上链后才知道具体的地址。
  • 3)Internal address:特殊的内部地址,如protocol parameters account, PoS和IBC。

Anoma中链上地址的存储采用基于bech32 改进的 bech32m 编码方案,目前ZCash暂未实现bech32m。
为了使地址便于识别,前缀为:

  • ”a“ for Anoma live network
  • “atest” for test network

2.2 shielded address

与 Zcash Sapling protocol payment addresses and keys (section 3.1)类似,用户为private payment生成spending key,基于该 spending key可派生出 shielded payment address、incoming viewing key 和 full viewing key。在private payment中,shielded payment address 和 diversifier 一起hash生成 a diversified transmission key。可对不同的交易选择不同的diversifier,从而可避免通过交易来匹配transmission key。

目前暂未确定对shielded addresses、spending key和 viewing key的编码方式,但为了保持一致性,可能会选用相同的编码方式,只是前缀不同。

  • TODO consider using a schema similar to the unified addresses proposed in Zcash, that are designed to unify the payment addresses across different versions by encoding a typecode and the length of the payment address together with it. This may be especially useful for the protocol upgrade system and fractal scaling system.

参考资料

[1] Anoma doc
[2] Anoma accounts设计文档

你可能感兴趣的:(隐私应用,零知识证明,区块链)