-
Notifications
You must be signed in to change notification settings - Fork 31
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
Eclipse integration #35
Changes from all commits
571cf41
dc3c942
e8f7123
4a7d092
062354f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
snapshot_timeout_in_seconds = 900 | ||
|
||
[infinity] | ||
enabled = false | ||
|
||
[orca] | ||
enabled = true | ||
mints = [] | ||
take_all_mints = true | ||
add_mango_tokens = false | ||
|
||
[cropper] | ||
enabled = false | ||
mints = [] | ||
take_all_mints = true | ||
add_mango_tokens = false | ||
|
||
[openbook_v2] | ||
enabled = false | ||
mints = [] | ||
take_all_mints = true | ||
add_mango_tokens = false | ||
|
||
[raydium] | ||
enabled = false | ||
mints = [] | ||
take_all_mints = true | ||
add_mango_tokens = false | ||
|
||
[raydium_cp] | ||
enabled = false | ||
mints = [] | ||
take_all_mints = true | ||
add_mango_tokens = false | ||
|
||
[saber] | ||
enabled = false | ||
mints = [] | ||
take_all_mints = true | ||
add_mango_tokens = false | ||
|
||
|
||
[routing] | ||
path_cache_validity_ms = 30000 | ||
path_warming_mode = "ConfiguredMints" | ||
#path_warming_mode = "HotMints" | ||
path_warming_amounts = [100, 1000, 10_000] | ||
path_warming_for_mints = [ | ||
"So11111111111111111111111111111111111111112", # SOL | ||
] | ||
path_warming_interval_secs = 5 | ||
path_warming_max_accounts = [20, 30, 40, 64] | ||
lookup_tables = [] | ||
cooldown_duration_multihop_secs = 30 | ||
cooldown_duration_singlehop_secs = 60 | ||
max_path_length = 3 | ||
retain_path_count = 5 | ||
max_edge_per_pair = 5 | ||
max_edge_per_cold_pair = 2 | ||
slot_excessive_lag_max_duration_secs = 1600 | ||
|
||
[server] | ||
address = "[::]:8888" | ||
|
||
[metrics] | ||
output_http = true | ||
prometheus_address = "[::]:9091" | ||
output_stdout = false | ||
|
||
[[sources]] | ||
dedup_queue_size = 50000 | ||
rpc_http_url = "$RPC_HTTP_URL" | ||
rpc_support_compression = false | ||
re_snapshot_interval_secs = 1200 | ||
request_timeout_in_seconds = 300 | ||
|
||
[[sources.grpc_sources]] | ||
name = "router-eclipse" | ||
connection_string = "$RPC_HTTP_URL_WITHOUT_TOKEN" | ||
token = "$RPC_TOKEN" | ||
retry_connection_sleep_secs = 30 | ||
|
||
[price_feed] | ||
birdeye_token = "$BIRDEYE_TOKEN" | ||
refresh_interval_secs = 1200 # every 20 min | ||
|
||
[safety_checks] | ||
check_quote_out_amount_deviation = true | ||
min_quote_out_to_in_amount_ratio = 0.65 | ||
|
||
[hot_mints] | ||
always_hot_mints = [ | ||
"So11111111111111111111111111111111111111112", # SOL | ||
] | ||
keep_latest_count = 50 | ||
|
||
[debug_config] | ||
reprice_using_live_rpc = true | ||
reprice_probability = 0.05 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
app = "router-eclipse" | ||
primary_region = "fra" | ||
kill_signal = "SIGTERM" | ||
kill_timeout = "30s" | ||
|
||
[build] | ||
dockerfile = 'bin/autobahn-router/Dockerfile' | ||
|
||
[build.args] | ||
CONFIG_PATH="/app/bin/autobahn-router/template-config-eclipse.toml" | ||
|
||
[experimental] | ||
cmd = ["autobahn-router", "/usr/local/bin/template-config.toml"] | ||
|
||
[[vm]] | ||
size = "shared-cpu-4x" | ||
memory = "8gb" | ||
|
||
[[restart]] | ||
policy = "always" | ||
retries = 10 | ||
|
||
[metrics] | ||
port = 9091 | ||
path = "/metrics" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
app = "router-2" | ||
primary_region = "dfw" | ||
primary_region = "ams" | ||
kill_signal = "SIGTERM" | ||
kill_timeout = "30s" | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,10 @@ use solana_sdk::account::Account; | |
use solana_sdk::pubkey::Pubkey; | ||
|
||
use crate::account_write::AccountWrite; | ||
use crate::get_program_account::{fetch_multiple_accounts, get_compressed_program_account_rpc}; | ||
use crate::get_program_account::{ | ||
fetch_multiple_accounts, get_compressed_program_account_rpc, | ||
get_uncompressed_program_account_rpc, | ||
}; | ||
use crate::router_rpc_client::RouterRpcClientTrait; | ||
|
||
pub struct RouterRpcWrapper { | ||
|
@@ -52,10 +55,21 @@ impl RouterRpcClientTrait for RouterRpcWrapper { | |
pubkey: &Pubkey, | ||
config: RpcProgramAccountsConfig, | ||
) -> anyhow::Result<Vec<AccountWrite>> { | ||
Ok( | ||
get_compressed_program_account_rpc(&self.rpc, &HashSet::from([*pubkey]), config) | ||
.await? | ||
.1, | ||
) | ||
let disable_compressed = std::env::var::<String>("DISABLE_COMRPESSED_GPA".to_string()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be a config variable in RpcProgramAccountsConfig not an env variable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method is used only in the smoke tests, tests do not use RpcProgramAccountsConfig. So no use of removing this env variable. |
||
.unwrap_or("false".to_string()); | ||
let disable_compressed: bool = disable_compressed.trim().parse().unwrap(); | ||
if disable_compressed { | ||
Ok( | ||
get_uncompressed_program_account_rpc(&self.rpc, &HashSet::from([*pubkey]), config) | ||
.await? | ||
.1, | ||
) | ||
} else { | ||
Ok( | ||
get_compressed_program_account_rpc(&self.rpc, &HashSet::from([*pubkey]), config) | ||
.await? | ||
.1, | ||
) | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be false