Skip to content

Commit

Permalink
feat(rpc): add exclusive backoff for signature fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
armyhaylenko committed Jan 29, 2025
1 parent 6217b6b commit 68f14ba
Show file tree
Hide file tree
Showing 4 changed files with 423 additions and 80 deletions.
95 changes: 91 additions & 4 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions backfill_rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ plerkle_serialization = { workspace = true }
flatbuffers = { workspace = true }
tracing = { workspace = true }
usecase = { path = "../usecase" }
tokio-retry = { workspace = true }

[features]
rpc_tests = []

[dev-dependencies]
serde_json = { workspace = true }
warp = "0.3.7"
4 changes: 2 additions & 2 deletions backfill_rpc/src/block_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use solana_transaction_status::{TransactionDetails, UiConfirmedBlock};
use tracing::error;
use usecase::bigtable::is_bubblegum_transaction_encoded;

use crate::rpc::{BackfillRPC, GET_TX_RETRIES};
use crate::rpc::{BackfillRPC, MAX_RPC_RETRIES};

const SECONDS_TO_RETRY_GET_BLOCK: u64 = 5;

Expand All @@ -19,7 +19,7 @@ impl BlockProducer for BackfillRPC {
slot: u64,
_backup_provider: Option<Arc<impl BlockProducer>>,
) -> Result<UiConfirmedBlock, StorageError> {
let mut counter = GET_TX_RETRIES;
let mut counter = MAX_RPC_RETRIES;

loop {
let mut encoded_block = match self
Expand Down
Loading

0 comments on commit 68f14ba

Please sign in to comment.