-
Notifications
You must be signed in to change notification settings - Fork 29
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
Database #2110
Database #2110
Conversation
You modified |
da442ed
to
113f648
Compare
6f384b2
to
8899408
Compare
66aea7f
to
6d96db4
Compare
6a6502d
to
a524699
Compare
Codecov Report
@@ Coverage Diff @@
## master #2110 +/- ##
==========================================
+ Coverage 87.69% 94.68% +6.98%
==========================================
Files 159 154 -5
Lines 5999 6093 +94
Branches 1137 1064 -73
==========================================
+ Hits 5261 5769 +508
+ Misses 676 261 -415
- Partials 62 63 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
0d5ef5d
to
d5c62d4
Compare
98684a7
to
289c595
Compare
c361935
to
4647e0e
Compare
This is too big to get reviewed. I'll merge as is, and we can test and narrow down any issues on our development branch ( |
4647e0e
to
fa87efe
Compare
Fixes #2044
Fixes #1933
Fixes #1831
Fixes #2025
Fixes #2056
Fixes #2077
Fixes #2085
Fixes #1618
Fixes #1615
Short description
Use PouchDB (backed by default by IndexedDB on browsers, LevelDown on NodeJS) as a persistent storage to store state.
Only pending transfers are kept in Redux (in memory) state, and synced to the database as soon as they change, by a persister middleware. This gives us the speed of in-memory access, the backends/adapters/sync power of Pouch, and memory-safety of not keeping everything in memory all the time and instead accessing historic data only if needed.
RaidenState/Channels is kept in memory (Redux) and just synced asynchronously to the
db
(per individual top level keys, and individual channels).Transfers state, as they can grow boundless (#1618), is kept on database and retrieved on demand if needed using secondary indexes. This allows us to keep sub-0.2s transfers (cli-to-cli, nodejs, webrtc) while saving everything at real time to avoid losing state.
Legacy (once) and new async migration schemas are also implemented.
Definition of Done
Steps to manually test the change (dApp)