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

chore: update max compute unit config and bump version #119

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading