Skip to content

Commit

Permalink
Feature/log halfpath conversion (#7051)
Browse files Browse the repository at this point in the history
  • Loading branch information
asdacap authored May 20, 2024
1 parent d781283 commit c86dbe9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Nethermind/Nethermind.Blockchain/FullPruning/FullPruner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,16 @@ private async Task CopyTrie(IPruningContext pruning, Hash256 stateRoot, Cancella
targetNodeStorage.Scheme = INodeStorage.KeyScheme.HalfPath;
}

if (originalKeyScheme == INodeStorage.KeyScheme.Hash && targetNodeStorage.Scheme == INodeStorage.KeyScheme.HalfPath)
{
if (_logger.IsInfo) _logger.Info($"Converting from Hash key scheme to HalfPath key scheme");

if (_pruningConfig.FullPruningMemoryBudgetMb < 8000)
{
if (_logger.IsWarn) _logger.Warn($"Full pruning memory budget is less than 8 GB. Full pruning from Hash to HalfPath require more memory budget for efficient copy. Consider increasing full pruning memory budget to at least 8GB.");
}
}

VisitingOptions visitingOptions = new()
{
MaxDegreeOfParallelism = _pruningConfig.FullPruningMaxDegreeOfParallelism,
Expand Down

0 comments on commit c86dbe9

Please sign in to comment.