-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Extract persistence of BSQ blocks out of DaoStateStore [5] #5790
Extract persistence of BSQ blocks out of DaoStateStore [5] #5790
Conversation
70cbf55
to
401054f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK Upps was on the wrong tab...
401054f
to
2b4309c
Compare
792730c
to
e941c28
Compare
/* if (DevEnv.isDevMode()) { | ||
try { | ||
// To see from where we got called | ||
throw new RuntimeException("Dummy Exception for print stacktrace at maybeReleaseMemory"); | ||
} catch (Throwable t) { | ||
t.printStackTrace(); | ||
} | ||
} | ||
}*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If commented out, better to remove it completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left it as its still helpful for memory/performance profiling to see from where we call it too often...
But Ok to me to remove it as well...
/* if (!storageDir.exists()) { | ||
storageDir.mkdir(); | ||
}*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it can be safely removed as it is checked during the write procedure anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got enabeld in a later commit again as it was required at some cases (resync from resources i guess, or regtest fresh start)
core/src/main/java/bisq/core/dao/state/storage/DaoStateStorageService.java
Outdated
Show resolved
Hide resolved
I will wait until #5782 before merging/rebasing it... |
core/src/main/java/bisq/core/dao/state/DaoStateSnapshotService.java
Outdated
Show resolved
Hide resolved
I think we should move the block snapshots to Git LFS. If I'm not mistaken adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK - besides the Git LFS config changes. As soon as it is in and rebased to master after merging #5782 I'll run it again against Mainnet before merging.
There are also two minor Codacy complaints regarding an import statement: https://github.com/bisq-network/bisq/pull/5790/checks?check_run_id=4111754368 |
Was only used from one use case which can be done differently.
Improve getBlockStartDateByCycleIndex method
For the snapshot we create a deep clone by protobuf serialisation. We do not need the deserialisation back to the java object as it is only kept in memory for later persistence where we need to do protobuf serialisation again. So we can skip that cycle and safe a bit of time at creating and persisting snapshots.
Improve logging Add BsqBlockStore to protobuf Remove DaoStateMonitoringService field Do not persist the blocks in daoState anymore. This improves persistence performance and reduces memory requirements for snapshots.
Blocks are always sorted by block height
Add BsqBlocks resources
198e16e
to
1108e98
Compare
Rebases on maser. |
@ripcurlx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
b817c4f
to
87f4444
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Based on #5782
(will merge/rebase once other PRs are in master)
Starts at ff702ae
Fixes #5783
EDIT: Merged and rebased with #5782