The Status module that consumes go-ethereum https://status.im
Go to file
Pascal Precht 0ccdec2985 feat(CommunitiesManager): introduce `CreateHistoryArchiveTorrentFromMessages` API
Prior to this commit we had a `CreateHistoryArchiveTorrent()` API which
takes a `startDate`, an `endDate` and a `partition` to create a bunch of
message archives, given a certain time range.

The function expects the messages to live in the database, which means,
all messages that need to be archived have to be saved there at some
point.

This turns out to be an issue when importing communities from third
party services, where, sometimes, there are several thousands of messages
including attachment payloads, that have to be save to the database
first.

There are only two options to get the messages into the database:

1. Make one write operation with all messages - this slow, takes a long
   time and blocks the database until done
2. Create message chunks and perform multiple write operations - this is
   also slow, takes long but makes the database a bit more responsive as
   it's many smaller operations instead of one big one

Option 2) turned out to not be super feasible either as sometimes,
inserting even a single such message can take up to 10 seconds
(depending on payload)

Which brings me to the third option.

**A third option** is to not store those imported messages as waku
message into the database, just to later query them again to create the
archives, but instead create the archives right away from all the
messages that have been loaded into memory.

This is significantly faster and doesn't block the database.

To make this possible, this commit introduces
a `CreateHistoryArchiveTorrentFromMessages()` API, and
a `CreateHistoryArchiveTorrentFromDB()` API which can be used for
different use cases.
2022-10-24 13:28:55 +02:00
.dependabot Patch/dependabot protocol (#1980) 2020-05-19 00:14:02 +01:00
.github fix documentation url in the checklist (#2770) 2022-07-22 22:12:29 +05:30
.vscode Add go.formatFlags to VS Code settings 2020-01-16 13:18:36 +01:00
_assets ci: drop unnecessary go get command 2022-10-24 11:26:38 +02:00
_docs rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
_examples go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
abi-spec replace web3-utils methods usage by status-go (#2840) 2022-10-18 21:36:54 +08:00
account added function which creates an account from the provided mnemonic 2022-08-24 18:01:44 +02:00
api feat: make kdf iterations configurable when creating a multiaccount (#2796) 2022-09-27 16:27:20 -04:00
appdatabase Send all encryption keys 2022-10-20 12:19:44 +01:00
appmetrics feat: make kdf iterations configurable when creating a multiaccount (#2796) 2022-09-27 16:27:20 -04:00
build/bin add .gitkeep to build/bin so it always exists 2019-03-05 14:22:00 +01:00
cmd support creating an arbitrary number of communities (#2901) 2022-10-20 16:56:29 +08:00
common Move services to status-node 2021-07-20 10:57:38 +02:00
config chore: add status.prod fleet (#2583) 2022-03-11 15:48:51 -05:00
connection Address linter issues 2022-03-28 13:14:12 +01:00
contracts feat: add reverse lookup for ens (#2912) 2022-10-24 12:07:44 +02:00
db Address linter issues 2022-03-28 13:14:12 +01:00
discovery feat: obtain external address for rendezvous (#2333) 2021-09-06 09:46:35 -04:00
eth-node feat(common): add `ThirdPartyID` to `Message` and `protobuf.WakuMessage` 2022-09-29 11:15:47 +02:00
exportlogs Upgrade geth to 1.9.5 and Whisper (#1617) 2019-10-04 17:21:24 +02:00
extkeys Upgrade geth 2021-07-20 10:57:38 +02:00
images fix(images): ensure decode from URL emits error on HTTP error code 2022-09-19 12:55:17 +02:00
ipfs fix: add mode build param and change ipfs gateway accordingly 2022-08-26 18:57:55 +02:00
logutils Removed unnecessary dependency from logutil package 2021-08-19 11:35:40 +02:00
mailserver Send all encryption keys 2022-10-20 12:19:44 +01:00
metrics metrics: fix p2p_peers_count metrics labels 2021-08-24 11:07:39 +02:00
mobile replace web3-utils methods usage by status-go (#2840) 2022-10-18 21:36:54 +08:00
multiaccounts Send all encryption keys 2022-10-20 12:19:44 +01:00
node feat: make kdf iterations configurable when creating a multiaccount (#2796) 2022-09-27 16:27:20 -04:00
nodecfg fix: allow to update network in app (#2852) 2022-09-13 10:40:29 +02:00
notifier Notifier package to interact with gorush notifications (#910) 2018-05-08 16:30:03 +02:00
params feat(token): enable changing token address from the node config (#2848) 2022-09-13 11:30:52 +02:00
peers feat: Rpc client manage multiple eth client (#2359) 2021-09-22 13:49:20 -04:00
postgres Anon Metrics Broadcast (#2198) 2021-09-01 13:02:18 +01:00
profiling Add profiling with pprof (#754) 2018-03-23 14:58:40 +01:00
protocol feat(CommunitiesManager): introduce `CreateHistoryArchiveTorrentFromMessages` API 2022-10-24 13:28:55 +02:00
rpc feat: make kdf iterations configurable when creating a multiaccount (#2796) 2022-09-27 16:27:20 -04:00
rtt rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
server Added string identifier for Connection String 2022-10-05 12:58:32 +01:00
services feat: add reverse lookup for ens (#2912) 2022-10-24 12:07:44 +02:00
signal Use image server for all kind of images and integrate identity rings 2022-09-16 09:52:08 +01:00
sqlite feat: make kdf iterations configurable when creating a multiaccount (#2796) 2022-09-27 16:27:20 -04:00
static Send all encryption keys 2022-10-20 12:19:44 +01:00
t Send all encryption keys 2022-10-20 12:19:44 +01:00
telemetry feat: Push messages to telemetry server when receiving messages 2021-11-10 09:34:14 +01:00
timesource Move services to status-node 2021-07-20 10:57:38 +02:00
transactions fix: lint (#2845) 2022-09-27 18:59:02 -04:00
vendor fix: waku2 store queries 2022-10-05 18:43:10 -04:00
waku rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
wakuv2 fix: content topic in wakuv2 2022-10-10 10:38:42 -05:00
.codeclimate.yml feat: delete for me (#2866) 2022-09-28 19:42:17 +08:00
.dockerignore Ignore *.test files from all folders (#635) 2018-02-08 14:23:08 +02:00
.gitignore feat: add visual identity service (#2550) 2022-03-11 16:17:48 -05:00
.golangci.yml Remove protocol and eth-node submodules (#1835) 2020-02-10 12:22:37 +01:00
.travis.yml Remove e2e tests from steps 2021-07-20 10:57:38 +02:00
BOOTNODE.md docs: clarify purpose and describe ports 2020-02-06 18:44:23 +01:00
CMakeLists.txt dev: allow option to force compiling for apple silicon 2022-06-30 09:42:19 +02:00
CONTRIBUTING.md rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
LICENSE.md Create LICENSE.md 2016-09-21 10:00:29 +08:00
MAILSERVER.md rcp.sh: curl wrapper for easier RPC calls 2021-08-24 11:23:25 +02:00
Makefile Makefile: fix IPFS gateway variable name 2022-08-26 20:03:31 +02:00
README.md Explain how to run Waku node in README (#1921) 2020-04-09 18:33:53 +02:00
RELEASING.md rename status-react to status-mobile 2022-07-17 15:37:14 +02:00
VERSION Send all encryption keys 2022-10-20 12:19:44 +01:00
WAKU.md Create WAKU.md with spec support (#1855) 2020-02-21 17:56:15 +08:00
go.mod go.mod: ran make tidy 2022-10-24 11:25:08 +02:00
go.sum fix: waku2 store queries 2022-10-05 18:43:10 -04:00