solana icon indicating copy to clipboard operation
solana copied to clipboard

round down compute-unit-price to its nearest 1_000 microlamport

Open tao-stones opened this issue 2 years ago • 12 comments

Problem

Rounding compute-unit-price down to nearest 1_000 micro-lamport, effectively making its minimum change to be 0.001 lamport.

Summary of Changes

  1. add feature gate
  2. round compute-unit-price down to nearest 1_000 micro-lamports if feature activated;
  3. add and update tests

Feature Gate Issue: #31453

tao-stones avatar May 03 '23 19:05 tao-stones

runtime/src/transaction_priority_details.rs now requires feature activation status in order to determine prioritization. PR #31549 adds a flag to packet to pass feature status.

tao-stones avatar May 03 '23 19:05 tao-stones

blocked by #31549

tao-stones avatar May 10 '23 17:05 tao-stones

Draft change itself looks fine to me. I feel like we need a SIMD for this though to fully justify why we want to do this, and to enable folks like Pyth to chime in on any impact it may have on their transactions and if/when they can make changes in their design to deal with it

mvines avatar May 18 '23 23:05 mvines

Draft change itself looks fine to me. I feel like we need a SIMD for this though to fully justify why we want to do this, and to enable folks like Pyth to chime in on any impact it may have on their transactions and if/when they can make changes in their design to deal with it

Sounds good, I'll chat with David then open a SIMD today.

tao-stones avatar May 19 '23 14:05 tao-stones

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c142ba1) 82.0% compared to head (c39e284) 82.0%. Report is 1568 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #31469    +/-   ##
========================================
  Coverage    82.0%    82.0%            
========================================
  Files         769      769            
  Lines      209137   209250   +113     
========================================
+ Hits       171587   171696   +109     
- Misses      37550    37554     +4     

codecov[bot] avatar May 19 '23 16:05 codecov[bot]

@eugene-chen @SpaceMonkeyForever would you be able to review?

tao-stones avatar Jun 07 '23 21:06 tao-stones

I am definitely not qualified to review the code 😁

eugene-chen avatar Jun 07 '23 21:06 eugene-chen

This is probably a job for @mschneider

SpaceMonkeyForever avatar Jun 07 '23 21:06 SpaceMonkeyForever

Think we had agreed on this PR, would love to have it merged before drifting too far away from master. Would appreciate review / approve SIMD 50 first. tag @eugene-chen @mschneider @godmodegalactus @SpaceMonkeyForever 🙇🏼‍♂️

tao-stones avatar Jun 21 '23 15:06 tao-stones

Overall looks good to me. Performance impact should be insignificant overall but may increase a little the average CU consumed by compute budget program.

godmodegalactus avatar Jun 21 '23 15:06 godmodegalactus

approved, but still we should be waiting on the SIMD acceptance.

apfitzge avatar Jun 22 '23 16:06 apfitzge

approved, but still we should be waiting on the SIMD acceptance.

🙇🏼

tao-stones avatar Jun 22 '23 19:06 tao-stones

This repository is no longer in use. Please re-open this pull request in the agave repo: https://github.com/anza-xyz/agave

willhickey avatar Mar 03 '24 04:03 willhickey