Skip to content

Conversation

ackintosh
Copy link
Collaborator

@ackintosh ackintosh commented Apr 30, 2024

sigp#5422

Issue Addressed

Test test_ignore_too_many_messages_in_ihave is failing in this branch:

https://github.com/sigp/lighthouse/actions/runs/8796045770/job/24138172575

test behaviour::tests::test_ignore_too_many_messages_in_ihave ... FAILED

Here is the assertion that is failing:

assert_eq!(sum, 10, "exactly 20 iwants should get sent");

Proposed Changes

From my investigation, message-ids that are expected to send iwant are being filtered out here, !self.gossip_promises.contains(id):

let want_message = |id: &MessageId| {
if self.duplicate_cache.contains(id) {
return false;
}
!self.gossip_promises.contains(id)
};

I think this was not intended for this test.

To avoid unexpected filtering, I have changed the test to use fresh message-ids (specifically, message_ids[20..30]).

@jxs
Copy link
Owner

jxs commented May 1, 2024

Thanks for this @ackintosh!

@jxs jxs merged commit ec56b69 into jxs:impl-gossipsub-idontwant May 1, 2024
@ackintosh ackintosh deleted the impl-gossipsub-idontwant-ackintosh-fix-test branch May 5, 2024 14:08
jxs added a commit that referenced this pull request Jul 22, 2024
* move gossipsub into a separate crate

* Merge branch 'unstable' of github.com:sigp/lighthouse into separate-gossipsub

* update rpc.proto and generate rust bindings

* gossipsub: implement IDONTWANT messages

* address review

* move GossipPromises out of PeerScore

* impl PeerKind::is_gossipsub

that returns true if peer speaks any version of gossipsub

* address review 2

* Merge branch 'separate-gossipsub' of github.com:sigp/lighthouse into impl-gossipsub-idontwant

* Merge branch 'unstable' of github.com:sigp/lighthouse into impl-gossipsub-idontwant

* add metrics

* add tests

* make 1.2 beta before spec is merged

* Merge branch 'unstable' of github.com:sigp/lighthouse into impl-gossipsub-idontwant

* cargo clippy

* Collect decoded IDONTWANT messages

* Use the beta tag in most places to simplify the transition

* Fix failed test by using fresh message-ids

* Gossipsub v1.2-beta

* Merge latest unstable

* Cargo update

* Merge pull request #5 from ackintosh/impl-gossipsub-idontwant-ackintosh-fix-test

Fix `test_ignore_too_many_messages_in_ihave` test

* Merge branch 'unstable' of github.com:sigp/lighthouse into impl-gossipsub-idontwant

* update CHANGELOG.md

* remove beta for 1.2 IDONTWANT spec has been merged

* Merge branch 'unstable' of github.com:sigp/lighthouse into impl-gossipsub-idontwant

* Merge branch 'impl-gossipsub-idontwant' of github.com:jxs/lighthouse into impl-gossipsub-idontwant

* Merge branch 'unstable' of github.com:sigp/lighthouse into impl-gossipsub-idontwant

* improve comments wording

* Merge branch 'impl-gossipsub-idontwant' of github.com:jxs/lighthouse into impl-gossipsub-idontwant
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.

2 participants