michaelhly / solana-py

Solana Python SDK
https://michaelhly.github.io/solana-py
MIT License
979 stars 252 forks source link

Add Compute Budget Instructions #403

Closed MHHukiewitz closed 5 months ago

MHHukiewitz commented 6 months ago

GM!

Due to the dire need for priority fees to have any chance at landing transactions, I decided to implement the Compute Budget program's instructions for solder.

I added them under the spl module, even though that is not technically correct, but I assume that is where people would be looking for those instructions.

For some reason regarding docker, I couldn't run the integration tests directly on my machne. Maybe the CI/CD of this repo can catch the errors I might have made.

I based this implementation and its layouts on the Typescript implementation of solana-labs/solana-web3.js.

Suggestions welcome!

michaelhly commented 5 months ago

@MHHukiewitz Thanks for the PR. These instructions already exist in Solders, would you mind wrapping the Solders instructions instead of using construct-py?

https://kevinheavey.github.io/solders/api_reference/compute_budget.html

kevinheavey commented 5 months ago

It's worth considering whether there's anything that should be added at all here vs just using what's in Solders

MHHukiewitz commented 5 months ago

Oh Christ, I didn't notice. Yeah, I think this PR is superfluous then.