-
Notifications
You must be signed in to change notification settings - Fork 57
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: negentropy c integ #2448
feat: negentropy c integ #2448
Conversation
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.
Looks good. Can't wait to try in action!
waku/waku_sync/raw_bindings.nim
Outdated
|
||
proc new*(T: type Negentropy, storage: Storage, frameSizeLimit: uint64): T = | ||
let negentropy = constructNegentropy(storage, culong(frameSizeLimit)) | ||
proc new_negentropy*(storage: pointer, frameSizeLimit: uint64): pointer = |
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 thinking we'll need objects wrapping storage and negentropy. pointer
s are not super ergonomic.
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.
LGTM! Thanks! 💯
Just added some comments that I hope you find useful
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
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.
Very nice thank you!
# This is the 1st commit message: feat: Waku Sync Protocol periodic sync & peer manager Fixes ingess messages Bindings first draft Wrapping String to/from bytes Vector added missing binds & wraps added header files feat: negentropy c integ (#2448) * chore: move negentropy to a submodule * chore: add negentropy folder in vendor dir * moved submodule to c-wrapper branch * chore: updated negentropy * chore: udpate submodule URL to use https * chore: started integrating negetropy C wrapper * chore: fixed all compilation errors wrt C-wrapper integration * chore: include sync peers to be returned as part of REST API * chore: tested insert into storage and changes done for it. * chore: experimenting with callback * chore: first test for sync * chore: revert callback changes * chore: revert temp changes * chore: write tests to verify c integration * draft: in progress changes to integrate callback based method from C * chore: in progress callback integration * chore: first working sync example with c bindings * feat: added few tests for sync protocol * chore: copy negentropy so for build to work * chore: add negentropy as dependency for test targets * chore: try to fix CI compilation issue of negentropy * chore: apply suggestions from code review Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> * chore: fix naming convention changes --------- Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> # This is the commit message #2: update ref # This is the commit message #3: update submodule # This is the commit message #4: chore: consider leak fix in negentropy
periodic sync & peer manager Fixes ingess messages Bindings first draft Wrapping String to/from bytes Vector added missing binds & wraps added header files feat: negentropy c integ (#2448) * chore: move negentropy to a submodule * chore: add negentropy folder in vendor dir * moved submodule to c-wrapper branch * chore: updated negentropy * chore: udpate submodule URL to use https * chore: started integrating negetropy C wrapper * chore: fixed all compilation errors wrt C-wrapper integration * chore: include sync peers to be returned as part of REST API * chore: tested insert into storage and changes done for it. * chore: experimenting with callback * chore: first test for sync * chore: revert callback changes * chore: revert temp changes * chore: write tests to verify c integration * draft: in progress changes to integrate callback based method from C * chore: in progress callback integration * chore: first working sync example with c bindings * feat: added few tests for sync protocol * chore: copy negentropy so for build to work * chore: add negentropy as dependency for test targets * chore: try to fix CI compilation issue of negentropy * chore: apply suggestions from code review Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> * chore: fix naming convention changes --------- Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> update ref update submodule chore: consider leak fix in negentropy wrapping pointers wrapping pointers clean-up, renaming, wrapping
Description
Changes
Usage of LMDB storage and optimizations would be taken up in a separate PR.
More tests and cleanup and error handling to be taken up as a separate PR.