Skip to content

Commit

Permalink
adjust MAX_TOMBSTONE_BLOCKS constant (mobilecoinfoundation#2075)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 authored May 31, 2022
1 parent d979002 commit eec47c8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion transaction/core/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,21 @@ pub const MAX_OUTPUTS: u64 = 16;

/// Maximum number of blocks in the future a transaction's tombstone block can
/// be set to.
pub const MAX_TOMBSTONE_BLOCKS: u64 = 100;
///
/// This is the limit enforced in the enclave as part of transaction
/// validation rules. However, untrusted may decide to evict pending
/// transactions from the queue before this point, so this is only a maximum on
/// how long a Tx can actually be pending.
///
/// Note that clients are still in charge of setting the actual tombstone value.
/// For normal transactions, clients at time of writing are defaulting to
/// something like current block height + 100, so that they can know quickly if
/// a Tx succeeded or failed.
///
/// Rationale for this number is, at a rate of 2 blocks / minute, this is 7
/// days, which eases operations for minting agents which must perform a
/// multi-sig.
pub const MAX_TOMBSTONE_BLOCKS: u64 = 20160;

/// The MobileCoin network will contain a fixed supply of 250 million
/// mobilecoins (MOB).
Expand Down

0 comments on commit eec47c8

Please sign in to comment.