Networks

Diamante has two networks: the public network (Mainnet), and the test network (Testnet). Mainnet is the main network used by applications in production. It connects to real financial rails and requires DIAM to cover minimum balances, transaction fees, and rent. The Testnet is a smaller, free-to-use network maintained by DDF that functions like the Mainnet but doesn’t connect to real money. It has a built-in Testnet DIAM faucet (called Friendbot), and it resets on a regular cadence, so it’s the best place for developers to test applications when they need a stable environment that mirrors Mainnet functionality.

Read more about the different networks in the Networks Diamante Core

Diamante Core is the program used by the individual nodes (or computers) that make up the network. Diamante Core keeps a common distributed ledger and engages in consensus to validate and process transactions. Generally, nodes reach consensus, apply a transaction set, and update the ledger every 5-7 seconds.

Nodes reach consensus using the Diamante Consensus Protocol, which you can learn more about here: Diamante Consensus Protocol (DCP).

Anyone can run a Diamante Core node, but you don’t have to build on Diamante. We recommend you do so if you issue an asset and want to ensure the accuracy of the ledger; if you want to participate in network governance by voting on protocol version, minimum fees, and resource and ledger limits; and/or if you want to contribute to Diamante overall health and decentralization. Check out our tutorial on installing, configuring, and maintaining your own node here: Run a Validator Node Tutorial.

Aurora API

Aurora is the client facing API server in the platform layer which allows programmatic access to submit transactions and query the network’s historical data. It acts as the interface between Diamante Core and applications that want to access the Diamante network. You can communicate with Aurora using an SDK, a web browser, or with simple command tools like cURL. You do not need to run your own Aurora instance — when you’re getting started, you can use the free SDF Aurora instance to access the network — but it is recommended that you do when you’re ready to launch a finished product.

Learn all there is to know about using Aurora in the Aurora Documentation.

SDKs

SDKs simplify some of the work of accessing Aurora and the Diamante Aurora converting the data into friendlier formats and allowing you to program in the language of your choice. Diamante SDKs show you how to request data and create and submit transactions.

Stats: Mainnet versus Testnet

Mainnet
  • Validator nodes are run by the public.
  • DDF offers a free Aurora instance to interact with the Mainnet with a limited set of history, or you can run your own or use an instance offered by an infrastructure provider.
  • You need to fund your account with DIAM from another account.
  • Mainnet is limited to 1,000 operations per ledger and will be limited to a maximum of 30 transactions per ledger.
  • See more detailed network settings in the section on Fees and Metering in the Soroban docs.
  • No publicly available RPC.
Testnet
  • DDF runs three core validator nodes.
  • DDF offers a free Aurora instance you can use to interact with the Testnet.
  • Friendbot is a faucet you can use for free Testnet DIAM.
  • Testnet is limited to 100 operations per ledger.

Friendbot

Friendbot is a bot that funds accounts with fake DIAM on Testnet. You can request DIAM from Friendbot using the Diam Laboratory or with SDK. Requests to Friendbot are rate-limited, so use it wisely. Friendbot provides 100 fake DIAM when funding a new account.

Testnet Data Reset

Testnet is reset periodically to the genesis ledger to declutter the network, remove spam, reduce the time needed to catch up on the latest ledger, and help maintain the system. Resets clear all ledger entries (accounts, trustlines, offers, etc.), transactions, and historical data from Diamante Core and Aurora.

What Testnet Should and Should Not Be Used For

Testnet is good for
  • Creating test accounts (with funding from Friendbot)
  • Developing applications and exploring tutorials on Diamante without the potential to lose any assets.
  • Testing existing applications against new releases or release candidates of Diamante Core and Aurora.
  • Performing data analysis on a smaller, non-trivial data set compared to the Mainnet.
Testnet is bad for
  • Load and stress testing.
  • High availability test infrastructure- DDF does not guarantee Testnet availability.
  • Long-term storage of data on the network since the network resets periodically.
  • Moving Your Project from Testnet to Production

Mainnet and Testnet each have their own unique passphrase, which is used to validate signatures on a given transaction.

The current passphrases for the Diamante Mainnet and Testnet are:

  • Mainnet (Pubnet): Diamante MainNet; DEP 2022
  • Testnet: Diamante Testnet 2024

For applications that don’t rely on the state of the network (such as specific accounts needing to exist), you move to production by changing the network passphrase and ensuring your aurora instance is connected to Mainnet.

If you’ve been running a Diamante Core or Aurora instance against the Testnet and want to switch to production, changing the passphrase will require both respective databases to be completely re-initialized. If you run your own RPC on Testnet, you may want to use an RPC service when you move to Mainnet.

To learn more about network passphrases, see our Network Passphrase Encyclopedia Entry.