# Mwixnet community TEST

**URL:** <https://forum.grin.mw/t/mwixnet-community-test/11405>\
**Category:** Development and Technical Discussion\
**Created:** [December 1, 2024, 8:27pm UTC](https://forum.grin.mw/t/mwixnet-community-test/11405 "2024-12-01T20:27:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cobragrin](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@Cobragrin](https://forum.grin.mw/u/Cobragrin)\
**Post date:** [December 1, 2024, 8:27pm UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/1 "2024-12-01T20:27:11Z")

</div>

_ **Community testing** _ is crucial to preserving open-source software’s dependability, security, and quality. It fosters a cooperative atmosphere where users and developers may contribute to ongoing progress in addition to aiding in the early identification of problems.  
In the end, this results in a Grin blockchain that is more secure, resilient, and reliable.  
_ **Grin is an open-source, decentralized blockchain run by a grassroots community, thus gather around to test ツ !** _  
We welcome any and all **contributions**!

### _ **‘‘We’d like to see people from the community focus on getting a mwixnet up, think that would be more useful to the core experience.’’** _

**Mwixnet Testing**

- [Release v5.4.0-alpha.1 · mimblewimble/grin-wallet · GitHub](https://github.com/mimblewimble/grin-wallet/releases/tag/v5.4.0-alpha.1)
- [GitHub - mimblewimble/grin-docker: Docker artifacts and scripts to build and run grin in a container](https://github.com/mimblewimble/grin-docker)
- 

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/grin/original/2X/0/0cf5707b1ec69e50ac704e1bc80d79475e691de3.png)

**Also for _help and feedback_ contact [_keybase_](https://keybase.io/team/grincoin)**

---

<div class="post-metadata">

**Author:** ![transatoshi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/transatoshi/32/6247_2.png) [@transatoshi](https://forum.grin.mw/u/transatoshi)\
**Post date:** [December 4, 2024, 7:36am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/2 "2024-12-04T07:36:09Z")

</div>

For those on Debian/Ubuntu the required packages are:

pkg-config  
libssl-dev  
curl

You will also need to run the following:

sudo apt autoremove rustc  
curl --proto ‘=https’ --tlsv1.2 -sSf [https://sh.rustup.rs](https://sh.rustup.rs) | sh  
. “$HOME/.cargo/env”

This will update Rust past V1. 63

And to make things easier once compiled:

sudo install ~/mwixnet/target/release/mwixnet /usr/local/bin/

---

<div class="post-metadata">

**Author:** ![noobvie](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@noobvie](https://forum.grin.mw/u/noobvie)\
**Post date:** [December 5, 2024, 4:57am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/3 "2024-12-05T04:57:17Z")

</div>

Sorry for noob questions, what is the ‘right’ procedure to test? What is the expected result that it should be? how to know if something goes wrong?.. etc

---

<div class="post-metadata">

**Author:** ![transatoshi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/transatoshi/32/6247_2.png) [@transatoshi](https://forum.grin.mw/u/transatoshi)\
**Post date:** [December 5, 2024, 3:22pm UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/4 "2024-12-05T15:22:16Z")

</div>

(on Linux) You just download and compile, then run mwixnet init-config, grin-wallet owner\_api, and finally mwixnet and it’ll tell you it’s starting mwixnet.

I was able to get it running pretty easily on the 2 public [Grinminer.net](http://Grinminer.net) testnet nodes.

---

<div class="post-metadata">

**Author:** ![transatoshi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/transatoshi/32/6247_2.png) [@transatoshi](https://forum.grin.mw/u/transatoshi)\
**Post date:** [December 5, 2024, 3:25pm UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/5 "2024-12-05T15:25:08Z")

</div>

The post compilation instructions can be found at [GitHub - mimblewimble/mwixnet: Implementation of the Mimblewimble CoinSwap proposal.](https://github.com/mimblewimble/mwixnet).

And check my posts above if running on Linux for tips.

---

<div class="post-metadata">

**Author:** ![transatoshi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/transatoshi/32/6247_2.png) [@transatoshi](https://forum.grin.mw/u/transatoshi)\
**Post date:** [December 13, 2024, 2:14am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/6 "2024-12-13T02:14:31Z")

</div>

I wrote an Ansible playbook for automated deploying of node+wallet+mwixnet hosts on Debian/Ubuntu. Before running make sure there are no new releases on Github & replace [sha-512 hash] with the desired password for the ‘grin’ user, then set your [target]. Once it’s run mwixnet is compiled and ready to run once you’ve set up the TOML configuration files of each.

I highly recommend using screen (for console detaching) & tmux (for console viewing) to run both wallet listeners + node + mwixnet.

- hosts: [target]  
remote\_user: root  
tasks:

---

<div class="post-metadata">

**Author:** ![CircusDad](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/circusdad/32/5929_2.png) [@CircusDad](https://forum.grin.mw/u/CircusDad)\
**Post date:** [December 13, 2024, 3:23am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/7 "2024-12-13T03:23:48Z")

</div>

I can work on getting it installed, but I have this same question. it’s still not clear to me what testing looks like. Can we make transactions? What is success. What is failure?

---

<div class="post-metadata">

**Author:** ![transatoshi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/transatoshi/32/6247_2.png) [@transatoshi](https://forum.grin.mw/u/transatoshi)\
**Post date:** [December 13, 2024, 7:03am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/8 "2024-12-13T07:03:14Z")

</div>

Mwixnet is an automatic coinswap so there are no transactions to make. We just need more nodes running so testing at meaningful scale with mining attacks and other tests can occur.

This is what success looks like:  
 ![Screenshot from 2024-12-12 23-00-43](https://canada1.discourse-cdn.com/flex036/uploads/grin/original/2X/c/c857c280e2d7b9e540981e10fc71562fdad4466b.png)

---

<div class="post-metadata">

**Author:** ![CircusDad](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/circusdad/32/5929_2.png) [@CircusDad](https://forum.grin.mw/u/CircusDad)\
**Post date:** [December 14, 2024, 3:03pm UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/9 "2024-12-14T15:03:27Z")

</div>

My understanding from the posts on Mwixnet is that a specific loop of Mwixnodes will be defined of which only one has to be honest for us to mathematically know that the mix is valid (not quite trust-less but pretty close). However, doesn’t that mean that when I send coins to a Mwixnet, I need to agree to a specific sequence of Mwixnodes?

I will get a mix node running all the same… just trying to understand it better.

---

<div class="post-metadata">

**Author:** ![krytical1337](https://avatars.discourse-cdn.com/v4/letter/k/edb3f5/32.png) [@krytical1337](https://forum.grin.mw/u/krytical1337)\
**Post date:** [December 21, 2024, 1:21am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/10 "2024-12-21T01:21:13Z")

</div>

hello, I would like to run a mwixnet node but my fear is it will be found to be criminal like tornadoe cash. what assurance can you give that it will not be traceable?

---

<div class="post-metadata">

**Author:** ![Anynomous](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/anynomous/32/2928_2.png) [@Anynomous](https://forum.grin.mw/u/Anynomous)\
**Post date:** [December 21, 2024, 8:53am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/11 "2024-12-21T08:53:10Z")

</div>

For testing its not relevant, test Grin has no value.  
Not sure if it is possible to run a mwixnode via tor, for now we need to test basic functionality.

The case of Tornado cash is profoundly disturbing. If I am not mistaken, Pertsev did earn fees with theTornado cash smart contract, mwixnodes do not earn a mixing fee but they can be said to “facilitate” the process of decentralised anonimization of transactions. Also, mwixnets are part of a network, it can be argued that no single node holds responsibility since if only one node is true and honest, the output linkability could not be determined even if all others are not honest. Still, for now I would not advice running a mwixnode on mainnet if you do not trust the regulators in your country from overstepping. As the Tornado cash example shows, the right rugalations and boundaries for regulators not to overstep are not yet in place.

---

<div class="post-metadata">

**Author:** ![krytical1337](https://avatars.discourse-cdn.com/v4/letter/k/edb3f5/32.png) [@krytical1337](https://forum.grin.mw/u/krytical1337)\
**Post date:** [December 21, 2024, 8:38pm UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/12 "2024-12-21T20:38:59Z")

</div>

> [@Anynomous](#):
>
> Also, mwixnets are part of a network, it can be argued that no single node holds responsibility sin

Ok thank you for the time. I will run a grin regular node now and revisit mwixnet in the future time.

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [December 21, 2024, 8:48pm UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/13 "2024-12-21T20:48:22Z")

</div>

> [@Anynomous](#):
>
> mwixnodes do not earn a mixing fee

They do. Quoting from [https://forum.grin.mw/t/mimblewimble-coinswap-proposal](https://forum.grin.mw/t/mimblewimble-coinswap-proposal) :

The contributed fees should then match the coinswap relay fee plus n mixfees. In Grin this gives the identity (with FB being the fee base of half a millicent):

|Out| \* fee = (|Out| + n) \* (1 + 21) \* FB + n \* 3 \* FB + n \* mixfee, or  
mixfee = |Out| \* (fee - 22 \* FB) / n - 25 \* FB.

For simplicity, we could require a fee of (22 + n) \* FB, resulting in a mixfee of (|Out| - 25) \* FB. In that case, for a mixnode to earn 10 grin-cents a day requires 225 daily self spends.

---

<div class="post-metadata">

**Author:** ![Anynomous](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/anynomous/32/2928_2.png) [@Anynomous](https://forum.grin.mw/u/Anynomous)\
**Post date:** [December 22, 2024, 2:02am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/14 "2024-12-22T02:02:18Z")

</div>

Thx, I learned something new today. Do I understand correctly one cannot forfeit this mixing fees since its inherent to the mixing process?

I also pondered the Tornado cash and running a mwixnote. I am not feeling confident that regulators will not overstep in the country where I live, especially if I would be receiving an economic insentive.

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [December 22, 2024, 7:14am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/15 "2024-12-22T07:14:49Z")

</div>

Mixfees are not seen by the users; they just pay their regular fees required for self-spends. Rather, mixfees are something left over from the combined user fees since the aggregation saves on kernel fees. So the mixnodes have to take the mixfees to balance the equation.

---

<div class="post-metadata">

**Author:** ![Anynomous](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/anynomous/32/2928_2.png) [@Anynomous](https://forum.grin.mw/u/Anynomous)\
**Post date:** [December 22, 2024, 9:49am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/16 "2024-12-22T09:49:46Z")

</div>

Wow, that is a very ellegant way to share fees/insentives. Nice to understand MWixnet a bit better💛

---

<div class="post-metadata">

**Author:** ![wiesche](https://avatars.discourse-cdn.com/v4/letter/w/e274bd/32.png) [@wiesche](https://forum.grin.mw/u/wiesche)\
**Post date:** [December 26, 2024, 9:26pm UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/17 "2024-12-26T21:26:26Z")

</div>

I have successfully set up mwixnet. Are there any special tests or tools I can use?

---

<div class="post-metadata">

**Author:** ![wiesche](https://avatars.discourse-cdn.com/v4/letter/w/e274bd/32.png) [@wiesche](https://forum.grin.mw/u/wiesche)\
**Post date:** [December 31, 2024, 11:22am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/18 "2024-12-31T11:22:16Z")

</div>

I have rebuilt the Docker-Compose example so that:

1. Dockerfile node adapted so that the current version 5.3.3 is used as the node

2. Dockerfile Wallet  
Conversion to current git master status.  
I have also installed nginx in the Docker image.  
#nginx reverse proxy from outside =\> 0.0.0.0:13416 nginx =\> 127.0.0.1:13415  
This means that the wallet can also be addressed in a container for the master.  
Why is localhost/127.0.0.1 always static here?

I switched to the master because I noticed that the master has the new API endpoint (owner) create\_mwixnet\_req.

1. mwixnet-first-run-script.sh  
I have also passed 0.0.0.0:3000 for the execution of the mwixnet as binding  
RUST\_BACKTRACE=full mwixnet --testnet --wallet\_pass=$WALLET\_PASSWORD --bind\_addr="0.0.0.0:3000”

2. mwixnet/test/docker-compose  
Adaptation of the wallet port 13416

Now my nodes (main&test), the wallet with owner&foreign api and the mwixnet are running. The endpoint mentioned above (create\_mwixnet\_req) returns a SWAPReq object after an init\_secure\_api:

Parameter

- server\_keys The public keys of the servers participating in the mixnet (each encoded internally as a `SecretKey`)
- fee\_per\_hop The fee to be paid to each server for each hop in the mixnet
- commitment The commitment of the output to be mixed
- lock\_output Whether to lock the referenced output after creating the request

Example:  
Map params = {  
‘token’: \_token,  
‘commitment’:  
“0873492adc10c74af23bc6ee7ebab3fec0ce39379b22f39e4b30106dac62bf1e20”,  
‘fee\_per\_hop’: “5000”,  
‘lock\_output’: true,  
‘server\_keys’: [  
“89cd052dd2ef096bb197ad95d8c9bb47327c7151a3381c8da8ea053c1138221a”  
]  
};

```
dynamic resp = await postEncrypted('create_mwixnet_req', params);

```

Example response:  
cosmig + onion,

The response can be used to trigger the mwixnet SwapApi accordingly?  
Example see:

> <https://github.com/mimblewimble/mwixnet/blob/main/doc/swap_api.md>

I have a small web tool with which I process the secure-api. There’s probably not much left to test the mwixnet!  
Currently I still get the following incorrect response:  
{  
“jsonrpc": ‘2.0’,  
“error": {  
“code": -32602,  
“message": ”Failed to peel onion layer: DeserializationError(UnsupportedProtocolVersion)”  
},  
“id": 1  
}

Can anyone help me here?

ideas:

1. Deployment of the containers in a Docker registry?
2. Is it possible to create a branch of the grin-docker repo?
3. A tool should be developed with which the mwixnet api can be probed, or can the grin-gui already do this?

---

<div class="post-metadata">

**Author:** ![wiesche](https://avatars.discourse-cdn.com/v4/letter/w/e274bd/32.png) [@wiesche](https://forum.grin.mw/u/wiesche)\
**Post date:** [January 2, 2025, 7:51pm UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/19 "2025-01-02T19:51:51Z")

</div>

I create an issue:

> <https://github.com/mimblewimble/mwixnet/issues/33>
>
> I have created a SwapReq with the grin-wallet (current master) and the API endpo…int create\_mwixnet\_req:
> 
> 
> \`{
> "id": 1,
> "jsonrpc": "2.0",
> "method": "swap",
> "params": \[
> {
> "comsig": "083427461b4c90d8f9c2dc60e6ffa83a7a4480d0f9374ea1220456a752356cf8cc7702eeb507efda86100472c0339d109cb54c3d9cc7c94f853b2a8eb6cf806f5ddeb97b734b2b0e2910166fa6c262cf6a981b650f26dc31e34eb4d58b5cf89bb9",
> "onion": {
> "commit": "096c5ed08937822493c157df82fd2d9817c35785bc295368baedcaed35d3b11cb0",
> "data": \[
> "74555b8d031025435255fb587caf43d00bab94f9d6ecd625ebedb3aa237eca81d874163a4f73a13b9beb6d507a108b30e0637669e7aa0c39eb2be0a0f620fc00734854437e3fee7597a034eafd737a1ac51747fd83b23e243d65fb9be33b13d88ef1dc20d39408fb1a9981bd5f664bb279ea77d93641e8bd856795017c7c0c7a87b01708de9de79ef31d03e34f524ea4445b3599ca19b953058cdceb78f9c40156a68f3b3ff5e8c682d7bceb3a88671501ed74d2cb44011842a6c97c77a0efe15baf05eb13109ac4daf2c4f2d37e80460f4bb5dbb1c2a4095d3143f59e5e268a66b2fdc19dd2e1f1c5448d5aa8f3b2b6460bf6bfd542e6b3d3b8f8861a8fe6ad183bd4c7e31195c5b172cd6616a24a648910614eb042ad4c89441d39234884f64d0a07c2bf0af1ef9bce478e7e4289ac36c1ef3313920e22f1e7b2b4b373f5ef0acf34bf50532a52a370b2322cca6892186d9891804d10b9a2d0b9b25b5d6283a00145ee73e7b4eaa89b30437fae3a232bdf0e9309994d7511d52253f152bb4e7176e4497780cc5b54f7ee169fb6e484de9b1c46a47914c6671a76d4b7da5cf81d0e483f6fd7c3b387bc5a821182d628645801a7b847fd2c40814c98909f51ba4581432b26fb4f4200865a0784662633e2e3eb244705cbe975fe4630a12460a25a9379b82b9ddae672fbbc1e2d6353ef631395f48c6ee1cfb5991f26d2dcbf58a0c8674c5b1af36591462ceb81e55cac966f5f624e6edf3a9040c1743067817ae107255a36b98f0539c639dbddf8efe57c44a0f867334e33e4135c855b488303110356fba9eb4537c46d09c3c85e413371d2e9e2ca9091d8851596c34d5546568b30581dcf9c367109de7ad4ada56847a6048026a9ec8145100ae59f245555e9f583e7b9d64737db41058ed538bbfded35243823347fc2fa0b3bdc52da0d06510e50fb084fda841336f9355da35a972c5e76bdaf8afe9dd6b2867ef8140fbfa2168806f8d69583e76cc5a0bdb14312126e12a859be3d67bf42ea0bd4aff7a93b3f46e3766ca07048ad854be2409ad4cd87ea40ddef"
> \],
> "pubkey": "f95656b0d1910a480be99fe1a3411b3c68fde5debcf311dfdbde4e83e5184d79"
> }
> }
> \]
> }
> \`
> 
> 
> I then sent this SwapReq to my mwixnet (current master) SWAP API. Unfortunately I get the following error:
> 
> 
> \`{jsonrpc: 2.0, error: {code: -32602, message: Failed to peel onion layer: DeserializationError(UnsupportedProtocolVersion)}, id: 1}\`

---

<div class="post-metadata">

**Author:** ![wiesche](https://avatars.discourse-cdn.com/v4/letter/w/e274bd/32.png) [@wiesche](https://forum.grin.mw/u/wiesche)\
**Post date:** [August 3, 2026, 10:14am UTC](https://forum.grin.mw/t/mwixnet-community-test/11405/20 "2026-08-03T10:14:02Z")

</div>

**Update**  
I have reworked the mwixnet implementation and started a public Testnet route with one swap server and one mixer, both running over Tor.

The server changes are available in [restore compatibility with grin staging by wiesche89 · Pull Request #34 · mimblewimble/mwixnet · GitHub](https://github.com/mimblewimble/mwixnet/pull/34) and the wallet CLI changes are in [Mwixnet wallet support by wiesche89 · Pull Request #783 · mimblewimble/grin-wallet · GitHub](https://github.com/mimblewimble/grin-wallet/pull/783) . Both PRs are still work in progress.

**Test guide**  
Select an unspent output:

./target/release/grin-wallet --testnet outputs

Submit it to mwixnet:

```auto

./target/release/grin-wallet --testnet mwixnet \
  OUTPUT_COMMITMENT \
  --server mza3u6vkqodqc6kjjapfbcjrg7hgpkuw6nyq5xvfjqp5jm2lfeaocwqd.onion \
  --fee_per_hop 12500000 \
  --key ba2ee29d1e44227e3d78d1abbc7d86a9321ae24fb3656b545b001907a008bc4e \
  --key a6920c1ef8bd8bb14fe4940521eca294f797856baaa307eb51894dda157b1477

```

A successful request prints:

mwixnet request accepted (transaction N)

Check the wallet again after one or two rounds:

./target/release/grin-wallet --testnet outputs

The route charges 0.025 GRIN in total.  
f a request times out, first check whether it was accepted. If it was not accepted, unlock the output with:

./target/release/grin-wallet --testnet cancel -i N

Do not cancel if the server already accepted the request.

**Test**  
Please test it and share your feedback or any issues here.

**Next steps**

- Create an RFC for route discovery, so wallets can discover mwixnet routes and server keys automatically.
- Add mwixnet route configuration to Grim.
- Implement mwixnet swap creation in the GRIM gui
