Skip to content
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

feat(rln-relay): close db connection appropriately #1858

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Conversation

rymnc
Copy link
Contributor

@rymnc rymnc commented Jul 24, 2023

Closes the connection to the pmtree database gracefully

Description

Changes

  • Bumps zerokit to latest head
  • Adds ffi api to flush
  • Flushes to db when waku_node.stop() is called
  • Also fixes a bug while chunking, when an interrupt is received during chunking, the tree state is not preserved and hence cannot be loaded on the next run

@rymnc rymnc force-pushed the fix-unwrap-bug branch 2 times, most recently from ee3a505 to f0a28e9 Compare July 25, 2023 10:26
@rymnc rymnc marked this pull request as ready for review July 25, 2023 11:46
@rymnc rymnc self-assigned this Jul 25, 2023
@rymnc rymnc force-pushed the fix-unwrap-bug branch 4 times, most recently from 547fa03 to 97969d2 Compare July 26, 2023 06:56
@@ -62,7 +62,8 @@ type
const DefaultKeyStorePath* = "rlnKeystore.json"
const DefaultKeyStorePassword* = "password"

const BlockChunkSize* = 100'u64
const DecayFactor* = 1.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this decay for block chunk size added by mistake to this PR? Does not seem to be really related to "close db connection" (or am I missing something?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately, while I was testing this fix, I discovered a bug related to the chunking of blocks, so I included it in this PR to ensure some stability - can remove if you'd like!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me, just wanted to make sure this was intentional:)

Copy link
Contributor

@jm-clius jm-clius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rymnc rymnc merged commit 76c73b6 into master Jul 27, 2023
17 checks passed
@rymnc rymnc deleted the fix-unwrap-bug branch July 27, 2023 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants