Synthetic testnets on mainnet

In the Global R&D July 2024 synthetic testnets were announced and it sounded like they can be used to deploy a set of canisters to mainnet.

The documentation here also has a configuration example that looks like it is made for mainnet deployment:

"networks": {
    "myNetwork": {
      "providers": [
        "https://ic0.app"
      ],
      "type": "persistent"
    }
  }

But is that actually true? Or does synthetic testnet mean local deployment?

1 Like

It sounds like it’s just a local deployment to me when I read it. But then again, how’s it different from just the normal playground?

When I try it with the “networks” section from above in dfx.json then I get the error “Caller is not allowed to call ic00 method provisional_create_canister_with_cycles” which indicates that it is handling the network as a local one. So either synthetic testnets are not meant to be on mainnet or it is a bug and dfx ignores the "type": "persistent" part.

Outdated docs. If you use icp0.io instead of ic0.app it works. dfx currently only accepts icp0.io as a provider to detect mainnet.

The persistent part determines where the canister ids are stored. For ephemeral, they go in .dfx/<network>/... and for persistent they end up in canister_ids.json, so they are under source control so that you can have fixed staging canisters

PR to fix

1 Like