Git Product home page Git Product logo

microraiden's Introduction

µRaiden Build Status

Join the chat at https://gitter.im/raiden-network/microraiden

µRaiden is an off-chain, cheap, scalable and low-latency micropayment solution.

µRaiden documentation

Smart Contract

Current version: 0.2.0 (second Bug Bounty release). Verifiable with RaidenMicroTransferChannels.call().version(). Note that a new µRaiden release might include changing the Ethereum address used for the smart contract, in case we need to deploy an improved contract version.

The RaidenMicroTransferChannels contract has been deployed on the main net: 0x1440317CB15499083dEE3dDf49C2bD51D0d92e33

The following parameters were used:

  • token_address: 0x255aa6df07540cb5d3d297f0d0d4d84cb52bc8e6
  • challenge_period: 8640 (blocks, rough equivalent of 36 hours)

There have been internal and external audits of the above contract. That being said, we do not recommend them to be used in production before a stable 1.0.0 release is made. All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use at your own risk.

A stable release depends on the SignTypedData - EIP712 standard being finalized. We are aware that the current supported implementation of this standard has security issues.

Kovan

Ropsten

Rinkeby

Brief Overview

µRaiden is not part of the Raiden Network. However, it was built using the same state channel idea and implements it in a less general fashion focusing on the concrete application of micropayments for paywalled content.

The main differences between the Raiden Network and µRaiden are:

  • µRaiden is a many-to-one unidirectional state channel protocol, while the Raiden Network is a many-to-many bidirectional solution and implies a more complex design of channel networks. This allows the Raiden Network to efficiently send transfers without being forced to pay for opening new channels with people who are already in the network.
  • µRaiden off-chain transactions do not cost anything, as they are only exchanged between sender and receiver. The Raiden Network has a more complicated incentive-based off-chain transport of transaction information, from one user to another (following the channel network path used to connect the sender and the receiver).

Tokens and Channel Manager Contract

µRaiden uses its own token for payments which is both ERC20 and ERC223 compliant.

In a nutshell, clients (subsequently called "senders") wanting to access a provider's payable resources, will open a micropayment channel with the provider ("receiver") and fund the channel with a number of tokens. These escrowed tokens will be kept by a third party contract that manages opening and closing of channels.

Off-chain transactions

However, the heart of the system lies in its sender -> receiver off-chain transactions. They offer a secure way to keep track of the last verified channel balance. The channel balance is calculated each time the sender pays for a resource. He is prompted to sign a so-called balance proof, i.e., a message that provably confirms the total amount of transfered tokens. This balance proof is then sent to the receiver's server. If the balance proof checks out after comparing it with the last received balance and verifying the sender's signature, the receiver replaces the old balance value with the new one.

Closing and settling channels

A visual description of the process can be found here.

When a sender wants to close a channel, a final balance proof is prepared and sent to the receiver for a closing signature. In the happy case, the receiver signs and sends the balance proof and his signature to the smart contract managing the channels. The channel is promptly closed and the receiver debt is settled. If there are surplus tokens left, they are returned to the sender.

In the case of an uncooperative receiver (that refuses to provide his closing signature), a sender can send his balance proof to the contract and trigger a challenge period. The channel is marked as closed, but the receiver can still close and settle the debt if he wants. If the challenge period has passed and the channel has not been closed, the sender can call the contract's settle method to quickly settle the debt and remove the channel from the contract's memory.

What happens if the sender attempts to cheat and sends a balance proof with a smaller balance? The receiver server will notice the error and automatically send a request to the channel manager contract during the challenge period to close the channel with his latest stored balance proof.

There are incentives for having a collaborative channel closing. On-chain transaction gas cost is significantly smaller when the receiver sends a single transaction with the last balance proof and his signature, to settle the debt. Also, gas cost is acceptable when the sender sends the balance proof along with the receiver's closing signature. Worst case scenario is the receiver closing the channel during the challenge period. Therefore, trustworthy sender-receiver relations are stimulated.

Try out the µRaiden demo and build your own customized version, following our instructions below!

Quick Start

  • install the Proxy component (more details here):
