3

I've been using the testnet lately and I encounter issues: they reset it very often and the service is down for multiple hours and sometimes have bugs.

Should I use the devnet? From what I've understood it's more stable and they reset it less often?

I have a backend in js that uses the elrond-sdk-erdjs and I'm confused because there is no function that initializes the https://devnet-gateway.elrond.com only the testnet. Is there a reason?

utils.ts

// TODO: Adjust with respect to current terminology (localnet instead of devnet).
function getDevnetProvider() {
    return new proxyProvider_1.ProxyProvider("http://localhost:7950", { timeout: 5000 });
}
exports.getDevnetProvider = getDevnetProvider;
function getTestnetProvider() {
    return new proxyProvider_1.ProxyProvider("https://testnet-gateway.elrond.com", { timeout: 5000 });
}
exports.getTestnetProvider = getTestnetProvider;
function getMainnetProvider() {
    return new proxyProvider_1.ProxyProvider("https://gateway.elrond.com", { timeout: 20000 });
}
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
TheSmartMonkey
  • 857
  • 1
  • 7
  • 23

3 Answers3

9

The testnet is pretty volatile and it is reset very often (maybe weekly), without any warnings. Elrond recommends developers to use the devnet, it is reset maybe once every 3-4 months, so it's more stable.

You can get the provider like this:

function getDevnetProvider() {
    return new proxyProvider_1.ProxyProvider("https://devnet-gateway.elrond.com", { timeout: 5000 });
}

And the devnet explorer is here: https://devnet-explorer.elrond.com/

mir
  • 326
  • 1
  • 2
  • 7
1

The Elrond devnet is more closer to mainnet in features and operation, and it's stability is more carefully maintained and cared for. If you care about stability or want to go safe and make sure that you're 1:1 with the mainnet, then devnet is for you.

The testnet is used as a public staging area for release candidates for the mainnet, often employing early upcoming mainnet features that see the real life scenarios for the first time... you can basically see the testnet as a "public insider program" that gives you earliest access to new features and the ability to go crazy in here. You can stage here new development ideas, preparations to support new features or any other development project that doesn't really care about the possibility of having a network reset once in a while.

Brother Jder
  • 415
  • 2
  • 9
0

I started with the testnet because it was more descriptive to me like my understanding was -> the testnet is almost the mainnet, and the devnet is like totally dynamic and buggy. But it appeared that the devnet is more stable and it has an official faucet which is soooo important.

juliancwirko
  • 1,282
  • 12
  • 15