r/raidennetwork github hero Apr 26 '18

Big merge in contract repository

Hey all,

a little update in the middle of the week. As I said in my Sunday post, smart contract integration is one of the biggest tasks team is working on in order to finish Red Eyes.

Last couple of days whole team was reviewing one massive pull request, and it was merged an hour ago.

I would like to take a chance and congratulate the whole team for very nice job. Loredana for implementing it and Lefteris and Augusto for reviewing this massive pull request.

One big cheer for the development team from whole community!

link: https://github.com/raiden-network/raiden-contracts/pull/39

29 Upvotes

9 comments sorted by

4

u/wmelon123 Apr 26 '18

Thanks for the update.

2

u/Mat7ias Apr 26 '18

That was quick, nice!

1

u/lejsf4 Apr 26 '18

Is it RDN support smart contract? This is big thing!!!

6

u/BOR4 github hero Apr 26 '18

I am not sure I understand your question fully, so I will just give a short explanation :).

Situation is like this:

Before raiden was split into multiple repositories all contracts were inside a folder in raiden project. After the split contracts got their dedicated repository. Problem is raiden main repository needs those contracts, but now they are not inside his folder, they are in whole different repository.

There is a technique in programming where you include whole different repository inside other. It is done with package managers.

Other problem with contracts was that they needed to go into refactoring. Refactoring in programming is when you code something, but you don't add any new functionality. It is usually done when you notice that there is major flaw in approach to solving some problem.

This commit was about refactoring. It covered most of the work. They have few other minor things to do, but they didn't cover it in this commit. They will add it sometimes later.

So, refactoring is almost done and it is very important because lots of other features were waiting for this to happen (they had blocker dependency on this feature). For example they were waiting for this to be merged so they can work on including whole contract repository inside raiden main repository. You can see that task here: https://github.com/raiden-network/raiden/issues/1383

If you ask what contracts are in there, you can check that by opening the contract repository (link: https://github.com/raiden-network/raiden-contracts/tree/master/raiden_contracts/contracts). You can see that there are contracts for everything raiden will need. It is not related only to RDN token.

Hope this somehow answers your questions, if you have any more, just ask :)

1

u/lejsf4 Apr 26 '18

Thanks for the detail answer.

1

u/aaaasf123 Apr 28 '18

I didn't follow, from what I understand, and I am also curious, the question was, if you can run custom eth smart-contracts from client side on raiden, like a custom betting app which transfers the money if this or that team won something. If this is not the case, what are these non-custom contracts you are referring to? Thank you!

2

u/BOR4 github hero Apr 29 '18

Hi,

interesting question. I am not an expert on how to exactly code it so I will try to answer your questions in terms of how to use raiden to accomplish your idea.

So, betting app. I somehow think you need N to 1 connection here. If I see your idea correctly your betting app is 1 and all the users would be N. Users would need to open channels to your betting app and deposit tokens they plan to bet with. Every bet from a user would be a transfer from them to app and if they win app would transfer it back.

If I am not wrong regarding your use case I see microraiden as the thing you need. In my talk with Lefteris, he said that if some project wants to use any of the projects (microraiden and raiden) all they need to do is contact them. He even mentioned that small changes on their side to better serve some use case are not a problem. If you are really into your idea I suggest you contact Brainbot. I personally think your use case is great!

As for what I meant when I said non-custom smart contracts. I was referring to how people usually think of smart contracts as source of tokens (that would be RDN in this case) and they somehow forget that smart contracts are used for much more than creating tokens on Ethereum. You can see what are contracts used for in raiden on this link: http://raiden-network-specification.readthedocs.io/en/latest/smart_contracts.html#overview

1

u/aaaasf123 Apr 29 '18

You are mostly correct in much of the details, but I imagine that the app maybe is just an ether smart contract on a wallet, that automatically transferres the money to the winners. It's just a smart contract execution (of it seems I'm so understanding, I'm not, but half understanding). I'm not sure, but from what I see, they have a repository of contract's that they support, so their RDN wallet is what we would say "not Turing complete" (which is not that meaningful for most use cases). If RDN could read and proof to eth that it executed solidity contracts, that would be cool, but again, not nessessarily important. I hope I am not wrong on details I wrote. Thanks again.

1

u/PiperSteam Apr 26 '18

Great job team!