Account creation: testnet vs mainnet

Hello guys,

I’m trying to understand Libra account creation a bit better and I’m having a hard time figuring out how things are going to go down in the mainnet.

In the testnet, from what I can gather (seeing the last few PRs like https://github.com/libra/libra/pull/4772 ) the account is handled in client_proxy.rs (by the faucet running at faucet.testnet.libra.org, which I assume has an association account) by calling the create_testing_account function, which will create an account with the “ParentVASP” role.
Afterwards, minting is done by the testnet DD.

I doubt this will be handled like this in the mainnet. So here’s a few questions:

  • Who will be in charge of creating accounts in the mainnet? DDs?
  • I imagine most accounts will have “Unhosted” role, is that correct?
  • Is there documentation on the operations the various roles are expected to run for day-to-day operations, including function calls? Let’s say from private key generation to account creation and funding…

Thanks.

Hi there!

Good questions. You are indeed correct that things will not be handled this way in mainnet. To answer your specific questions:

  • In general most accounts can only be created by Libra Root or TC. A parent VASP however can create child VASP accounts for itself[1].
  • I would expect the majority of accounts will be parent or child VASP accounts initially since unhosted accounts won’t be accessible at launch (see the page 2 of the whitepaper for more info), and the other accounts will mainly be “administrative” accounts e.g., validator, DD, etc.
  • I’m not aware of any documentation outlining the operations expected for day-to-day operation per role explicitly. The best place that I can point to right now for this would be to look at the different transaction scripts that are allowed here. These have some comments at the moment, and we’re working on improving the documentation of them as well.

[1] If you have a look at the various new_YYY_role functions in Roles.move those will provide the logic for “account with role X can create account with role Y”.

–Tim

1 Like

Hi,

Thanks for the answer, it gives me a lot to go on!
I have some reading to do regarding Move, roles, and how they’ll fit together in our use case, but I feel like I can handle it with this info.