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: negentropy c integ #2448

Merged
merged 23 commits into from
Mar 6, 2024
Merged

feat: negentropy c integ #2448

merged 23 commits into from
Mar 6, 2024

Conversation

chaitanyaprem
Copy link
Contributor

@chaitanyaprem chaitanyaprem commented Feb 19, 2024

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.

@chaitanyaprem chaitanyaprem marked this pull request as draft February 19, 2024 05:32
Copy link
Contributor

@SionoiS SionoiS left a 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 Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved

proc new*(T: type Negentropy, storage: Storage, frameSizeLimit: uint64): T =
let negentropy = constructNegentropy(storage, culong(frameSizeLimit))
proc new_negentropy*(storage: pointer, frameSizeLimit: uint64): pointer =
Copy link
Contributor

@SionoiS SionoiS Feb 21, 2024

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. pointers are not super ergonomic.

@chaitanyaprem chaitanyaprem marked this pull request as ready for review March 6, 2024 14:12
@chaitanyaprem chaitanyaprem requested a review from SionoiS March 6, 2024 14:14
Copy link
Collaborator

@Ivansete-status Ivansete-status left a 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

apps/wakunode2/app.nim Show resolved Hide resolved
tests/waku_sync/test_protocol.nim Show resolved Hide resolved
waku/waku_sync/raw_bindings.nim Outdated Show resolved Hide resolved
waku/waku_sync/raw_bindings.nim Outdated Show resolved Hide resolved
waku/waku_sync/raw_bindings.nim Outdated Show resolved Hide resolved
waku/waku_sync/raw_bindings.nim Outdated Show resolved Hide resolved
waku/waku_sync/raw_bindings.nim Outdated Show resolved Hide resolved
waku/waku_sync/raw_bindings.nim Outdated Show resolved Hide resolved
tests/waku_sync/test_protocol.nim Outdated Show resolved Hide resolved
tests/waku_sync/test_protocol.nim Outdated Show resolved Hide resolved
chaitanyaprem and others added 2 commits March 6, 2024 20:36
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
Copy link
Contributor

@SionoiS SionoiS left a 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!

@SionoiS SionoiS merged commit 6318a79 into feat--nwaku-sync Mar 6, 2024
9 of 10 checks passed
@SionoiS SionoiS deleted the feat/negentropy-c-integ branch March 6, 2024 16:20
SionoiS added a commit that referenced this pull request Mar 7, 2024
# 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
SionoiS added a commit that referenced this pull request Mar 7, 2024
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
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.

4 participants