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

cli: Add priority fees to idl commands #2845

Merged
merged 10 commits into from
Mar 19, 2024

Conversation

andreihrs
Copy link
Contributor

@andreihrs andreihrs commented Mar 15, 2024

  • add optional priority fee argument
  • get max between recommended priority fee from the client and priority fee passed, so that txs have a higher chance to go through
  • add retry on write buffer, so the operation doesn't fail on blockhash expired/transaction expired midway
  • make the buffer size small on writing, so it doesn't fail on tx size too big when adding the compute budget unit fee instruction

Copy link

vercel bot commented Mar 15, 2024

@andreihrs is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@andreihrs andreihrs changed the title Add compute budget to idl commands Add compute unit fee to idl commands Mar 15, 2024
@andreihrs andreihrs changed the title Add compute unit fee to idl commands Add compute unit budget fee to idl commands Mar 15, 2024
@andreihrs andreihrs changed the title Add compute unit budget fee to idl commands Add pr to idl commands Mar 15, 2024
@andreihrs andreihrs changed the title Add pr to idl commands Add priority fees to idl commands Mar 15, 2024
@andreihrs andreihrs changed the title Add priority fees to idl commands cli: Add priority fees to idl commands Mar 15, 2024
Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

We definitely need priority fees and retry logic, so thank you for working on this!

cli/src/lib.rs Outdated Show resolved Hide resolved
cli/src/lib.rs Outdated Show resolved Hide resolved
cli/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

There is one small issue, other than that, this looks great!

Before we merge, could you note this change in the CHANGELOG?

cli/src/lib.rs Show resolved Hide resolved
Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Thank you!

@acheroncrypto acheroncrypto merged commit cc15435 into coral-xyz:master Mar 19, 2024
46 of 47 checks passed
@Henry-E
Copy link

Henry-E commented Mar 23, 2024

It would be helpful to add some examples to the docs or even just here about what the usage looks like

@acheroncrypto
Copy link
Collaborator

Yeah, we can do that (after the next release because the doc website updates live), I'll also note this in the release notes. The usage is pretty simple e.g. anchor idl init --priority-fee ...

Most of the time, you wouldn't even need to specify this argument since we use the median priority fee by default. Also the fees are broken i.e. increasing the priority fee after a certain point doesn't make your transaction more likely to land.

farnyser pushed a commit to farnyser/anchor that referenced this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants