Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Add a transaction prioritization API to the JavaScript library (@solana/web3.js) #1099

Closed
tao-stones opened this issue Sep 6, 2022 · 4 comments
Assignees
Labels

Comments

@tao-stones
Copy link

tao-stones commented Sep 6, 2022

Problem

JavaScript library to utilize prioritization fee

Proposed Solution

TBD

@steveluscher
Copy link
Contributor

steveluscher commented Sep 6, 2022

Ah, I was hoping for some sort of guidance about the right API for this :)

In the meantime, I discovered that a compute budget instruction helper was added by @philcchen in solana-labs/solana#24086, so maybe that's all the API we need or want?

Open to thoughts on whether:

  1. that's enough, or
  2. whether we should elevate this to the level of the Transaction class, or
  3. whether we should create a helper prioritizeTransaction(transaction: Transaction, additionalFee: number): Transaction that does the work of prepending the right instruction to an existing transaction.

Almost certainly 3, right?

cc/ @jordansexton, @jstarry, @jnwng.

@tao-stones
Copy link
Author

I discovered that a compute budget instruction helper was added by @philcchen in solana-labs/solana#24086, so maybe that's all the API we need or want?

Looks like solana-labs/solana#24086 ported earlier version of ComputeBudgetInstruction, probably needs a refreshment, at least add support of SetComputeUnitPrice

@steveluscher steveluscher transferred this issue from solana-labs/solana Feb 1, 2023
@jnwng
Copy link

jnwng commented Feb 7, 2023

whether we should create a helper prioritizeTransaction(transaction: Transaction, additionalFee: number): Transaction that does the work of prepending the right instruction to an existing transaction.

this sounds right to me—positionally, a priority fee is going to end up being different than the deterministic fees-per-signature as well as any rent exemption fees. plus since we're mutating the transaction we're gonna return a new Transaction anyway

@github-actions github-actions bot added the stale label Feb 8, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2024
Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants