Skip to content

Commit

Permalink
P-chain state prune + height index (#1719)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrubabasu authored Aug 8, 2023
1 parent aea3183 commit d018679
Show file tree
Hide file tree
Showing 5 changed files with 356 additions and 13 deletions.
2 changes: 2 additions & 0 deletions vms/platformvm/config/execution_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var DefaultExecutionConfig = ExecutionConfig{
RewardUTXOsCacheSize: 2048,
ChainCacheSize: 2048,
ChainDBCacheSize: 2048,
BlockIDCacheSize: 8192,
ChecksumsEnabled: false,
}

Expand All @@ -27,6 +28,7 @@ type ExecutionConfig struct {
RewardUTXOsCacheSize int `json:"reward-utxos-cache-size"`
ChainCacheSize int `json:"chain-cache-size"`
ChainDBCacheSize int `json:"chain-db-cache-size"`
BlockIDCacheSize int `json:"block-id-cache-size"`
ChecksumsEnabled bool `json:"checksums-enabled"`
}

Expand Down
2 changes: 2 additions & 0 deletions vms/platformvm/config/execution_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func TestExecutionConfigUnmarshal(t *testing.T) {
"reward-utxos-cache-size": 5,
"chain-cache-size": 6,
"chain-db-cache-size": 7,
"block-id-cache-size": 8,
"checksums-enabled": true
}`)
ec, err := GetExecutionConfig(b)
Expand All @@ -56,6 +57,7 @@ func TestExecutionConfigUnmarshal(t *testing.T) {
RewardUTXOsCacheSize: 5,
ChainCacheSize: 6,
ChainDBCacheSize: 7,
BlockIDCacheSize: 8,
ChecksumsEnabled: true,
}
require.Equal(expected, ec)
Expand Down
31 changes: 31 additions & 0 deletions vms/platformvm/state/mock_state.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d018679

Please sign in to comment.