Skip to content

Conversation

@kaichaosun
Copy link
Contributor

Rate limite states need to be persisted when updated, so the state is available after app restart.
A general kv store is best for this use case. Since status-go don't have KV storage yet and sqlite can be used for this purpose.

Important changes:

  • add kvstore to handle operations like get, set, delete.
  • add helper to migrate the deprecated keys in uniform
  • bump go-waku and handle the rate limit state changes
  • add config to enable the RLN rate limit feature.
  • Desktop UI change to enable the config

Closes #6401

@status-im-auto
Copy link
Member

status-im-auto commented Mar 27, 2025

Jenkins Builds

Click to see older builds (58)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 887a817 #1 2025-03-27 04:54:21 ~3 min android 📦aar
✔️ 887a817 #1 2025-03-27 04:54:22 ~3 min ios 📦zip
✖️ 887a817 #1 2025-03-27 04:56:07 ~4 min tests 📄log
✔️ 887a817 #1 2025-03-27 04:56:17 ~4 min macos 📦zip
✔️ 887a817 #1 2025-03-27 04:56:29 ~5 min linux 📦zip
✔️ 887a817 #1 2025-03-27 04:56:51 ~5 min macos 📦zip
✔️ 887a817 #1 2025-03-27 04:57:22 ~6 min windows 📦zip
✔️ 887a817 #1 2025-03-27 05:22:12 ~30 min tests-rpc 📄log
✔️ dee7ceb #2 2025-03-27 06:12:59 ~2 min android 📦aar
✔️ dee7ceb #2 2025-03-27 06:13:18 ~3 min ios 📦zip
✔️ dee7ceb #2 2025-03-27 06:14:44 ~4 min windows 📦zip
✔️ dee7ceb #2 2025-03-27 06:15:09 ~4 min macos 📦zip
✔️ dee7ceb #2 2025-03-27 06:15:23 ~5 min linux 📦zip
✔️ dee7ceb #2 2025-03-27 06:15:44 ~5 min macos 📦zip
✖️ dee7ceb #2 2025-03-27 06:20:25 ~10 min tests 📄log
✔️ dee7ceb #2 2025-03-27 06:42:20 ~32 min tests-rpc 📄log
✖️ dee7ceb #3 2025-03-27 06:57:47 ~9 min tests 📄log
✔️ f8e3313 #3 2025-03-27 09:00:37 ~2 min android 📦aar
✔️ f8e3313 #3 2025-03-27 09:00:53 ~3 min ios 📦zip
✔️ f8e3313 #3 2025-03-27 09:02:16 ~4 min windows 📦zip
✔️ f8e3313 #3 2025-03-27 09:02:59 ~5 min macos 📦zip
✔️ f8e3313 #3 2025-03-27 09:03:18 ~5 min macos 📦zip
✔️ f8e3313 #3 2025-03-27 09:03:31 ~5 min linux 📦zip
✖️ f8e3313 #4 2025-03-27 09:07:44 ~9 min tests 📄log
✔️ f8e3313 #3 2025-03-27 09:32:51 ~35 min tests-rpc 📄log
✔️ dcc41a6 #4 2025-03-27 10:30:33 ~2 min android 📦aar
✔️ dcc41a6 #4 2025-03-27 10:30:55 ~3 min ios 📦zip
✔️ dcc41a6 #4 2025-03-27 10:31:55 ~4 min windows 📦zip
✔️ dcc41a6 #4 2025-03-27 10:32:41 ~4 min macos 📦zip
✔️ dcc41a6 #4 2025-03-27 10:33:17 ~5 min macos 📦zip
✔️ dcc41a6 #4 2025-03-27 10:33:27 ~5 min linux 📦zip
✖️ dcc41a6 #5 2025-03-27 10:37:28 ~9 min tests 📄log
✔️ dcc41a6 #4 2025-03-27 10:58:52 ~31 min tests-rpc 📄log
✔️ 088abab #5 2025-03-27 10:51:15 ~2 min android 📦aar
✔️ 088abab #5 2025-03-27 10:51:28 ~3 min ios 📦zip
✔️ 088abab #5 2025-03-27 10:52:35 ~4 min windows 📦zip
✔️ 088abab #5 2025-03-27 10:53:21 ~5 min macos 📦zip
✔️ 088abab #5 2025-03-27 10:54:04 ~5 min linux 📦zip
✔️ 088abab #5 2025-03-27 10:54:05 ~5 min macos 📦zip
✖️ 088abab #6 2025-03-27 11:26:00 ~37 min tests 📄log
✔️ 088abab #5 2025-03-27 11:31:19 ~32 min tests-rpc 📄log
✖️ 088abab #7 2025-03-28 02:35:00 ~35 min tests 📄log
✔️ 951fbf3 #6 2025-03-28 02:53:43 ~2 min android 📦aar
✔️ 951fbf3 #6 2025-03-28 02:54:02 ~3 min ios 📦zip
✔️ 951fbf3 #6 2025-03-28 02:55:08 ~4 min windows 📦zip
✔️ 951fbf3 #6 2025-03-28 02:55:51 ~5 min macos 📦zip
✔️ 951fbf3 #6 2025-03-28 02:56:32 ~5 min macos 📦zip
✔️ 951fbf3 #7 2025-03-28 03:17:06 ~5 min linux 📦zip
✔️ 951fbf3 #6 2025-03-28 03:21:31 ~30 min tests-rpc 📄log
✖️ 951fbf3 #8 2025-03-28 03:27:00 ~36 min tests 📄log
✔️ 6ecf75e #7 2025-03-28 03:16:51 ~3 min ios 📦zip
✔️ 6ecf75e #7 2025-03-28 03:17:45 ~4 min android 📦aar
✔️ 6ecf75e #7 2025-03-28 03:17:58 ~4 min windows 📦zip
✔️ 6ecf75e #7 2025-03-28 03:18:22 ~5 min macos 📦zip
✔️ 6ecf75e #7 2025-03-28 03:19:09 ~5 min macos 📦zip
✔️ 6ecf75e #8 2025-03-28 03:22:20 ~5 min linux 📦zip
✔️ 6ecf75e #7 2025-03-28 03:44:01 ~22 min tests-rpc 📄log
✖️ 6ecf75e #9 2025-03-28 04:03:10 ~36 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ ee7ed98 #8 2025-03-28 04:28:32 ~3 min ios 📦zip
✔️ ee7ed98 #8 2025-03-28 04:28:57 ~3 min android 📦aar
✔️ ee7ed98 #8 2025-03-28 04:30:01 ~4 min windows 📦zip
✔️ ee7ed98 #8 2025-03-28 04:30:24 ~4 min macos 📦zip
✔️ ee7ed98 #8 2025-03-28 04:31:11 ~5 min macos 📦zip
✔️ ee7ed98 #9 2025-03-28 04:32:09 ~6 min linux 📦zip
✔️ ee7ed98 #8 2025-03-28 04:34:17 ~8 min tests-rpc 📄log
✖️ ee7ed98 #10 2025-03-28 05:01:52 ~36 min tests 📄log
✔️ a07aaec #9 2025-03-28 06:08:07 ~2 min android 📦aar
✔️ a07aaec #9 2025-03-28 06:08:28 ~3 min ios 📦zip
✔️ a07aaec #9 2025-03-28 06:09:38 ~4 min windows 📦zip
✔️ a07aaec #9 2025-03-28 06:10:20 ~5 min macos 📦zip
✔️ a07aaec #10 2025-03-28 06:10:34 ~5 min linux 📦zip
✔️ a07aaec #9 2025-03-28 06:11:04 ~5 min macos 📦zip
✔️ a07aaec #9 2025-03-28 06:13:28 ~8 min tests-rpc 📄log
✔️ a07aaec #11 2025-03-28 06:42:41 ~37 min tests 📄log
✔️ a07aaec #1 2025-03-28 09:39:29 ~5 min linux 📦zip
✔️ a07aaec #10 2025-04-09 13:56:26 ~3 min android 📦aar
✔️ a07aaec #10 2025-04-09 13:56:41 ~3 min ios 📦zip
✔️ a07aaec #10 2025-04-09 13:58:29 ~4 min macos 📦zip
✔️ a07aaec #10 2025-04-09 13:59:11 ~5 min macos 📦zip
✔️ a07aaec #11 2025-04-09 13:59:19 ~5 min linux 📦zip
✔️ a07aaec #10 2025-04-09 13:59:32 ~5 min windows 📦zip
✔️ a07aaec #10 2025-04-09 14:02:06 ~8 min tests-rpc 📄log
✔️ a07aaec #12 2025-04-09 14:31:12 ~37 min tests 📄log
✔️ a07aaec #11 2025-04-09 15:22:46 ~2 min android 📦aar
✔️ a07aaec #11 2025-04-09 15:23:09 ~3 min ios 📦zip
✔️ a07aaec #11 2025-04-09 15:24:14 ~4 min windows 📦zip
✖️ a07aaec #13 2025-04-09 15:24:22 ~4 min tests 📄log
✔️ a07aaec #11 2025-04-09 15:24:59 ~5 min macos 📦zip
✔️ a07aaec #12 2025-04-09 15:25:25 ~5 min linux 📦zip
✔️ a07aaec #11 2025-04-09 15:25:38 ~5 min macos 📦zip
✔️ a07aaec #11 2025-04-09 15:25:58 ~5 min tests-rpc 📄log

