Skip to content

Conversation

ackintosh
Copy link
Member

@ackintosh ackintosh commented Jul 9, 2023

Issue Addressed

This PR closes #3237

Proposed Changes

Remove topic weight of old topics when the fork happens.

Additional Info

  • Divided NetworkService::start() into NetworkService::build() and NetworkService::start() for ease of testing.

@ackintosh ackintosh changed the title Remove topic weight from old fork topics Remove deficit gossipsub scoring during topic transition Jul 9, 2023
@ackintosh ackintosh force-pushed the remove-deficit-gossipsub-scoring branch from 4168d1b to 75ac306 Compare August 28, 2023 23:02
@ackintosh ackintosh force-pushed the remove-deficit-gossipsub-scoring branch from 9e54d24 to 1180022 Compare September 3, 2023 04:46
@ackintosh ackintosh marked this pull request as ready for review September 3, 2023 06:32
Copy link
Contributor

@divagant-martian divagant-martian left a comment

Choose a reason for hiding this comment

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

A couple of grammar corrections and a suggestion to make code a bit clearer, but otherwise I think this looks like what the original issue requested.

Comment on lines 973 to 981

#[cfg(test)]
#[allow(dead_code)]
fn get_topic_params(
&self,
topic: GossipTopic,
) -> Option<&lighthouse_network::libp2p::gossipsub::TopicScoreParams> {
self.libp2p.get_topic_params(topic)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

#[allow(dead_code)] annotations I think are generally confusing. It's not clear if this is used or not in the tests (because if yes then the #[cfg(test)] should be enough).

To better align this with where it's used, you could move it to beacon_node/network/src/service/tests.rs like this

    // use tokio::runtime::Runtime;
    // use types::{Epoch, EthSpec, ForkName, MinimalEthSpec, SubnetId};

    impl<T: beacon_chain::BeaconChainTypes> NetworkService<T> {
        fn get_topic_params(
            &self,
            topic: GossipTopic,
        ) -> Option<&lighthouse_network::libp2p::gossipsub::TopicScoreParams> {
            self.libp2p.get_topic_params(topic)
        }
    }

    // fn get_logger(actual_log: bool) -> Logger {
    // .. rest of the code

and it will not require any extra annotation

Copy link
Member

@AgeManning AgeManning left a comment

Choose a reason for hiding this comment

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

This looks good to me also. Just pending @divagant-martian comments

bors bot pushed a commit that referenced this pull request Sep 15, 2023
## Issue Addressed

This PR closes #3237

## Proposed Changes

Remove topic weight of old topics when the fork happens.

## Additional Info

- Divided `NetworkService::start()` into `NetworkService::build()` and `NetworkService::start()` for ease of testing.
@bors
Copy link

bors bot commented Sep 15, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Sep 15, 2023
## Issue Addressed

This PR closes #3237

## Proposed Changes

Remove topic weight of old topics when the fork happens.

## Additional Info

- Divided `NetworkService::start()` into `NetworkService::build()` and `NetworkService::start()` for ease of testing.
@bors
Copy link

bors bot commented Sep 15, 2023

Build failed:

@AgeManning
Copy link
Member

We are in the process of fixing the CI, so this should be able to merged smoother

@michaelsproul
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Sep 20, 2023
## Issue Addressed

This PR closes #3237

## Proposed Changes

Remove topic weight of old topics when the fork happens.

## Additional Info

- Divided `NetworkService::start()` into `NetworkService::build()` and `NetworkService::start()` for ease of testing.
@bors
Copy link

bors bot commented Sep 20, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Sep 20, 2023
## Issue Addressed

This PR closes #3237

## Proposed Changes

Remove topic weight of old topics when the fork happens.

## Additional Info

- Divided `NetworkService::start()` into `NetworkService::build()` and `NetworkService::start()` for ease of testing.
@bors
Copy link

bors bot commented Sep 21, 2023

Build failed (retrying...):

@michaelsproul
Copy link
Member

bors r-

@bors
Copy link

bors bot commented Sep 21, 2023

Canceled.

@michaelsproul michaelsproul added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-merge This PR is ready to merge. labels Sep 21, 2023
@divagant-martian divagant-martian added ready-for-merge This PR is ready to merge. and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Sep 30, 2023
@paulhauner
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Oct 4, 2023
## Issue Addressed

This PR closes #3237

## Proposed Changes

Remove topic weight of old topics when the fork happens.

## Additional Info

- Divided `NetworkService::start()` into `NetworkService::build()` and `NetworkService::start()` for ease of testing.
@bors
Copy link

bors bot commented Oct 4, 2023

Pull request successfully merged into unstable.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title Remove deficit gossipsub scoring during topic transition [Merged by Bors] - Remove deficit gossipsub scoring during topic transition Oct 4, 2023
@bors bors bot closed this Oct 4, 2023
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

This PR closes sigp#3237

## Proposed Changes

Remove topic weight of old topics when the fork happens.

## Additional Info

- Divided `NetworkService::start()` into `NetworkService::build()` and `NetworkService::start()` for ease of testing.
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
This PR closes sigp#3237

Remove topic weight of old topics when the fork happens.

- Divided `NetworkService::start()` into `NetworkService::build()` and `NetworkService::start()` for ease of testing.
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
This PR closes sigp#3237

Remove topic weight of old topics when the fork happens.

- Divided `NetworkService::start()` into `NetworkService::build()` and `NetworkService::start()` for ease of testing.
@ackintosh ackintosh deleted the remove-deficit-gossipsub-scoring branch May 5, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants