Skip to content

Commit

Permalink
chore: update max compute unit config and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-bahjati committed Apr 25, 2024
1 parent 4985864 commit 6af8cf1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyth-agent"
version = "2.6.1"
version = "2.6.2"
edition = "2021"

[[bin]]
Expand Down
2 changes: 1 addition & 1 deletion config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ key_store.mapping_key = "RelevantOracleMappingAddress"
# exporter.max_batch_size = 12

# Number of compute units requested per update_price instruction within the transaction.
# exporter.compute_unit_limit = 20000
# exporter.compute_unit_limit = 60000

# Price per compute unit offered for update_price transactions
# exporter.compute_unit_price_micro_lamports =
Expand Down
6 changes: 4 additions & 2 deletions src/agent/solana/exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ impl Default for Config {
max_batch_size: 12,
inflight_transactions_channel_capacity: 10000,
transaction_monitor: Default::default(),
// The largest transactions appear to be about ~12000 CUs. We leave ourselves some breathing room.
compute_unit_limit: 40000,
// The largest transactions without accumulator spend around 38k compute units
// and accumulator cpi costs around 10k compute units. We set the limit to 60k
// to have some buffer.
compute_unit_limit: 60000,
compute_unit_price_micro_lamports: None,
dynamic_compute_unit_pricing_enabled: false,
// Maximum compute unit price (as a cap on the dynamic price)
Expand Down

0 comments on commit 6af8cf1

Please sign in to comment.