Request for Funding @scilio (CoinSwap Implementation)

Because, as the proposal states:

Each node receives a sorted column, not knowing the i indices shown,
transforms each commitment by some excess specified for that commitment,
sorts the results, and passes on the new column to the next node.

To prevent correlations, node j must not know which commitment belongs to which user. That’s why the payloads are permuted by each node.

It’s a little worrying that you missed the essence of the design:-(

If there’s any aspect of the coinswap protocol that’s not entirely clear to you, then please ask for clarification, so we don’t have such misunderstandings.

Node j still won’t. For each i, a Ci,j-1 is computed by node j-1. The tuples (Ci,j-1, payloadsi,j) are then sorted by commitment (Ci,j-1), and the sorted matrix of tuples is then sent to node j. Node j+1 wouldn’t see Ci,j-1.

The design is clear to me. I believe we’re just speaking on different wavelengths :smirk:. I’ll finish writing the RPC layer and then take a break to more formally document the flow of data. That should clear up any misunderstandings.

7 Likes

I’m sorry for mistaking your deviation from the proposal as a misunderstanding. I now see that it’s a useful optimization.
My apologies, and good job on spotting the redundancy!

14 Likes

Milestone 1 is just about complete. I just have a bit of error handling left and some documentation to write. If someone could create a mwixnet repo in the mimblewimble github org, I’ll be able to create a pull request for everyone to review.

12 Likes

Repository created GitHub - mimblewimble/mwixnet: Implementation of the Mimblewimble CoinSwap proposal.

6 Likes

Thank you. I’ve created the pull request.

6 Likes

I think we need to come up now with a review process in order to accept the first PR.
Great work and now we need a community effort to review the PR.

Who would be able to review it?
@tromp @joltz @davidtavarez

3 Likes

I will do my best to give it a review this week.

First I need to familiarize myself with the protocol we are trying to implement. Is Mimblewimble CoinSwap proposal the completed specification or is there an updated one somewhere else?

7 Likes

The code is based on that design, with some modifications documented in the README

7 Likes

@scilio could you give an update on the 18th Agenda: Community Council (CC), 18 January 2022 · Issue #33 · grincc/agenda · GitHub . If you’re unable to attend could you leave an update on the forum?

1 Like

Milestone 2 is nearing completion. So far, it

  • communicates with a GRIN node’s API using jsonrpc calls
  • validates input signatures using the new Commitment Signature scheme
  • verifies input commitments are in the UTXO set
  • executes round every DAY_HEIGHT (1440) blocks
  • verifies generated output commitments are not in the UTXO set
  • builds the kernel and assembles the transaction
  • submits the transaction to the node

For milestone 2, I still need to

  • add reorg support
  • improve fee handling & wallet support (could fall under milestone 3)
  • add better e2e tests

Trying to add support for handling reorgs efficiently has been the main challenge so far. I’m getting frustrated by the lack of progress, so may skip this and come back to it after the rest of milestone 2 is finished and merged.

My original time estimates were apparently too optimistic. Estimating software is hard. But don’t worry, I’m not going anywhere. I’ll try to give more frequent updates so everyone knows I’m still here.

20 Likes

Thank you for the diligence and excellence, Scilio.

1 Like

Glad to hear that. I’ll take this opportunity to remind about some minor checks that would still need to be done about duplicate inputs/outputs which would stall the process that we left here for the next one.

2 Likes

@scilio I know you have been making some nice progress:
keybase://chat/grincoin.teams.wallet_dev#general/9472
How about a short bullet-point update here, so the community can show/like their appreciation for your efforts :smiley:

4 Likes

How’s the project going hax0rs need

@scilio Any updates on the progress of the CoinSwap implementation?

2 Likes

The (very) long overdue pull request for milestone 2 is now ready for review.

The description of the PR lists some deviations from the original project plan. I included much of the milestone 3 work in milestones 1 & 2, but I haven’t yet added reorg support.

Unless there are objections, I would like to push basic reorg support to milestone 3 with the understanding that much of the more complex milestone 3 work was completed earlier. In its current form, the coinswap server should be fully operational, but if a malicious miner is able to reorg a swap transaction out, the server does not attempt to recreate it.

16 Likes

Are you planning to add tests to the code, right?

I plan to improve test coverage, but there are tests at the bottom of config.rs, onion.rs, secp.rs, and server.rs.

2 Likes

Hi @scilio , can we have an update for informing the community ? We are curious and very excited about Coinswap ツ

3 Likes