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

removes Packet Meta.sender_stake and find_packet_sender_stake_stage #31077

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

behzadnouri
Copy link
Contributor

Problem

Packet Meta.sender_stake is unused since #26512
removed sender_stake from banking-stage buffer prioritization.

Summary of Changes

removed Packet Meta.sender_stake and find_packet_sender_stake_stage

Packet Meta.sender_stake is unused since
solana-labs#26512
removed sender_stake from banking-stage buffer prioritization.
@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Merging #31077 (395aac4) into master (4564bcd) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff            @@
##           master   #31077    +/-   ##
========================================
  Coverage    81.4%    81.4%            
========================================
  Files         728      727     -1     
  Lines      206004   205880   -124     
========================================
- Hits       167830   167761    -69     
+ Misses      38174    38119    -55     

Copy link
Contributor

@tao-stones tao-stones left a comment

Choose a reason for hiding this comment

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

lgtm with a nit. banking_stage no longer uses packet.sender_stake, thanks for removing dead code.

A quick note: the packets threshold MAX_FINDPACKETSENDERSTAKE_BATCH removed by deleting find_packet_sender_stake_stage.rs has duplicated implementation in sigverify_stage, so removing it should not have impact.

let sender_stake = distribution.sample(&mut rng);
packet.meta_mut().sender_stake = sender_stake as u64;
packet
Packet::from_data(None, tx).unwrap()
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: after removed code to set random sender_stake, this function became same as build_packet_batch(). Can remove build_randomized_packet_batch() and related bench test all together. This can be done in follow up PR.

@behzadnouri behzadnouri merged commit 4d0abeb into solana-labs:master Apr 6, 2023
@behzadnouri behzadnouri deleted the rm-sender-stake-stage branch April 6, 2023 21:33
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.

None yet

2 participants