DFINITY Testnets or Best Practices to Simulate it - Docker?

First some good news, we are actively working on an IC app! We are a small team of two, but I sincerely think what we are building will benefit the whole ecosystem.

Now, my fairly obvious question for IC Developers on this forum.

What is the best way to run and test the DAPPs, as we build them, meaning they are not finished, they are not fully operational, but they have working functionality we want to observe, and improve for a select number of people?

Is there now a Testnet that works for the IC?

If there is not, can you please tell us how you test, and debug running code? In most other blockchains there are Testnets, Ethereum has Rinkeby, Solana has a testnet Cluster.

Of course if there is no testnet whatsoever, I guess we can run it in production! And give no access to almost anyone. Sure, but I hope there is a better way.

One last question, is it beneficial at all to use Docker?
So that let’s say our developers run the IC code on an Ubuntu instance, and everyone has exactly the same underlying code.
Or is Docker useless for the IC use case?
I honestly do not know, so I prefer to ask those who know better than me.

Thanks for any advice!

Joseph Hurtado

3 Likes

As of now there is no public testnet. I’m relaying the requests to the relevant people pretty often.

For many use cases, running a local replica (dfx start) works just fine. It runs a real replica, and should behave exactly the same way mainnet behaves. Of course, if you need multiple subnets or a specific version of the replica then it gets more difficult.

Some people put dfx into Docker or a VM to skip some repetitive setup for their tests, but I’ve heard it can be a bit painful to get everything to run smoothly.

Testing on mainnet directly is also a solution, but as you said leaves your test code out in the open. It depends heavily on the application if this is a problem or not at all.

An effort to improve the situation just started, but it’s far too early to make an promises

3 Likes

You can also use an lightic tool to test and debug canisters code.

1 Like

Severin,

Is okay we can test in production, in a way that is what’s needed: a Sub-net dedicated to testing only. I hope it happens, as I commented on the post, almost every major blockchain has this working.

In the meantime, I will use production, since I also heard Docker can be quite a pain!

On a related subject, we would like to test the new ckBTC functionality. We assume we will need both ICP and BTC, are there any articles or code you can point us to for testing, and learning how this works exactly?

Thanks,

Joseph

1 Like

That looks very much like what we would need, but the docs are lacking on the Github you linked. Of course I starred and forked the project.

Are you the lead developer of LightIC?

Is there any long article, a full walkthrough to learn how to use it, looks quite promising!

Joseph

1 Like

I’m happy to relay that, but I don’t think this will happen. I heard the argument that testing on mainnet is cheap enough.

There’s an example for Motoko and Rust in the examples, and we have the BTC section of the docs

1 Like

Unless some kind of community fund from developers to pay for it, testing subnet never gonna happen.

I’m still working on those docs. I will be uploading them shortly.

2 Likes

Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers.

It depends on what you’re doing, if testing involves doing frequent redeploys of asset canisters or uploading data then cycle cost starts adding up, not a great feel when you know each failed attempt costs you in the range of tens of cents or dollars.
Not having a testnet also adds lots of friction when you want to introduce newcomers to IC development cause you somehow need to provide them with cycles: either by handing them out yourself, asking them to get a coupon on DS or ask Dfinity for coupons, all are unnecessarily tedious and not very cost efficient.

Motoko Playground could somewhat fix this issue but it is God awful to use and I straight up refuse to even show it cause it is so barebones it makes the platform look immature and amateur, plus canisters only live for 20 minutes so it isn’t feasible to run a beta on it. I’m a bit puzzled by this apparent adversion Dfinity seems to have with testnets, a convention which pretty much every other L1s have.

2 Likes

Totally agree, although I can say that at least for us on the internetcomputer.org website mainnet preview deployments are cheaper than using something like Netlify

Something is coming up soon, stay tuned! I’m working on a thing where you can go from not having dfx installed to hello world deployed on chain within 4 commands and ~2 minutes :slight_smile:

4 Likes

Thanks for the ckBTC examples Severin!

1 Like

The Faucet for developers is the only thing that would help, it used to give you the equivalent of $100, then dropped to $40 or so, I hope it still works!

@Severin or any IC Dev who knows, does the IC Faucet work? How much does it give these days? I see that it involves a whole application to get funds:
https://anv4y-qiaaa-aaaal-qaqxq-cai.ic0.app/

The faucet works but the coupon is manually handed out in the dev Discord and it is now 20TC

3 Likes

Thanks Zane, yeah, I will use it when needed.

Hey, I’ve just updated lightic to v0.3.0. I’ve also added some examples on how to use it

1 Like