Skip to content

Conversation

@MarcoPolo
Copy link
Contributor

This lets us distinguish who can support a partial message request versus who requests partial message on a per topic basis.

See this spec commit for details: libp2p/specs@b90b21b

@MarcoPolo MarcoPolo requested a review from sukunrt October 23, 2025 21:42
This lets us distinguish who can support a partial message request
versus who requests partial message on a per topic basis.
Creates a mixed network where only one peer request partial, and the
rest either support or don't
@MarcoPolo MarcoPolo force-pushed the marco/partial-messages-2 branch from 34e9bba to d0f9caf Compare October 24, 2025 22:06
Comment on lines +1583 to +1584
func SupportsPartialMessages() TopicOpt {
return func(t *Topic) error {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add some documentation for this?

Comment on lines +17 to +19
// messages on this topic. If requestsPartial is true, this is assumed to be
// true.
optional bool supportsPartial = 4;
Copy link
Member

Choose a reason for hiding this comment

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

NIT:

Suggested change
// messages on this topic. If requestsPartial is true, this is assumed to be
// true.
optional bool supportsPartial = 4;
// messages on this topic. If requestsPartial is true, this is assumed to be
// true.
optional bool supportsSendingPartial = 4;

I think more explicit is more readable. requestsPartial has a receive connotation to it.

tmap[rpc.from] = peerTopicState{requestsPartial: subopt.GetPartial()}
pts := peerTopicState{
requestsPartial: subopt.GetRequestsPartial(),
// If they peer requested partial, they support it by default
Copy link
Member

@sukunrt sukunrt Oct 31, 2025

Choose a reason for hiding this comment

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

NIT:

Suggested change
// If they peer requested partial, they support it by default
// If the peer requested partial, they support it by default

Comment on lines +1398 to +1399
return ok && gs.extensions.myExtensions.PartialMessages && peerStates[p].requestsPartial
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return ok && gs.extensions.myExtensions.PartialMessages && peerStates[p].requestsPartial
}
return ok && gs.extensions.myExtensions.PartialMessages && peerStates[p].supportsPartial
}

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.

3 participants