Skip to content

Commit

Permalink
Bump Solana prioritization fees (#3373)
Browse files Browse the repository at this point in the history
### Description

See hyperlane-xyz/issues#1123 for rationale

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
  • Loading branch information
tkporter authored Mar 7, 2024
1 parent 4141ba9 commit 3758115
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
22 changes: 21 additions & 1 deletion rust/chains/hyperlane-sealevel/src/mailbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,23 @@ const SPL_NOOP: &str = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV";

// The max amount of compute units for a transaction.
// TODO: consider a more sane value and/or use IGP gas payments instead.
const PROCESS_COMPUTE_UNITS: u32 = 1_400_000;
const PROCESS_COMPUTE_UNITS: u32 = 700_000;

/// 0.0000035 SOL, in lamports.
/// A typical tx fee without a prioritization fee is 0.000005 SOL, or
/// 5000 lamports. (Example: https://explorer.solana.com/tx/fNd3xVeBzFHeuzr8dXQxLGiHMzTeYpykSV25xWzNRaHtzzjvY9A3MzXh1ZsK2JncRHkwtuWrGEwGXVhFaUCYhtx)
const PROCESS_DESIRED_PRIORITIZATION_FEE_LAMPORTS_PER_TX: u64 = 3500;

/// In micro-lamports. Multiply this by the compute units to figure out
/// the additional cost of processing a message, in addition to the mandatory
/// "base" cost of signature verification.
const PROCESS_COMPUTE_UNIT_PRICE_MICRO_LAMPORTS: u64 =
(
// Convert to micro-lamports
(PROCESS_DESIRED_PRIORITIZATION_FEE_LAMPORTS_PER_TX * 1_000_000)
// Divide by the max compute units
/ PROCESS_COMPUTE_UNITS as u64
);

/// A reference to a Mailbox contract on some Sealevel chain
pub struct SealevelMailbox {
Expand Down Expand Up @@ -413,6 +429,10 @@ impl Mailbox for SealevelMailbox {
instructions.push(ComputeBudgetInstruction::set_compute_unit_limit(
PROCESS_COMPUTE_UNITS,
));
// Set the compute unit price.
instructions.push(ComputeBudgetInstruction::set_compute_unit_price(
PROCESS_COMPUTE_UNIT_PRICE_MICRO_LAMPORTS,
));

// "processed" level commitment does not guarantee finality.
// roughly 5% of blocks end up on a dropped fork.
Expand Down
4 changes: 2 additions & 2 deletions typescript/infra/config/environments/mainnet2/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const hyperlane: RootAgentConfig = {
connectionType: AgentConnectionType.HttpFallback,
docker: {
repo,
tag: '42d50c6-20240221-113013',
tag: 'e5defad-20240307-100803',
},
blacklist: [
...releaseCandidateHelloworldMatchingList,
Expand Down Expand Up @@ -171,7 +171,7 @@ const releaseCandidate: RootAgentConfig = {
connectionType: AgentConnectionType.HttpFallback,
docker: {
repo,
tag: '35fdc74-20230913-104940',
tag: 'e5defad-20240307-100803',
},
whitelist: releaseCandidateHelloworldMatchingList,
gasPaymentEnforcement,
Expand Down

0 comments on commit 3758115

Please sign in to comment.