aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[Bug] Document funding by network, explain tutorials are for devnet only

Open clay-aptos opened this issue 3 years ago • 6 comments
trafficstars

🐛 Bug

While testing and editing: https://aptos.dev/tutorials/your-first-dapp/

I found the CLI didn't immediately recognize the private key of the account I just created.

To reproduce

  1. Open the Wallet and click Create a new wallet. Then click Create account to create an Aptos Account.
  2. Copy the private key. You will need it to set up the Aptos CLI in the next section.
  3. Run aptos init and select the default Devnet network.
  4. When it asks for your private key, paste the private key from the Aptos Wallet that you copied earlier.

Stack trace/error message

Receive the output:

No network given, using devnet...
Enter your private key as a hex literal (0x...) [Current: None | No input: Generate new key (or keep one if present)]
0x1bcd66761530b81745a3bf69986b25af4142b8fcd382ae3e74a2ea480ec16a9f
Account 37f1a905dc531a0734d620858fce4bce8ed0681c242250955bd9e7d89987be76 doesn't exist, creating it and funding it with 100000000 Octas
Account 37f1a905dc531a0734d620858fce4bce8ed0681c242250955bd9e7d89987be76 funded successfully

See the attached screenshot showing the output and the private key used.

Screen Shot 2022-10-20 at 10 07 40 AM

I do note two potential issues. The docs contain this tip, rather than a step: "Ensure that your account has sufficient funds to perform transactions by clicking the Faucet button." So I haven't been doing that.

Further, the doc suggests to install the Aptos CLI after creating the account, which will surely introduce a delay. But since I have it installed already, I am running aptos init directly after creating the account. Perhaps related?

clay-aptos avatar Oct 20 '22 17:10 clay-aptos

actually I think the bigger issue here is we need to divide the docs into a section on funding accounts, since mainnet, testnet, and devnet are all different. The CLI also is pegged on devnet, which isn't great.

davidiw avatar Oct 22 '22 21:10 davidiw

actually I think the bigger issue here is we need to divide the docs into a section on funding accounts, since mainnet, testnet, and devnet are all different. The CLI also is pegged on devnet, which isn't great.

Thanks, @davidiw. FWIW, we have a section on funding accounts (along with account creation) in the previous tutorial in navigation: https://aptos.dev/tutorials/first-move-module#step-2-create-an-account-and-fund-it

Also, I wrote these Petra user docs that lightly touch upon the faucet since it wasn't working when I ran through it. May I ask who to work with on making these docs better? How is funding different in mainnet, testnet, and devnet?

Does all of this depend upon the tap now? Thanks!

clay-aptos avatar Oct 24 '22 14:10 clay-aptos

Adding @banool for guidance on funding.

clay-aptos avatar Oct 25 '22 21:10 clay-aptos

A brief overview:

  • Mainnet: There is no faucet in-wallet, you have to get funds from an exchange.
  • Testnet: Use the faucet button in-wallet or use the testnet faucet here: https://aptoslabs.com/testnet-faucet.
  • Devnet: Use the faucet button in-wallet.

banool avatar Oct 25 '22 22:10 banool

A brief overview:

  • Mainnet: There is no faucet in-wallet, you have to get funds from an exchange.
  • Testnet: Use the faucet button in-wallet or use the testnet faucet here: https://aptoslabs.com/testnet-faucet.
  • Devnet: Use the faucet button in-wallet.

Thank you! I am working to document this in: https://github.com/aptos-labs/aptos-core/pull/5305

Please note, the tutorials refer to the devnet faucet at https://faucet.devnet.aptoslabs.com, so I've included it in the list you supplied. Please let me know if I am misunderstanding this. Thanks!

clay-aptos avatar Oct 26 '22 17:10 clay-aptos

Per: https://github.com/aptos-labs/aptos-core/pull/5305/

I need more guidance on the desires here.

clay-aptos avatar Nov 04 '22 17:11 clay-aptos

I'm noting we have made no progress on the funding aspect, instead focusing upon moving the tutorial prerequisites around various pages. @davidiw , see where we left off here in: https://github.com/aptos-labs/aptos-core/pull/5305#discussion_r1021808429

clay-aptos avatar Dec 05 '22 18:12 clay-aptos

This output is confusing and could use explanation. Did I get funded or not? Also see the typo in "create and fun":

➜  developer-docs-site git:(move-workshop-1) ✗ aptos init --profile nft-receiver
Configuring for profile nft-receiver
Choose network from [devnet, testnet, mainnet, local, custom | defaults to devnet]
testnet
Enter your private key as a hex literal (0x...) [Current: None | No input: Generate new key (or keep one if present)]

No key given, generating key...
Account 0e17608363164035e45d883007ac723bce62a8a1058462594610829097626803 does not exist, you will need to create and fun the account through a community faucet e.g. https://aptoslabs.com/testnet-faucet, or by transferring funds from another account

---
Aptos CLI is now set up for account 0e17608363164035e45d883007ac723bce62a8a1058462594610829097626803 as profile nft-receiver!  Run `aptos --help` for more information about commands
{
  "Result": "Success"
}

clay-aptos avatar Dec 07 '22 23:12 clay-aptos

Let's definitely better promote: https://aptoslabs.com/testnet-faucet

clay-aptos avatar Dec 08 '22 23:12 clay-aptos

More progress in: https://github.com/aptos-labs/aptos-core/pull/6176

clay-aptos avatar Jan 12 '23 19:01 clay-aptos

Fixed with: https://github.com/aptos-labs/aptos-core/pull/6176

clay-aptos avatar Jan 24 '23 16:01 clay-aptos