virtualenv -p python3 env
. env/bin/activate
pip install microraiden
  • install the WebUI component for the paywall examples

Note that while the RaidenMicroTransferChannels contract supports multiple open channels between a sender and a receiver, the WebUI component only supports one.

cd microraiden/microraiden/webui/microraiden
npm i && npm run build
  • run the Proxy component:

For an overview of parameters and default options check https://github.com/raiden-network/microraiden/blob/master/microraiden/click_helpers.py

For chain and contract settings change: https://github.com/raiden-network/microraiden/blob/master/microraiden/config.py

cd microraiden
python -m microraiden.examples.demo_proxy --private-key <private_key_file> start

µRaiden

Installation

Using virtualenv

Run the following commands from the repository root directory.

virtualenv -p python3 env
. env/bin/activate
pip install -e microraiden

Using microraiden in pip's editable mode

Because of gevent you will need to install microraiden's requirements first.

virtualenv -p python3 env
. env/bin/activate
git clone [email protected]:raiden-network/microraiden.git
cd microraiden/microraiden
pip install -r requirements-dev.txt
pip install -e .

Using a global pip3 installation

sudo pip3 install -e microraiden

Execution

HTTP Proxy

There are several examples that demonstrate how to serve custom content. To try them, run one of the following commands from the microraiden directory:

python3 -m microraiden.examples.demo_proxy --private-key <private_key_file> start

or

python3 -m microraiden.examples.wikipaydia --private-key <private_key_file> --private-key-password-file <password_file> start

By default, the web server listens on 0.0.0.0:5000. The private key file should be in the JSON format produced by Geth/Parity and must be readable and writable only by the owner to be accepted (-rw-------). A --private-key-password-file option can be specified, containing the password for the private key in the first line of the file. If it's not provided, the password will be prompted interactively. An Ethereum node RPC interface is expected to respond on http://localhost:8545. Alternatively, you can use Infura infrastructure as a RPC provider.

M2M Client

python3 -m microraiden.examples.m2m_client --key-path <path to private key file> --key-password-path <password file>

Library usage

Client

The µRaiden client backend used by the M2M sample client can be used as a standalone library. After installation, import the following class:

from microraiden import Client

client = Client('<hex-encoded private key>')

Alternatively you can specify a path to a JSON private key, optionally specifying a file containing the password. If it's not provided, it'll be prompted interactively.

client = Client(key_path='<path to private key file>', key_password_file='<path to password file>')

This client object allows interaction with the blockchain and offline-signing of transactions and Raiden balance proofs.

An example lifecycle of a Client object could look like this:

from microraiden import Client

receiver = '0xb6b79519c91edbb5a0fc95f190741ad0c4b1bb4d'
privkey = '0x55e58f57ec2177ea681ee461c6d2740060fd03109036e7e6b26dcf0d16a28169'

# 'with' statement to cleanly release the client's file lock in the end.
with Client(privkey) as client:

    channel = client.get_suitable_channel(receiver, 10)
    channel.create_transfer(3)
    channel.create_transfer(4)

    print(
        'Current balance proof:\n'
        'From: {}\n'
        'To: {}\n'
        'Channel opened at block: #{}\n'  # used to uniquely identify this channel
        'Balance: {}\n'                   # total: 7
        'Signature: {}\n'                 # valid signature for a balance of 7 on this channel
        .format(
            channel.sender, channel.receiver, channel.block, channel.balance, channel.balance_sig
        )
    )

    channel.topup(5)                      # total deposit: 15

    channel.create_transfer(5)            # total balance: 12

    channel.close()

    # Wait for settlement period to end.

    channel.settle()

    # Instead of requesting a close and waiting for the settlement period to end, you can also perform
    # a cooperative close, provided that you have a receiver-signed balance proof that matches your
    # current channel balance.

    channel.close_cooperatively(closing_sig)

The values required for a valid balance proof required by the receiver end are printed above. Make sure to let them know.

microraiden's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microraiden's Issues

Upgrade to ERC223-tokens