@kaichaosun kaichaosun force-pushed the feat/rln-store branch 4 times, most recently from 951fbf3 to 6ecf75e Compare March 28, 2025 03:13
@codecov
Copy link

codecov bot commented Mar 28, 2025

Codecov Report

Attention: Patch coverage is 48.71795% with 40 lines in your changes missing coverage. Please review.

Project coverage is 60.74%. Comparing base (4dfa4e6) to head (a07aaec).
Report is 98 commits behind head on develop.

Files with missing lines Patch % Lines
wakuv2/gowaku.go 11.11% 30 Missing and 2 partials ⚠️
kvstore/database.go 84.21% 4 Missing and 2 partials ⚠️
appdatabase/database.go 50.00% 1 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (48.71%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6475      +/-   ##
===========================================
+ Coverage    60.65%   60.74%   +0.09%     
===========================================
  Files          848      849       +1     
  Lines       105858   105935      +77     
===========================================
+ Hits         64211    64355     +144     
+ Misses       34006    33977      -29     
+ Partials      7641     7603      -38     
Flag Coverage Δ
functional 24.89% <24.35%> (+0.14%) ⬆️
unit 58.74% <48.71%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
appdatabase/database.go 70.35% <50.00%> (-0.30%) ⬇️
kvstore/database.go 84.21% <84.21%> (ø)
wakuv2/gowaku.go 65.05% <11.11%> (-1.59%) ⬇️

... and 35 files with indirect coverage changes

@igor-sirotin igor-sirotin changed the base branch from develop to feat/kv-store April 9, 2025 13:53
@igor-sirotin igor-sirotin changed the base branch from feat/kv-store to develop April 9, 2025 15:19
@kaichaosun
Copy link
Contributor Author

Close it for logos-messaging/pm#277 (comment).

@kaichaosun kaichaosun closed this Jun 9, 2025
@kaichaosun kaichaosun deleted the feat/rln-store branch November 6, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Persist rate limit quota

2 participants