Skip to content

Commit

Permalink
feat: update state:history storage to 1:1
Browse files Browse the repository at this point in the history
This approach to balancing storage will not last long. We will implement
a more sophisticated approach in the near future.

Rather than trying to guess what the state:history ratio will be, we can
just look at it short term.

If we add in the data from block 21M + 6 months, then the ratio gets to
about 1:1. So technically we are still over-allocating for state right
this moment, but it gives us plenty of runway, and is close enough that
it shouldn't cause major problems.
  • Loading branch information
carver committed Oct 29, 2024
1 parent be4893e commit 15a8ca4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trin-storage/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct PortalStorageConfigFactory {

impl PortalStorageConfigFactory {
const HISTORY_CAPACITY_WEIGHT: u64 = 1;
const STATE_CAPACITY_WEIGHT: u64 = 99;
const STATE_CAPACITY_WEIGHT: u64 = 1;
const BEACON_CAPACITY_WEIGHT: u64 = 0; // Beacon doesn't care about given capacity

pub fn new(
Expand Down

0 comments on commit 15a8ca4

Please sign in to comment.