Increasing size of channels
This commit is contained in:
parent
07056d8c58
commit
7355bbc2a0
|
@ -148,6 +148,7 @@ impl AccountStorageInterface for AccountsOnDemand {
|
||||||
// create a notify for accounts under loading
|
// create a notify for accounts under loading
|
||||||
lk.insert(account_pk, Arc::new(Notify::new()));
|
lk.insert(account_pk, Arc::new(Notify::new()));
|
||||||
self.accounts_subscribed.insert(account_pk);
|
self.accounts_subscribed.insert(account_pk);
|
||||||
|
log::info!("Accounts on demand loading: {}", account_pk.to_string());
|
||||||
drop(lk);
|
drop(lk);
|
||||||
self.refresh_subscription().await;
|
self.refresh_subscription().await;
|
||||||
let mut return_value = None;
|
let mut return_value = None;
|
||||||
|
|
|
@ -82,7 +82,7 @@ pub fn create_grpc_account_streaming_tasks(
|
||||||
grpc_sources: Vec<GrpcSourceConfig>,
|
grpc_sources: Vec<GrpcSourceConfig>,
|
||||||
mut account_filter_watch: watch::Receiver<AccountFilters>,
|
mut account_filter_watch: watch::Receiver<AccountFilters>,
|
||||||
) -> (AnyhowJoinHandle, AccountStream) {
|
) -> (AnyhowJoinHandle, AccountStream) {
|
||||||
let (account_sender, accounts_stream) = broadcast::channel::<AccountNotificationMessage>(128);
|
let (account_sender, accounts_stream) = broadcast::channel::<AccountNotificationMessage>(5000);
|
||||||
|
|
||||||
let jh: AnyhowJoinHandle = tokio::spawn(async move {
|
let jh: AnyhowJoinHandle = tokio::spawn(async move {
|
||||||
match account_filter_watch.changed().await {
|
match account_filter_watch.changed().await {
|
||||||
|
|
|
@ -42,7 +42,7 @@ pub async fn get_program_account(
|
||||||
// setting larget timeout because gPA can take a lot of time
|
// setting larget timeout because gPA can take a lot of time
|
||||||
let rpc_client = Arc::new(RpcClient::new_with_timeout_and_commitment(
|
let rpc_client = Arc::new(RpcClient::new_with_timeout_and_commitment(
|
||||||
rpc_url,
|
rpc_url,
|
||||||
Duration::from_secs(60 * 10),
|
Duration::from_secs(60 * 20),
|
||||||
CommitmentConfig::processed(),
|
CommitmentConfig::processed(),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@ kill_timeout = 5
|
||||||
RUST_LOG = "info"
|
RUST_LOG = "info"
|
||||||
ENABLE_ADDRESS_LOOKUP_TABLES = "true"
|
ENABLE_ADDRESS_LOOKUP_TABLES = "true"
|
||||||
ACCOUNT_FILTERS = "[{\"accounts\":[],\"programId\":\"4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg\",\"filters\":null},{\"accounts\":[],\"programId\":\"3BUZXy9mPcsSCoxJQiBu2xxpMP6HEvFMZbaL5CAWwLUf\",\"filters\":null},{\"accounts\":[],\"programId\":\"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv\",\"filters\":null},{\"accounts\":[],\"programId\":\"SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f\",\"filters\":null},{\"accounts\":[],\"programId\":\"srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX\",\"filters\":null},{\"accounts\":[],\"programId\":\"opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb\",\"filters\":null},{\"accounts\":[],\"programId\":\"PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY\",\"filters\":null},{\"accounts\":[],\"programId\":\"DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1\",\"filters\":null},{\"accounts\":[],\"programId\":\"9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP\",\"filters\":null},{\"accounts\":[],\"programId\":\"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc\",\"filters\":null},{\"accounts\":[],\"programId\":\"82yxjeMsvaURa4MbZZ7WZZHfobirZYkH1zF8fmeGtyaQ\",\"filters\":null},{\"accounts\":[],\"programId\":\"CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK\",\"filters\":null},{\"accounts\":[],\"programId\":\"675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8\",\"filters\":null},{\"accounts\":[],\"programId\":\"LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo\",\"filters\":null},{\"accounts\":[],\"programId\":\"24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi\",\"filters\":null},{\"accounts\":[],\"programId\":\"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB\",\"filters\":null},{\"accounts\":[],\"programId\":\"FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH\",\"filters\":null}]"
|
ACCOUNT_FILTERS = "[{\"accounts\":[],\"programId\":\"4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg\",\"filters\":null},{\"accounts\":[],\"programId\":\"3BUZXy9mPcsSCoxJQiBu2xxpMP6HEvFMZbaL5CAWwLUf\",\"filters\":null},{\"accounts\":[],\"programId\":\"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv\",\"filters\":null},{\"accounts\":[],\"programId\":\"SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f\",\"filters\":null},{\"accounts\":[],\"programId\":\"srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX\",\"filters\":null},{\"accounts\":[],\"programId\":\"opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb\",\"filters\":null},{\"accounts\":[],\"programId\":\"PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY\",\"filters\":null},{\"accounts\":[],\"programId\":\"DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1\",\"filters\":null},{\"accounts\":[],\"programId\":\"9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP\",\"filters\":null},{\"accounts\":[],\"programId\":\"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc\",\"filters\":null},{\"accounts\":[],\"programId\":\"82yxjeMsvaURa4MbZZ7WZZHfobirZYkH1zF8fmeGtyaQ\",\"filters\":null},{\"accounts\":[],\"programId\":\"CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK\",\"filters\":null},{\"accounts\":[],\"programId\":\"675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8\",\"filters\":null},{\"accounts\":[],\"programId\":\"LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo\",\"filters\":null},{\"accounts\":[],\"programId\":\"24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi\",\"filters\":null},{\"accounts\":[],\"programId\":\"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB\",\"filters\":null},{\"accounts\":[],\"programId\":\"FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH\",\"filters\":null}]"
|
||||||
ENABLE_ACCOUNT_ON_DEMAND = "true"
|
ENABLE_ACCOUNT_ON_DEMAND = "false"
|
||||||
ENABLE_SMART_ACCOUNTS_WARMUP = "true"
|
ENABLE_SMART_ACCOUNTS_WARMUP = "false"
|
||||||
PG_ENABLED = "false"
|
PG_ENABLED = "false"
|
||||||
USE_GRPC = "true"
|
USE_GRPC = "true"
|
||||||
DISABLE_GSO = "true"
|
DISABLE_GSO = "true"
|
||||||
|
|
|
@ -194,7 +194,7 @@ pub async fn start_lite_rpc(args: Config, rpc_client: Arc<RpcClient>) -> anyhow:
|
||||||
const MAX_CONNECTIONS_IN_PARALLEL: usize = 10;
|
const MAX_CONNECTIONS_IN_PARALLEL: usize = 10;
|
||||||
// Accounts notifications will be spurious when slots change
|
// Accounts notifications will be spurious when slots change
|
||||||
// 256 seems very reasonable so that there are no account notification is missed and memory usage
|
// 256 seems very reasonable so that there are no account notification is missed and memory usage
|
||||||
let (account_notification_sender, _) = tokio::sync::broadcast::channel(256);
|
let (account_notification_sender, _) = tokio::sync::broadcast::channel(5000);
|
||||||
|
|
||||||
let account_storage = if enable_accounts_on_demand_accounts_service {
|
let account_storage = if enable_accounts_on_demand_accounts_service {
|
||||||
Arc::new(AccountsOnDemand::new(
|
Arc::new(AccountsOnDemand::new(
|
||||||
|
|
Loading…
Reference in New Issue