The Status module that consumes go-ethereum
https://status.im
0ccdec2985
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. |
||
---|---|---|
.dependabot | ||
.github | ||
.vscode | ||
_assets | ||
_docs | ||
_examples | ||
abi-spec | ||
account | ||
api | ||
appdatabase | ||
appmetrics | ||
build/bin | ||
cmd | ||
common | ||
config | ||
connection | ||
contracts | ||
db | ||
discovery | ||
eth-node | ||
exportlogs | ||
extkeys | ||
images | ||
ipfs | ||
logutils | ||
mailserver | ||
metrics | ||
mobile | ||
multiaccounts | ||
node | ||
nodecfg | ||
notifier | ||
params | ||
peers | ||
postgres | ||
profiling | ||
protocol | ||
rpc | ||
rtt | ||
server | ||
services | ||
signal | ||
sqlite | ||
static | ||
t | ||
telemetry | ||
timesource | ||
transactions | ||
vendor | ||
waku | ||
wakuv2 | ||
.codeclimate.yml | ||
.dockerignore | ||
.gitignore | ||
.golangci.yml | ||
.travis.yml | ||
BOOTNODE.md | ||
CMakeLists.txt | ||
CONTRIBUTING.md | ||
LICENSE.md | ||
MAILSERVER.md | ||
Makefile | ||
README.md | ||
RELEASING.md | ||
VERSION | ||
WAKU.md | ||
go.mod | ||
go.sum |
README.md
Status bindings for go-ethereum
Docs
- How to Build
- How to Contribute
- How to Release
- How to run a Bootnode
- How to run a Mailserver
- How to run a Waku node
- How to configure status-go