Magickbase / neuron-public-issues

Neuron Issues
6 stars 3 forks source link

Will neuron introduce omnilock and how #333

Open Keith-CY opened 9 months ago

Keith-CY commented 9 months ago

Now neuron is going to support signing transactions for DApp via wallet connect, but most DApps on CKB are built on omnilock(https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0042-omnilock/0042-omnilock.md) while Neuron only supports secp256k1 lock(https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md#secp256k1blake160) and anyone-can-pay lock(https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0026-anyone-can-pay/0026-anyone-can-pay.md) as generally adopted asset holders.

That means, exposure of the ability to sign a transaction has a limited impact on ecosystem because the addresses/lock scripts are not reused between wallet and dapps.

So I think it is worth adding omnilock in Neuron. Personally speaking, omnilock can be treated as an extended anyone-can-pay lock, so it should be easily included in asset account of Neuron. Like,

  1. Set omnilock as the default lock of a new asset account, but still allow users to specify anyone-can-pay lock;
  2. Show omnilock asset accounts and anyone-can-pay asset accounts in the same list with a tag for distinguishing;
  3. Support transformation from anyone-can-pay asset account into omnilock asset account.
  4. Reuse all features of anyone-can-pay asset account for omnilock asset account because they behaviors almost the same for sudt management.

It's just an idea, and many details should be added.

yanguoyu commented 9 months ago

The Omnilock supports many modes, should we only support administrator mode or anyone-can-pay mode?

Keith-CY commented 9 months ago

The Omnilock supports many modes, should we only support administrator mode or anyone-can-pay mode?

Personally speaking, supporting ACP mode is enough for the first stage because

  1. it's the most widely used mode;
  2. it doesn't change Neuron's functions and can be used to replace ACP implicitly.
Sven-TBD commented 8 months ago

Adjustment on Neuron to enhance ACP account. PRD here.

cc @Keith-CY