Skip to content

Commit

Permalink
feat: EXC-1659: Enable storage reservation mechanism on verified appl…
Browse files Browse the repository at this point in the history
…ication subnets (dfinity#1930)

This enables the storage reservation mechanism on verified application
subnets. The storage reservation mechanism has been enabled for a while
on application subnets and so it's time that this is enabled for
verified application subnets as well. This helps bring closer the
configuration between application and verified application subnets.
  • Loading branch information
dsarlis authored Oct 9, 2024
1 parent d544428 commit 9df94b4
Show file tree
Hide file tree
Showing 5 changed files with 726 additions and 731 deletions.
15 changes: 5 additions & 10 deletions rs/config/src/subnet_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,6 @@ pub struct CyclesAccountManagerConfig {

impl CyclesAccountManagerConfig {
pub fn application_subnet() -> Self {
Self {
max_storage_reservation_period: Duration::from_secs(300_000_000),
..Self::verified_application_subnet()
}
}

pub fn verified_application_subnet() -> Self {
Self {
reference_subnet_size: DEFAULT_REFERENCE_SUBNET_SIZE,
canister_creation_fee: Cycles::new(100_000_000_000),
Expand All @@ -451,13 +444,15 @@ impl CyclesAccountManagerConfig {
http_request_quadratic_baseline_fee: Cycles::new(60_000),
http_request_per_byte_fee: Cycles::new(400),
http_response_per_byte_fee: Cycles::new(800),
// This effectively disables the storage reservation mechanism on
// verified application subnets.
max_storage_reservation_period: Duration::from_secs(0),
max_storage_reservation_period: Duration::from_secs(300_000_000),
default_reserved_balance_limit: DEFAULT_RESERVED_BALANCE_LIMIT,
}
}

pub fn verified_application_subnet() -> Self {
Self::application_subnet()
}

/// All processing is free on system subnets
pub fn system_subnet() -> Self {
Self {
Expand Down
Loading

0 comments on commit 9df94b4

Please sign in to comment.