Skip to content

Commit

Permalink
feat(gateway): add instance ttl extension
Browse files Browse the repository at this point in the history
- increase instance ttl extend threshold to 14 days
  • Loading branch information
AttissNgo committed Oct 31, 2024
1 parent b993f1a commit bf218ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/axelar-gateway/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");

/// Parameters for extending the contract instance and its instance storage.
///
/// If the instance's time to live falls below 7 days, it will be extended by 60 days.
/// If the instance's time to live falls below 14 days, it will be extended by 60 days.
///
/// If at least one message is approved per week, the instance should never be archived.
/// If at least one message is approved every 14 days, the instance should never be archived.
const LEDGERS_PER_DAY: u32 = (24 * 3600) / 5;
const INSTANCE_TTL_THRESHOLD: u32 = 7 * LEDGERS_PER_DAY;
const INSTANCE_TTL_THRESHOLD: u32 = 14 * LEDGERS_PER_DAY;
const INSTANCE_TTL_EXTEND_TO: u32 = 60 * LEDGERS_PER_DAY;

#[contract]
Expand Down

0 comments on commit bf218ea

Please sign in to comment.