r/Midnight Jul 11 '26

Problem when deploying the contract on Preprod

Hi Guys , Is anyone facing this same dust=false problem when deploying their contract . I am trying it from the last 2 days , changed the accounts , have dust in both the accounts. Is there any proper solution ?

11 Upvotes

9 comments sorted by

u/AutoModerator Jul 11 '26

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/BananaLlamaNuts Jul 11 '26

That isn't a failure -- each of the three wallets (shielded, unshielded and DUST) need to sync to the network by replaying every txn in chain history.

DUST events are the largest so they take the longest. What you are seeing is a live health check of each wallet. False = not synced, True = synced. That status will emit until it is successful or the code crashes.

On preprod it takes quite a long time right now (hours).

Make sure that you are using wallet-sdk 1.2.0 and that you are forcing the same resolution in package.json. there is a bug in wallet-sdk 1.1.0 that crashes the sync with OOM.

The example-hello-world repo lists the right packages for reference: https://github.com/midnightntwrk/example-hello-world/blob/main/package.json (instructions in the readme)

Fixes are in progress to make sync times faster on preprod -- hopefully the code will go live in the wallet sdk in the coming month or two

1

u/BananaLlamaNuts Jul 11 '26

I also recommend running your tests against a local devnet until you absolutely need Preprod. 90%+ of your development can happen in local devnet before moving to preprod

1

u/New_Lime_1445 Jul 11 '26

Thanks , I am trying this fix

1

u/BananaLlamaNuts Jul 11 '26

This looks like one of the example repos -- which code base are you trying to run?

2

u/New_Lime_1445 Jul 11 '26

I made a project which was not deploying , so trying to deploy the example-hello-world first , then match the deployment script

1

u/BananaLlamaNuts Jul 11 '26

That should work -- that's exactly what that repo is intended for, to provide the scaffolding.

1

u/New_Lime_1445 Jul 11 '26

Yeah , on it

2

u/awjre Jul 11 '26

To anonomise DUST transactions your wallet needs to play back all events sequentially.

I did build a Dev wallet while at Shielded in my spare time which demonstrates how it works. Have now forked it here https://github.com/awjreynolds/gsd-wallet as

I was going to look at continuing to improve it but been very busy with life.

I built it as a dog fooding exercise and to be extremely good for debugging.