Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Ethereum Ledger Settlement Engine robustnessss #149

Closed
12 of 14 tasks
gakonst opened this issue Jul 19, 2019 · 2 comments · Fixed by #242
Closed
12 of 14 tasks

Improve Ethereum Ledger Settlement Engine robustnessss #149

gakonst opened this issue Jul 19, 2019 · 2 comments · Fixed by #242
Assignees

Comments

@gakonst
Copy link
Member

gakonst commented Jul 19, 2019

The engine implemented in #125 works but can be improved. In particular:

ERC20 Filter guide:

  1. Setup filter builder with from/to block https://tomusdrw.github.io/rust-web3/web3/types/struct.FilterBuilder.html
  2. Add the filter for transfer(address,uint256) where we filter for address == our_address
  3. For each hit, notify the connector
@ALLiDoizCode
Copy link

ALLiDoizCode commented Jul 27, 2019

Is there a mismatch in the rust implementations? In the es-examples branch, the settlement engine URL is passed as a property
{ "ilp_address": "example.node-a.mike", "asset_code": "ABC", "asset_scale": 9, "max_packet_amount": 1000, "http_incoming_token": "mike", "settlement_engine_url": "http://localhost:8080/rcl" }

But when I build and run this branch and create an account with the above SE URL followed with a post request to the /pay route my SE endpoint is never hit. Also, all of the endpoints mentioned in the spec are being exposed.

@gakonst
Copy link
Member Author

gakonst commented Aug 23, 2019

add test: on what happens if the SE dies after making some of the POST requests to the connector but before it saves the current block number? It should be expected to start again and will try to resubmit the same blocks, however it will not submit the same transaction twice, since the check_tx_credited assertion is sufficient to ensure that a transaction is not processed again. #125 (comment)

Don't think we can make the function call crash during execution.

document edge cases: e.g. If the SE goes down for many blocks and then restarts, this will result in a burst of simultaneous requests, which may fail if using Infura or other ETH providers if they're rate limited. #125 (comment)

This was encountered and fixed by Evan in 99604cf

optimize calls to connector in case multiple incoming transactions are found from the same account: #125 (comment)

Rather not implement this at the moment until we actually need it, premature optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants