Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    chech0x
    @chech0x
    @andrevmatos Thanks, i'm going to check out that :)
    chech0x
    @chech0x
    @andrevmatos it works :) but it seems that infura doesn't support filters. So i keep my http geth node for the moment
    Peter Holzer
    @PeHo89
    @andrevmatos Thanks, i will have a look. Using docker containers is a good hint!
    Peter Holzer
    @PeHo89
    @andrevmatos I tried both instruction sets on https://github.com/raiden-network/microraiden and on http://microraiden.readthedocs.io/en/latest/tutorials/dev-setup.html but unfortunately both ends with different errors. I think the most promising error message is "Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-yf8b9pq1/secp256k1/" which also comes up alike using docker. I know, this are only very superficial statements from my side, but i don't know what to post here further. I think i am doing something basically wrong here. I would like to use microraiden for creating paid apis for an project at university. I hope you can help me somehow. I am completely new to this technology. Is there any other guide on which i can follow to get started? Many thanks in advance for your help!
    André Vitor de Lima Matos
    @andrevmatos
    @PeHo89 That error is again related to not being able to install/compile the secp256k1 dependency, which is required by µRaiden. Please, look at microraiden demo server docker-compose.yml, it's able to build and run µRaiden straight from the repository
    Notice this is our production docker setup, available on https://demo.micro.raiden.network
    Peter Holzer
    @PeHo89
    @andrevmatos Thanks again, now i have it running! :)
    Peter Holzer
    @PeHo89
    @andrevmatos One more question: when starting the client after starting the server from the echo demo i get the error "ERROR:microraiden.client.session:Unexpected server error, status code 502; ERROR:root:Error getting the resource. Code=502 body="Channel manager ETH balance is below limit"". Do i have to change an address or something somewhere? i followed the tutorial from the website and the account wich fits the specified private key is charged with > 10 eth and > 200 tkn.
    André Vitor de Lima Matos
    @andrevmatos
    @PeHo89 Not only the client account needs ETH, you need to put some ETH (no need for tokens there) in the server account, as it may need to challenge a wrong close tx on-chain. That's what this error refer to, the server account doesn't have enough ETH
    Peter Holzer
    @PeHo89
    @andrevmatos i think i did this. but the balance from the receiver account jumps (sometime i have 22 eth, sometimes 8 eth). if i charge it with faucet, the balance doesnt change after a few seconds. whats the limit of eth?
    André Vitor de Lima Matos
    @andrevmatos
    It's very low, something like 0.1Gwei
    Maybe your chain isn't synced, or somehow µRaiden isn't being able to pick your server account's balance
    André Vitor de Lima Matos
    @andrevmatos
    @PeHo89 Apply this patch to get better info on what µRaiden sees of your balance's account, and retry the failed request
    Peter Holzer
    @PeHo89
    @andrevmatos mhm..do you have any idea how to solve this issue? i think the chain is synced. at least the server application doesn't notice that the chain is not synced. on the very beginning after running geth it did so. so i think it is synced.
    Peter Holzer
    @PeHo89
    image.png
    this is an actual screenshot of the geth console output. maybe you are right that the chain is not in sync...
    Peter Holzer
    @PeHo89
    but if i type in eth.syncing i get false. so it is synced, right?
    André Vitor de Lima Matos
    @andrevmatos
    Ropsten is currently in the 3.7M block, you're 700k off. Maybe your node hardforked (there were some nasty issues related to geth/parity consensus breaking bugs), or simply doesn't have synced peers. For parity, you may delete nodes.json to make it find new peers, but not sure how to do that with geth
    André Vitor de Lima Matos
    @andrevmatos
    Last option would be to remove the database and either try the node in light client mode or wait for a full resync
    Peter Holzer
    @PeHo89
    @andrevmatos i will try..thanks!
    Portia Burton
    @pkafei

    Hello. I'm running through your demo proxy example. I'm trying to figure out how does the receiver claim the deposit, and if this is recorded on-chain. Right now I'm able to

    1. open a channel
    2. have the sender transfer tokens on the client via metamask
    3. record the channel on the sqlite db
    4. have the receiver sign the contract
    5. on-chain show that the sender owes the receiver

    The on-chain transaction shows that the sender has sent money to the receiver, but is there anyway on-chain that I can prove the receiver has gotten the tokens?

    Peter Holzer
    @PeHo89
    @andrevmatos remove the database did the job. many thanks again!
    Peter Holzer
    @PeHo89
    @andrevmatos one more question: i would like to implement the echo service demo application on my own with typescript / javascript to better understand the technology and its way of working. as far as i understood the microraiden typescript library is only helpful for client application and not for server application? how can i implement the server code in typescript or are there existing libraries? unfortunately i have absolutely no experience with python which makes it a little hard to read. is there any help online somewhere? do have some hints for me? to be honest its very hard for me to understand all the stuff at the moment.
    Portia Burton
    @pkafei
    I have figured it out. It seems like after the receiver has settled the channel, the contract routes the tokens to the receiver. https://ropsten.etherscan.io/tx/0x039a368be9e827009139830f7ab303eb80433fa98c7c401f51d69f494197672f
    Peter Holzer
    @PeHo89

    @andrevmatos I loaded the channel which was created by the echo service demo application in typescript app and want to close it. I always get an 'unknown account' error. But i see correct (?) channel state. Code is here: https://gist.github.com/PeHo89/1a998e89d7fb77d6c7a3a53f9a6b9e38. Here is the output:

    Application started!
    { account: '0x4f171ad9568e295998182d09a3dbc5db03a19750',
    receiver: '0x58a08b28dada672f04a20d22e9faf4097cc7e322',
    block: 3769554,
    proof: { balance: BigNumber { s: 1, e: 0, c: [Array] } } }
    Closing channel. Cooperative = undefined
    Error: unknown account
    at Object.InvalidResponse (/home/peter/Downloads/microraiden-master/microraiden/webui/microraiden/node_modules/web3/lib/web3/errors.js:38:16)
    at /home/peter/Downloads/microraiden-master/microraiden/webui/microraiden/node_modules/web3/lib/web3/requestmanager.js:86:36
    at XMLHttpRequest.request.onreadystatechange (/home/peter/Downloads/microraiden-master/microraiden/webui/microraiden/node_modules/web3/lib/web3/httpprovider.js:129:7)
    at XMLHttpRequestEventTarget.dispatchEvent (/home/peter/Downloads/microraiden-master/microraiden/webui/microraiden/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
    at XMLHttpRequest._setReadyState (/home/peter/Downloads/microraiden-master/microraiden/webui/microraiden/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
    at XMLHttpRequest._onHttpResponseEnd (/home/peter/Downloads/microraiden-master/microraiden/webui/microraiden/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
    at IncomingMessage.<anonymous> (/home/peter/Downloads/microraiden-master/microraiden/webui/microraiden/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)
    at IncomingMessage.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1106:12)
    at process._tickCallback (internal/process/next_tick.js:178:19)

    Unfortunately I also can not create a new channel between a new sender and an existing receiver. Same error message. What is missing or what I am doing wrong here?
    André Vitor de Lima Matos
    @andrevmatos
    @pkafei tokens are actually distributed back on settle, which is done immediatelly on cooperative close and when receiver is closing the channel, or after timeout blocks, then the sender can settle it and get its tokens back (if the receiver went offline, for example). On uncooperative close, receiver will also settle the channel (inside timeout period) if it detects a wrong close attempt by the sender
    @PeHo89 The TypeScript library currently implements only the client/sender logic. If I'm not mistaken, SmartMesh was working on a Java or JS implementation of the server logic, but you could do it too, it should not be that much code and will give you a complete overview of the internals. Feel free to contribute it back to the community, we'll be glad to review and possibly make it official ;)
    About your error, keep in mind JS/TS client/sender uses eth-node signing of the transactions, so your ETH node/web3 provider (MetaMask, Geth, Parity, etc) needs to have the Private Key of the account you're trying to use on its keystore. This erros specifically means that you tried to sign a transaction with an account addres which the node knows nothing about. If you're not doing that on browser, there's some ethereum js libraries that may help you load and sign transactions on client too, as we do in the Python client, but that is unsafe in browser environments, that's why it was left off for now.
    Peter Holzer
    @PeHo89
    @andrevmatos many thanks for your input, i will have a look ;)
    Peter Holzer
    @PeHo89
    @andrevmatos Implementing the server / receiver logic in ts / js would be very interesting. I have to clarify this.
    did you mean I have to add the accounts in geth (i am using geth) or in my application somewhere? I can not image how / where to do this. I thought the basic workflow is somehow opening a channel, sending and receiving token und closing it, right? Signing transactions has to do with sending and receiving token in my imagination. Anyway adding the accounts to geth didn't solve the problem. Do you have other / further hints? By the way its very cool from you that you are helping me! Thanks again! :)
    Peter Holzer
    @PeHo89
    @andrevmatos Maybe I try to explain my problem a little better. I created 2 accounts with metamask: one for the sender and one for the receiver. I run the python echo service with that 2 accounts. Then I played a little bit arround with the typescript library. I wanted to open, load, close channels und I wanted to send some token via a channel. When I try to load the created channel via the python app, I receive some information. When I try to load a channel with doesn't exist (between a new sender account and the old receiver account) of course it doesn't find a channel. When I try to open a new channel (new sender and old receiver) I get the error 'Error: unknown account' but my local geth node knows all 3 accounts ('geth account list' shows all 3). What else could be the reason for this? Do you have any idea? Further I can not close the open channel (old sender and old receiver created by the echo service). The error massage 'Closing channel. Cooperative = undefined. Error: unknown account'. What could be the reason for this? Many many thanks!
    André Vitor de Lima Matos
    @andrevmatos
    @PeHo89 Is this error being thrown in client/sender? Through the webUI/Metamask, or something else?
    Peter Holzer
    @PeHo89
    @andrevmatos Yes, through using the sender typescript logic in my own 'application'. I am playing a little bit with the library. I also can't open a new channel between 2 completely new accounts.
    André Vitor de Lima Matos
    @andrevmatos
    @PeHo89 Yes == webui/Metamask/browser ?
    Peter Holzer
    @PeHo89
    @andrevmatos No, typescript compiled to JavaScript and executed by node. But the ethereum node knows all 4 accounts. I figured out one new thing: between sender and receiver 5 channels exits (maybe caused by errors on bringing the application up at my very beginning?) If I send a get request to /api/1/stats I get "open_channels": 5 back and when I am request 'api/1/channels' I get one sender address and 5 block numbers back. But when I am trying to close this 5 channels with a delete request to 'api/1/channel/<sender_address>/<block_number>' I everytime receive an internal server error (NoBalanceProofReceived('Payment has not been registered.') exception). What could be the problem? But the other thing is that I am not able to open a completely new channel for 2 completely new accounts.
    Peter Holzer
    @PeHo89
    @andrevmatos And regarding implementing the server / receiver logic in tyescript: Yes, I will do this! What do you suggest here? Inspecting the python code and implement it in typescript? or do you have further documentation?
    André Vitor de Lima Matos
    @andrevmatos
    @PeHo89 Hmm, that is a problem, there's a limitation on using geth directly by the client now with eth-node side signing (which is what is done in ths TS client lib)
    µRaiden uses an early implementation of EIP712's eth_signTypedData, which is only supported by Metamask. The python client works because it does the signing locally (i.e. it opens the private key by itself). The TS client library rely on the eth node (e.g. Geth, Metamask) to do the signing, and geth doesn't support it directly
    You may either look on how to implement a middleware to do the signing on this format locally (there's an implementaton on the test folder for the microraiden js/ts client library), or wait until last eip712 version is implemented on major clients and we update our implementation (which we plan to do as soon as metamask, geth and parity implements the accepted draft)
    Peter Holzer
    @PeHo89
    @andrevmatos To be honest I am not sure if I can follow you. The problem is the signing of messages / requests to the ethereum node, right? In your web ui application this is done by MetaMask and in your echo service it is done within the application, right? So I have to implement this part in TS within my 'app' too, right? Oh, yeah, I just found this part too, okay.
    André Vitor de Lima Matos
    @andrevmatos
    Yes. Both python client and server open their private keys directly, and then they can sign any data they want, in whatever format they want, and at the time we went with this early eth_signTypedData format proposed by Metamask, since the webUI client was the only one which didn't have much choice. As this early signature format isn't supported directly by geth, and being deprecated in Metamask, you may either wait for the final draft to be implemented in the clients, or right now follow the python implementations, open the key by yourself and implement the signature method by yourself (as the link above does for tests/ganache-cli)
    Peter Holzer
    @PeHo89
    @andrevmatos Okay, than I think I got it. Thanks in the meanwhile. Regarding implementing the server / receiver logic in TS: After I got the things running I will try to do this. What do you suggest here? Inspecting the python code and implement it in typescript? or do you have further documentation?
    Ghost
    @ghost~59777aeed73408ce4f6eb81d
    Hi guys, my name is Victor. I recently found out about microraiden and am trying to get it up and running on my ILP connector (interledger.org) I looked at the docs but it seems I'm going to have to run my own node. Any way to easily connect to the Raiden network and send payments through microraiden channels without having to do all the set-up?
    All I'm trying to do is lock up a bunch of ETH in a smart contract and open a payment channel for IOUs or something similar.
    Peter Holzer
    @PeHo89
    @andrevmatos Unfortunately I didn't get it running so that I can open / close channels in my client implementation. Do you have some further informations which can guide me through the single steps I need to do? I totally got stuck here.
    André Vitor de Lima Matos
    @andrevmatos
    @PeHo89 I'd need a little bit more information. Where exactly are you stuck?
    Peter Holzer
    @PeHo89
    @andrevmatos I would like to implement the client logic in TS for the echo service and I got stuck on how to sign messages as you mentioned last time. As I am completely new to this field I don't even know the steps that have to be done one by one. It would be very great if you can provide some guide or more Infos to me on how to proceed from scratch. Many thanks!
    André Vitor de Lima Matos
    @andrevmatos
    @PeHo89 well, the client logic is already implemented in TS. The only thing missing is for the client to be able to run on node environment, and to achieve it, you need only to implement private key opening and local signing with eth_signTypedData Metamask early draft, as I pointed is already done/injected in the tests (you need only to do the same with actual keys/environment). The echo node has nothing to do with client, but with server. If you want to implement it in TS, then it'd need to be done from scratch, using the python server files as base for the algorithm. The echo server is actually a tiny data logic surrounded by the µRaiden flask-restapi decorators and classes, so you'd need to implement it in TS (probably as an express middleware), and then it can be used on express endpoints, e.g. an endpoint which implements the echo node logic (basically, give back some request parameter/data upon payment, kinda useless, but good for testing)
    Peter Holzer
    @PeHo89
    @andrevmatos Many thanks for your input. I think I manged it. I can open, load, close and settle channels via TS library. But I can not increment balances. What are the steps needed to be done? loadChannelFromBlockchain/openChannel -> incrementBalanceAndSign -> confirmPayment right? I can see the incremented balance right after confirmPayment but it is not persisted. What could be the reason for that? Do you need more information on this?
    Nick Savers
    @nicksavers
    @brainbot Any plans to integrate with BitRefill?