fix: rest fix for sync protocol#3503
Merged
darshankabariya merged 3 commits intomasterfrom Aug 6, 2025
Merged
Conversation
|
You can find the image built from this PR at Built from 81c8d50 |
Ivansete-status
approved these changes
Aug 6, 2025
Collaborator
Ivansete-status
left a comment
There was a problem hiding this comment.
LGTM! Thanks for it! 💯
Just adding a tiny nitpick comment
waku/factory/node_factory.nim
Outdated
Comment on lines
+243
to
+249
| if conf.remoteStoreNode.isSome(): | ||
| let storeNode = parsePeerInfo(conf.remoteStoreNode.get()) | ||
| if storeNode.isOk(): | ||
| node.peerManager.addServicePeer(storeNode.value, WakuReconciliationCodec) | ||
| node.peerManager.addServicePeer(storeNode.value, WakuTransferCodec) | ||
| else: | ||
| return err("failed to set node waku store-sync peer: " & storeNode.error) |
Collaborator
There was a problem hiding this comment.
Just a simple simplification with valueOr technique:
Suggested change
| if conf.remoteStoreNode.isSome(): | |
| let storeNode = parsePeerInfo(conf.remoteStoreNode.get()) | |
| if storeNode.isOk(): | |
| node.peerManager.addServicePeer(storeNode.value, WakuReconciliationCodec) | |
| node.peerManager.addServicePeer(storeNode.value, WakuTransferCodec) | |
| else: | |
| return err("failed to set node waku store-sync peer: " & storeNode.error) | |
| if conf.remoteStoreNode.isSome(): | |
| let storeNode = parsePeerInfo(conf.remoteStoreNode.get()).valueOr: | |
| return err("failed to set node waku store-sync peer: " & error) | |
| node.peerManager.addServicePeer(storeNode, WakuReconciliationCodec) | |
| node.peerManager.addServicePeer(storeNode, WakuTransferCodec) |
d4988b8 to
739332d
Compare
Ivansete-status
pushed a commit
that referenced
this pull request
Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now the rest will see sync-related protocol also while facing details.
Close #3492
@SionoiS
Test Instructions
Note :-
Node 1 - configuration
nodekey = "6dcae22a737a01541b2852ebe5c5157f936042e79a7fcec87d5b1559701c0e7f"
staticnode = ["/ip4/127.0.0.1/tcp/64002/p2p/16Uiu2HAm1LDVFukcPVVFFcsxofX8HNnWZjELYb2UHFek1vf2z2GQ"]
tcp-port = 64000
max-connections = 20
log-level = "TRACE"
rest = true
rest-port = 46420
rest-admin = true
relay = true
filter = true
lightpush = true
rln-relay = false
store = true
store-sync = true
rln-relay-dynamic = false
rln-relay-user-message-limit = 100
Node 2 - configuration
nodekey = "554f13e4b8cdf48edd526249f92ee653df43939a713ce95b51b74b48283d0df6i"
staticnode = ["/ip4/127.0.0.1/tcp/64000/p2p/16Uiu2HAkzqu7KFZwt9zaNYXfAkyu4AkupthsjudW45NLPuQmqL8r"]
tcp-port = 64002
log-level = "TRACE"
max-connections = 20
rest = true
rest-port = 46422
rest-admin = true
metrics-server = true
relay = true
store-sync = false
filter = false
filternode = "/ip4/127.0.0.1/tcp/64000/p2p/16Uiu2HAkzqu7KFZwt9zaNYXfAkyu4AkupthsjudW45NLPuQmqL8r"