TryQuiet / waggle

1 stars 1 forks source link

Update orbit-db to 0.28.0 #134

Closed EmiM closed 2 years ago

EmiM commented 2 years ago

Note: https://github.com/ZbayApp/waggle/pull/120 this may be helpful

EmiM commented 2 years ago

https://github.com/ZbayApp/waggle/pull/152

EmiM commented 2 years ago

The issues that I encountered:

EmiM commented 2 years ago

^ The above issues have been resolved:

EmiM commented 2 years ago

I noticed a change in replication behavior. This is what I see during test (1000 entries in log db):

EmiM commented 2 years ago

Asked Orbit-db folks: https://gitter.im/orbitdb/Lobby?at=61a4d643cdb5c1081a3926d3

EmiM commented 2 years ago

haad @haad:matrix.org [m] 16:07 hey, thanks for the pings. regarding the replicated event: indeed, this is now sent only when the db has been (fully) replicated. in fact, the previous behaviour wasn't intended (replicated events "chunked"). however, if I understand the need described above, you want to be able to "know when some progress of replication has been made" and the replicate.progress event will give you that (see https://github.com/orbitdb/orbit-db-store/blob/main/src/Store.js#L100 for the callback signature and params). it's emitted for each replicated db log entry. with that, you can eg. show a nice progress bar, or hook to it to show the replicated data to the user. note though that when replicate.progress is fired, the DB index hasn't been updated yet with the replicated data.