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

Reenable go-gossipsub tests #201

Merged
merged 11 commits into from
Mar 18, 2022
Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Mar 14, 2022

Motivation

  • Reenable go-gossipsub tests

Description
Closes #178 #183

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2022

Codecov Report

Merging #201 (723e900) into master (4ec0146) will increase coverage by 5.66%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #201      +/-   ##
==========================================
+ Coverage   80.45%   86.12%   +5.66%     
==========================================
  Files          19       19              
  Lines        5450     5450              
  Branches      488      610     +122     
==========================================
+ Hits         4385     4694     +309     
+ Misses       1065      756     -309     
Impacted Files Coverage Δ
ts/score/compute-score.ts 94.50% <0.00%> (+2.19%) ⬆️
ts/score/peer-score.ts 91.16% <0.00%> (+2.65%) ⬆️
ts/message/rpc.js 76.49% <0.00%> (+3.49%) ⬆️
ts/index.ts 92.20% <0.00%> (+12.48%) ⬆️
ts/message-cache.ts 97.91% <0.00%> (+13.54%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ec0146...723e900. Read the comment docs.

@twoeths twoeths force-pushed the tuyen/reenable-go-gossipsub-tests branch from dd38fa7 to a453afa Compare March 15, 2022 04:40
@twoeths twoeths force-pushed the tuyen/reenable-go-gossipsub-tests branch from 14bb9f8 to dd0ad53 Compare March 15, 2022 13:20
@twoeths
Copy link
Contributor Author

twoeths commented Mar 17, 2022

go-gossipsub tests are stable, ready for review

@twoeths twoeths marked this pull request as ready for review March 17, 2022 09:39
@twoeths twoeths requested a review from a team March 17, 2022 09:40
Copy link
Contributor

@dapplion dapplion left a comment

Choose a reason for hiding this comment

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

LGTM! Thank youu

@dapplion dapplion merged commit 8d62ee4 into master Mar 18, 2022
@dapplion dapplion deleted the tuyen/reenable-go-gossipsub-tests branch March 18, 2022 02:50
dapplion pushed a commit that referenced this pull request Mar 20, 2022
* Add checkReceivedSubscriptions

* Add checkReceivedSubscriptions to 'test gossipsub multihops'

* Add checkReceivedSubscriptions to 'test gossipsub tree topology'

* test gossipsub star topology with signed peer records

* Fix 'test gossipsub direct peers'

* Fix 'test gossipsub flood publish'

* Fix 'test gossipsub star topology with signed peer records'

* 'direct peers' test: wait for subscriptions event again

* 'direct peer': await for 2 peer:connect events

* 'direct peers': add missing Promise.all

* Expect topic peers to contain peer id
twoeths added a commit that referenced this pull request Apr 5, 2022
* Add metrics and revamp logic

Declare prometheus metrics in gossipsub

Add missing metric labels

Fix metrics types

Add onReportValidation

* Compile tests

* Fix tests

* Customize await policy

* Run prettier on files

* Relax heartbeat test condition

* Re-add util package for browser testing

* Remove unused dependencies

* Add getMeshPeers

* Fix rpc metric name

* Improve metrics

* More gossip promise metrics

* Fix metrics typo

* Clarify metrics names

* Track metric of score deltas

* Fix score metrics

* Add buckets for gossipsub_score_cache_delta

* Review PeerScore logic

* Dump peer stats

* Fix PeerStats constructor

* Enable strict typescript checks

* Fix compute-score logic

* f

* Fix peer stats types

* Reenable go-gossipsub tests (#201)

* Add checkReceivedSubscriptions

* Add checkReceivedSubscriptions to 'test gossipsub multihops'

* Add checkReceivedSubscriptions to 'test gossipsub tree topology'

* test gossipsub star topology with signed peer records

* Fix 'test gossipsub direct peers'

* Fix 'test gossipsub flood publish'

* Fix 'test gossipsub star topology with signed peer records'

* 'direct peers' test: wait for subscriptions event again

* 'direct peer': await for 2 peer:connect events

* 'direct peers': add missing Promise.all

* Expect topic peers to contain peer id

* Fix test types

* Set as connected in addPeer()

* Prune publishedMessageIds

* Fix markFirstMessageDelivery typo

* Same logic in scoreMetrics

* More metrics for p3 and p7 (#213)

* Add behaviourPenalty metrics

* Add duplicateMsgDelivery metric

* Observe topic and peer in duplicateMsgDelivery topic

* Remove peerId from duplicateMsgDelivery metric

* Use min meshMessageDeliveriesWindow

* Use topic label for duplicateMsgDelivery metric

* Record duplicateMsgDelivery in all cases

* Forward messages to floodsub peers (#214)

* Forward messages to floodsub peers

* Add comments

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Add missing msgId in validateReceivedMessage (#215)

* Fix 'test gossipsub opportunistic grafting'

* Fix tests in browser

* Fix tests suspended issue in browsers

* Fix 'test gossipsub fanout expiry' go-gossipsub test

* GossipsubIWantFollowupTime as a param (#216)

* Increase resolution of delay metrics (#217)

* Fix minMeshMessageDeliveriesWindow (#218)

* Fix minMeshMessageDeliveriesWindow

* Fix gossipsubIWantFollowupTime for metric

* Fix tracer prune()

* Change to maxMeshMessageDeliveriesWindow

* Use maxMeshMessageDeliveriesWindowSec for metric

* Rename gossipsubIWantFollowupMs option, revert/correct tracer.prune() logic

* Reset behaviourPenalty histogram to track current count

* publish(): return number of sent peers

* Add getScore()

* makePrune: update PeerStat so that we don't apply p3 penalty

* Remove redundant this.score.prune() in heartbeat

* Track iasked cache size per heartbeat and remove TODOs

* validateReceivedMessage: check duplicate message first (#223)

Co-authored-by: tuyennhv <vutuyen2636@gmail.com>
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.

CI: go-gossipsub tests failed
3 participants