Get rid of approve/transferFrom pattern, to be more user friendly and save gas.
Requires changes in all components.

https://github.com/Dexaran/ERC23-tokens
ethereum/EIPs#223

  • Allows contract developers to handle incoming token transactions.
  • ERC223 transfer to contract consumes 2 times less gas than ERC20 approve and transferFrom at receiver contract.
  • Allows to deposit tokens into contract with a single transaction. Prevents extra blockchain bloating.

Support Tester Chain

From Rocket.Chat:

jannik 14:07
tester doesn't support getLogs but I don't know if that's the only issue
replacing getLogs with newFilter and getFilterChanges should be quite straightforward, but we'd have to support both options because Infura doesn't like the latter one.

Channel Closing Incentives

Opening a channel costs gas. This is always payed by the sender.
Closing a channel also costs gas. Let's look at the incentives to cooperate.

Receiver wants to settle

Reasons of doing so would be,

  • channel ran out of funds and the sender is not expected to top-up, i.e. sender is not expected to pay for the closing cost
  • sender became inactive, receiver wants to settle

Receiver can always settle a channel with a single transaction.

Sender wants to settle

If he has agreed with the receiver on closing the channel and received a sender signed proof of agreement on the last balance, then the sender can settle the channel with a single transaction.

Receiver perspective

If the sender does not cooperate, the client can close with a wrong balance which the receiver needs to challenge. In order to not having to pay for a tx, the receiver is incentivised to cooperate when the client requests an agreement on closing the channel.

Sender perspective

Requesting closing of a channel is more expensive (additional storage allocated) than then directly settling it. Also the party settling the channel will get a gas refund from the freeing the storage. Also settlement is not deferred by a challenging period. Therefore the client will try to settle the channel with one transaction based on a signed closing agreement from the receiver.

Mode of the state files used by proxy and client.

It'd be probably better to set modes to 600 - I am not sure if there is currently any security issue caused by letting others know current balance proof, but it won't hurt to enforce it.

The mode should be also checked for private key files and app must refuse to start if the file is readable by others.

WebUI: Channel does not exists in webui

Problem:
If webui cached state uses a saved state of a channel that has been closed already, only a server reply "Channel does not exist or has been closed(sender=0x0052d7b657553e7f47239d8c4431fef001a7f99c, open_block_number=3261525)" is displayed.
The message goes away only after deleting the cookies.

Solution:
The webUI should display either a button to forget/settle the channel or forget the saved data automagically.

webapp displays a channel that doesn't exist

If the webapp fails to create a channel (see i.e. tx 0xc6CeA2fF3e5Aef51a54568a03e8b3ba896115F3b), the client will still display channel info as it has been created, but with zero balance.

The app should display an error message instead, prompting user to reload the page and retry the payment.

Change closing signature format

Old format:

  • sign(privkey_receiver, (balance_signature))
  • with balance_signature being the balance proof message (receiver_address, open_block_number, balance) signed by the sender

New format:

  • same as sender-signed balance proof, except it's signed by the receiver.
  • that is: sign(privkey_receiver, (sender_address, open_block_number, balance))

Pros:

  • produces a human-readable signature message
  • doesn't include the sender signature in the signing message (user experience)
  • doesn't require a sender signature => more flexibility
  • balance proof message and closing message only differ in sender/receiver

Cons:

  • human-readable signature is harder to verify on-chain (and more costly)

Testnet Deployment

Deploy on the Rinkeby, Kovan, Ropsten testnets and verify contract with Etherscan. Document addresses.

channel manager misses an event

sometimes channel manager misses a block, and in this case an event may be skipped.

Client requests a resource. Receives a 402 reply, so it will proceed to create a new channel.

127.0.0.1 - - [2017-08-16 12:13:18] "GET /doggo.jpg HTTP/1.1" 402 4106 0.000996
DEBUG:raiden_mps.channel_manager:filtering for events u:3221846-latest c:3221845-3221845 @3221846

Another attempt to get the resource, client receives another 402 because ChannelCreate is not confirmed

