I'm starting to build a dapp on Aptos and I notice that there are two development networks, devnet and testnet. What are the differences between these two?
Update - 2022-01-26: Previously the testnet faucet required the user to complete a captcha. This is no longer true, the faucets of both networks work similarly, so that section has been removed from the answer.
Devnet is generally released every week. Testnet is generally released every two weeks, after devnet.
This means devnet gets new features sooner and more frequently.
With devnet, the chain is reset every release. All data is wiped, including any deployed modules, accounts, etc. and the chain restarts from genesis with a new chain ID. If you're building on devnet this means you must redeploy your Move modules and accounts every week.
Testnet is never wiped, similar to mainnet.
On both devnet and testnet you can create new accounts and get new APT easily by either:
FaucetClient
in the SDK.aptos
CLI:aptos account fund-with-faucet --account 0xd0f523c9e73e6f3d68c16ae883a9febc616e484c4998a72d8899a1009e5a89d6
curl -X POST 'https://faucet.devnet.aptoslabs.com/mint?amount=100&address=0xd0f523c9e73e6f3d68c16ae883a9febc616e484c4998a72d8899a1009e5a89d6'
Generally speaking testnet is a friendlier developer experience because you don't need to keep redeploying your code / recreating accounts. For standard development the amount of APT the testnet faucets give you should be more than sufficient.
Devnet is good for rapid experimentation where you don't care about data persistence or if you're running tests that require programmatic access to APT.