raiden-network / raiden-monitoring-service Goto Github PK
View Code? Open in Web Editor NEWRaiden monitoring service
Raiden monitoring service
Hi guys, I'm researching Lightning Network watchtowers (WTs) and Raiden monitoring services (MSs), and writing a series of articles, explaining why they are essential for scaling, how they work, different types of WTs and MSs, their approximate operating and capital costs, scaling challenges, proposed solutions and their trade-offs, viable business models, etc.
If you can answer a few questions, that will be very helpful and I can link this issue in the article, so interested developers can read your answers, join the discussion and potentially contribute to a project.
Additional:
This is how LN watchtowers work in a few words.
Can you describe how Raiden monitoring services will work in a similar simple way? Or outline the main differences?
Thanks!
P.S. I rarely check my github nowadays, so if you read this from the far future, please consider reaching out via twitter, linkedin, or medium, if you'll have any questions or info to share.
Currently the MS includes a REST API. I don't see a point in that currently and would argue that we should remove it and all related code and tests.
Which metadata should envelope contain?
some ideas:
As Josh I want the MS to be able to
find out that a monitored channel was closed
So that it can
update the channel state in the smart contract
ChannelClosed
events on the blockchain for monitored channelsIf Matrix server goes down, client should reconnect and MS must still react on blockchain events.
After merge of raiden-network/spec#54 SC calls and messages will require an update.
Certificate check is disabled because BB hosted Matrix servers use self-signed certificate. In production, it should be enabled by default, and only command line option should override it.
Although submitted BPs can be obtained from the matrix channel, it'd be better to store them in a database
Reasons are:
We had problems with the current BlockchainListener because it queries events per event name. This means that events are served out-of-order when multiple events are queried, which can lead to hard to debug problems.
In the PFS we already switched to a new design which listenes to all events for token networks at the same time.
THis PR integrates this BlockchainListener into the MS codebase.
Part of #38
The database table has a primary key on channel_id (see https://github.com/raiden-network/raiden-monitoring-service/blob/master/monitoring_service/state_db/queries.py#L18) and uses INSERT OR REPLACE
to update the monitor request in the db. This means that only the latest MR for a channel survives. The desired behaviour is to keep one MR per (channel_id, signer) pair.
As suggested in https://github.com/raiden-network/raiden-monitoring-service/issues/37#issuecomment-452704814, splitting the MS into two processes makes DOS attacks on the MS harder. I also expect it to lead to clearer code and better separation of concerns.
The following parts should be moved out of the main MS into a Request Collector:
Then the MS has to only interface with the blockchain and the database.
SPEC should slowly iterate towards more technical document, including details on i.e. message format and interfaces used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.