127.0.0.1 - - [2017-08-16 12:13:25] "GET /doggo.jpg HTTP/1.1" 402 280 0.051550
DEBUG:raiden_mps.channel_manager:filtering for events u:3221847-latest c:3221846-3221846 @3221847

channel manager registers a ChannelOpened event in a block ...1847

DEBUG:raiden_mps.channel_manager:received unconfirmed ChannelOpened event (sender 0x0052d7b657553e7f47239d8c4431fef001a7f99c, block number 3221847)
INFO:channel_manager:unconfirmed channel event received  

Note that next filter is at block ...1849. CM skips check for confirmed events in block ...1847.

DEBUG:raiden_mps.channel_manager:filtering for events u:3221849-latest c:3221848-3221848 @3221849
127.0.0.1 - - [2017-08-16 12:13:34] "GET /doggo.jpg HTTP/1.1" 402 280 0.057406
DEBUG:raiden_mps.channel_manager:filtering for events u:3221850-latest c:3221849-3221848 @3221849
127.0.0.1 - - [2017-08-16 12:13:43] "GET /doggo.jpg HTTP/1.1" 402 280 0.051625
DEBUG:raiden_mps.channel_manager:filtering for events u:3221850-latest c:3221849-3221849 @3221850
DEBUG:raiden_mps.channel_manager:filtering for events u:3221852-latest c:3221851-3221851 @3221852

Channel is not confirmed and thus the server can't provide this resource to the client.

127.0.0.1 - - [2017-08-16 12:13:52] "GET /doggo.jpg HTTP/1.1" 402 280 0.053337
DEBUG:raiden_mps.channel_manager:filtering for events u:3221853-latest c:3221852-3221852 @3221853
DEBUG:raiden_mps.channel_manager:filtering for events u:3221854-latest c:3221853-3221854 @3221855
127.0.0.1 - - [2017-08-16 12:14:01] "GET /doggo.jpg HTTP/1.1" 402 280 0.056821

Implement new message signing and verification

Many clients use different algorithms for their message signing.

There are two main issues we should decide on:

  • Whether or not to use the v += 27 value (we currently don't)
  • Whether to use Parity's way of signing a message (hex-encode message with leading 0x and eth_sign that message) or Metamask way (expect 32 byte msg + raw sign that).

It seems like using eth_sign is supposed to become the standard but Metamask explicitly reverted from that after it broke a lot of apps: MetaMask/metamask-extension#1104 (comment)
So we probably need to support both signatures, at least on verification.

Current verify_X functions in the contract code and crypto.py return the recovered signer address. This is not possible anymore if there are two potential signature algorithms like we have now. Options are:

  1. Add an optional argument that determines the recovery type (raw sign or eth_sign), defaulting to the old one.
  2. Have the function return true/false instead of an address and take an additional expected_address and check both algorithms against it. Return false it neither matches. This would require the contract's non-cooperative close function to take an additional _sender address in order to retrieve the sender if the receiver calls the function.
  3. Have the function return both addresses and let the calling code check against both.

I personally prefer option 2). We should definitely adopt the new "standard" way of signing in the client code though. This means:

  • Take raw balance proof message (without hashing)
  • Convert to 0x-prefixed hex string
  • Sign with eth_sign (I added an eth_sign implementation to crypto.py)

These changes would need to be implemented in crypto.py, the web client, and the contract + tests.

Minor webui issues

  • after clicking close, dialog should switch status of a channel to "closed" and hide other buttons
  • the same with forget button
  • when displaying "open channel" dialog, the deposit button is disabled by default and enables only after changing token amount of the spinner box.
  • if I close the channel, reload, then forget the channel, channel status changes back to an 'opened' state (all buttons are visible and status is "opened"), clicking sign and close buttons will cause an error
  • if a tx for opening of a new channel is rejected in MM/Parity, webui displays spinwheel and a dialog "The transactions are being processed.
    Please authorize with your Ethereum client.". How about setting a timer and if within 60 seconds tx doesn't appear, then the webui will display an error.

handle RDN-Nonexisting-Channel in the web client

Problem description

In rare circumstances, the client's channel state may be in a desync with the proxy.
This can happen if client attempts to use a channel that's been for some reason deleted from the proxy.

Solution

The webui must

  1. detect presence of a RDN-Nonexisting-Channel header
  2. notify user that the proxy will not accept balance signatures of this channel, offering an option of close/settle
  3. automatic signature popups and signature button must be disabled

To reproduce

  1. Create a new channel from the webui
  2. using rest API, delete the channel curl -X delete http://127.0.0.1:5000/api/1/admin -d sender=0x0... -d open_block=12345
  3. Access content using webui again

Safe saving of the server state

Server should first save the state into a tempfile and only then overwrite the state file to prevent corruption of the data.

REST api management interface

It should be possible to query runtime state of the proxy server via the REST interface.

  • closing/settlement of an open channel by the server
  • state of an open channel (balance...)
  • maybe some stats

client does not sync channels properly

Sometimes there is a channel that's already been closed, but client uses it as if it was open.

Solution:
add an error header to a server reply and handle it properly in the client.

Main Readme - MicroRaiden description

Add a high level description of MicroRaiden.

Maybe with main differences & similarities between MicroRaiden and Raiden, so that people won't confuse them.

make a README file

There should be a nice README.md that describes the project and shows a basic setup of the paywall. It will also contain links to tutorials, once they are ready.

Bidirectional Channels

For some applications bidirectional channels could be useful.

Bidirectional channels are composed of two simple channels. But the logic during settlement and validating payment capacity is changed such that the spendable amount is deposit-balance of the sender->receiver channel plus the balance of the receiver->sender channel.

This might require, that we allow to create the second channel using the same opening_block.

New balance signing error in WebUI

New error at balance signing in the webUI : {"message": "Internal Server Error"}

Proxy error:

[2017-08-18 09:33:36,267] ERROR in app: Exception on /doggo.jpg [GET] 
Traceback (most recent call last):
  File "/Users/loredana/ETH/raiden-micropayment-service/env/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/loredana/ETH/raiden-micropayment-service/env/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/loredana/ETH/raiden-micropayment-service/env/lib/python3.6/site-packages/flask_restful/__init__.py", line 480, in wrapper
    resp = resource(*args, **kwargs)
  File "/Users/loredana/ETH/raiden-micropayment-service/env/lib/python3.6/site-packages/flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/Users/loredana/ETH/raiden-micropayment-service/env/lib/python3.6/site-packages/flask_restful/__init__.py", line 595, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/Users/loredana/ETH/raiden-micropayment-service/raiden_mps/raiden_mps/proxy/resources/expensive.py", line 131, in get
    data.balance_signature)
  File "/Users/loredana/ETH/raiden-micropayment-service/raiden_mps/raiden_mps/channel_manager.py", line 418, in register_payment
    c = self.verify_balance_proof(receiver, open_block_number, balance, signature)
  File "/Users/loredana/ETH/raiden-micropayment-service/raiden_mps/raiden_mps/channel_manager.py", line 405, in verify_balance_proof
    self.contract_proxy.address
  File "/Users/loredana/ETH/raiden-micropayment-service/raiden_mps/raiden_mps/crypto.py", line 91, in verify_balance_proof
    pubkey = PublicKey.from_signature_and_message(balance_sig, msg, hasher=None)
  File "/Users/loredana/ETH/raiden-micropayment-service/env/lib/python3.6/site-packages/coincurve/keys.py", line 244, in from_signature_and_message
    deserialize_recoverable(serialized_sig, context=context),
  File "/Users/loredana/ETH/raiden-micropayment-service/env/lib/python3.6/site-packages/coincurve/ecdsa.py", line 64, in deserialize_recoverable
    raise ValueError("Invalid recovery id.")
ValueError: Invalid recovery id.

Gas Cost Baseline

A: Sender
B: Receiver
C: Micropayment Channel Contract

Current: 103

1. Approve: 41

Base:21
Store Approval: 20

2. Open: 36 (actual: 59)

Base:21
Transfer A>C: 5 + 5
Free Approval: -15
Store Channel: 20

3. Close: 26 (actual: 90)

