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

increase value of MAX_SLOTS_TO_REMEMBER to 14400 #355

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions clients/vault/src/oracle/collector/proof_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use stellar_relay_lib::sdk::{
};

use crate::oracle::{
constants::{get_min_externalized_messages, MAX_SLOT_TO_REMEMBER},
constants::{get_min_externalized_messages, MAX_SLOTS_TO_REMEMBER},
traits::ArchiveStorage,
types::StellarMessageSender,
ScpArchiveStorage, ScpMessageCollector, Slot, TransactionsArchiveStorage,
Expand All @@ -17,7 +17,7 @@ use crate::oracle::{
/// Returns true if the SCP messages for a given slot are still recoverable from the overlay
/// because the slot is not too far back.
fn check_slot_still_recoverable_from_overlay(last_slot_index: Slot, slot: Slot) -> bool {
last_slot_index != 0 && slot > (last_slot_index.saturating_sub(MAX_SLOT_TO_REMEMBER))
last_slot_index != 0 && slot > (last_slot_index.saturating_sub(MAX_SLOTS_TO_REMEMBER))
}

/// The Proof of Transactions that needed to be processed
Expand Down
2 changes: 1 addition & 1 deletion clients/vault/src/oracle/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub const MAX_DISTANCE_FROM_CURRENT_SLOT: Slot = 3;
pub const VALIDATOR_COUNT_TEST_NETWORK: usize = 3;
pub const VALIDATOR_COUNT_PUBLIC_NETWORK: usize = 23;

pub const MAX_SLOT_TO_REMEMBER: Slot = 12;
pub const MAX_SLOTS_TO_REMEMBER: Slot = 100;

pub const ARCHIVE_NODE_LEDGER_BATCH: Slot = 64;

Expand Down