Skip to content

Commit 58fc0ff

Browse files
authored
chore: update max compute unit config and bump version (#119)
1 parent 4985864 commit 58fc0ff

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyth-agent"
3-
version = "2.6.1"
3+
version = "2.6.2"
44
edition = "2021"
55

66
[[bin]]

config/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ key_store.mapping_key = "RelevantOracleMappingAddress"
7474
# exporter.max_batch_size = 12
7575

7676
# Number of compute units requested per update_price instruction within the transaction.
77-
# exporter.compute_unit_limit = 20000
77+
# exporter.compute_unit_limit = 60000
7878

7979
# Price per compute unit offered for update_price transactions
8080
# exporter.compute_unit_price_micro_lamports =

src/agent/solana/exporter.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,10 @@ impl Default for Config {
153153
max_batch_size: 12,
154154
inflight_transactions_channel_capacity: 10000,
155155
transaction_monitor: Default::default(),
156-
// The largest transactions appear to be about ~12000 CUs. We leave ourselves some breathing room.
157-
compute_unit_limit: 40000,
156+
// The largest transactions without accumulator spend around 38k compute units
157+
// and accumulator cpi costs around 10k compute units. We set the limit to 60k
158+
// to have some buffer.
159+
compute_unit_limit: 60000,
158160
compute_unit_price_micro_lamports: None,
159161
dynamic_compute_unit_pricing_enabled: false,
160162
// Maximum compute unit price (as a cap on the dynamic price)

0 commit comments

Comments
 (0)