Base:21
Transfer C>A: 5 + 5
Transfer C>B: 5 + 5
Free Channel: -15

Custom: 77

Trusted Contract can deduct w/o approval.
Similar to approveAndCall (which would be 5 more expensive)
Saves one tx (21) and one sstore-srefund (5)

1. Open: 51

Base:21
Transfer A>C: 5 + 5
Store Channel: 20

2. Close: 26

Base:21
Transfer C>A: 5 + 5
Transfer C>B: 5 + 5
Free Channel: -15

webUI: buttons should reflect the state of a channel

buttons in the webUI should be displayed depending on the channel state - i.e. it doesn't make sense to display 'sign' button if the channel is closed, or 'settle' if channel is still open and we expect user to 'close' the channel first.

Paywall server configuration

Configuration parameters should be configurable by having a config file or command line options.

  • contract address
  • token address
  • private key
  • html/js files used when displaying a paywall

Can't get the content - Invalid recovery ID

When trying to get the content, server will reply with E500 - Internal server error.

How to reproduce:

  1. delete cookies from the browser & the server state rm ~/.raiden/*pkl -f
  2. start the server and let it sync
  3. in a browser, navigate to a resource, do usual steps with deposit and signing
  4. after the deposit, the content is unavailable and server will reply with E500

Server log:

  File "/home/xoza/src/micropay/lib/python3.4/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/xoza/src/micropay/lib/python3.4/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/xoza/src/micropay/lib/python3.4/site-packages/flask_restful/__init__.py", line 480, in wrapper
    resp = resource(*args, **kwargs)
  File "/home/xoza/src/micropay/lib/python3.4/site-packages/flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/home/xoza/src/micropay/lib/python3.4/site-packages/flask_restful/__init__.py", line 595, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/home/xoza/src/micropay/raiden-micropayment-service/raiden_mps/raiden_mps/proxy/resources/expensive.py", line 131, in get
    data.balance_signature)
  File "/home/xoza/src/micropay/raiden-micropayment-service/raiden_mps/raiden_mps/channel_manager.py", line 413, in register_payment
    c = self.verify_balance_proof(receiver, open_block_number, balance, signature)
  File "/home/xoza/src/micropay/raiden-micropayment-service/raiden_mps/raiden_mps/channel_manager.py", line 400, in verify_balance_proof
    self.contract_proxy.address
  File "/home/xoza/src/micropay/raiden-micropayment-service/raiden_mps/raiden_mps/crypto.py", line 104, in verify_balance_proof
    return addr_from_sig(balance_sig, msg)
  File "/home/xoza/src/micropay/raiden-micropayment-service/raiden_mps/raiden_mps/crypto.py", line 27, in addr_from_sig
    receiver_pubkey = PublicKey.from_signature_and_message(sig, msg, hasher=None)
  File "/home/xoza/src/micropay/lib/python3.4/site-packages/coincurve/keys.py", line 244, in from_signature_and_message
    deserialize_recoverable(serialized_sig, context=context),
  File "/home/xoza/src/micropay/lib/python3.4/site-packages/coincurve/ecdsa.py", line 64, in deserialize_recoverable
    raise ValueError("Invalid recovery id.")
ValueError: Invalid recovery id.

webUI - ERC223 - `transfer` - Invalid number of arguments to Solidity function

When trying to call:

transfer.sendTransaction(
      this.contract.address,
      deposit,
      byte_data,
      {from: account},
      callback)

Possible issues:

Error:

Uncaught Error: Invalid number of arguments to Solidity function
    at Object.InvalidNumberOfSolidityArgs (inpage.js:8198)
    at c.validateArgs (inpage.js:8198)
    at c.toPayload (inpage.js:8198)
    at c.sendTransaction (inpage.js:8198)
    at RaidenMicropaymentsClient.openChannel (rmp.js:175)
    at HTMLButtonElement.$.click (main.js:83)
    at HTMLButtonElement.dispatch (jquery-3.2.1.js:5206)
    at HTMLButtonElement.elemData.handle (jquery-3.2.1.js:5014)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.