diff --git a/src/Native/libmeowpow/ethash/ethash.cpp b/src/Native/libmeowpow/ethash/ethash.cpp index 9f3236535..3ae4bb818 100644 --- a/src/Native/libmeowpow/ethash/ethash.cpp +++ b/src/Native/libmeowpow/ethash/ethash.cpp @@ -24,10 +24,13 @@ namespace ethash constexpr static int light_cache_init_size = 1 << 24; constexpr static int light_cache_growth = 1 << 17; constexpr static int light_cache_rounds = 3; - constexpr static int full_dataset_init_size = 1 << 30; + constexpr static unsigned int full_dataset_init_size = 1U << 30; constexpr static int full_dataset_growth = 1 << 23; constexpr static int full_dataset_item_parents = 512; + //MeowPow Dag Change + constexpr static int meowpow_dagchange_epoch = 110; + // Verify constants: static_assert(sizeof(hash512) == ETHASH_LIGHT_CACHE_ITEM_SIZE, ""); static_assert(sizeof(hash1024) == ETHASH_FULL_DATASET_ITEM_SIZE, ""); @@ -135,8 +138,15 @@ namespace ethash static_assert(sizeof(epoch_context_full) < sizeof(hash512), "epoch_context too big"); static constexpr size_t context_alloc_size = sizeof(hash512); - const int light_cache_num_items = calculate_light_cache_num_items(epoch_number); - const int full_dataset_num_items = calculate_full_dataset_num_items(epoch_number); + int meow_epoch = epoch_number; + if (epoch_number >= meowpow_dagchange_epoch) + { + // note, int truncates, it doesnt round, 10 == 10.5. So this is ok. + meow_epoch = epoch_number*4; //This should pass 4gb DAG size + } + + const int light_cache_num_items = calculate_light_cache_num_items(meow_epoch); + const int full_dataset_num_items = calculate_full_dataset_num_items(meow_epoch); const size_t light_cache_size = get_light_cache_size(light_cache_num_items); const size_t full_dataset_size = full ? static_cast(full_dataset_num_items) * sizeof(hash1024) : progpow::l1_cache_size; diff --git a/src/Native/libmeowpow/libmeowpow.sln b/src/Native/libmeowpow/libmeowpow.sln index 2482e1109..75ca31b13 100644 --- a/src/Native/libmeowpow/libmeowpow.sln +++ b/src/Native/libmeowpow/libmeowpow.sln @@ -1,31 +1,31 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31229.75 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmultihash", "libmeowpow.vcxproj", "{2DE74E14-BF6D-4046-951B-8EBC8A1BA009}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x64.ActiveCfg = Debug|x64 - {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x64.Build.0 = Debug|x64 - {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x86.ActiveCfg = Debug|Win32 - {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Debug|x86.Build.0 = Debug|Win32 - {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x64.ActiveCfg = Release|x64 - {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x64.Build.0 = Release|x64 - {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x86.ActiveCfg = Release|Win32 - {2DE74E14-BF6D-4046-951B-8EBC8A1BA009}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {DDE0FE54-030A-4DFD-98A1-952779FB461F} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31229.75 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmeowpow", "libmeowpow.vcxproj", "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Debug|x64.ActiveCfg = Debug|x64 + {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Debug|x64.Build.0 = Debug|x64 + {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Debug|x86.ActiveCfg = Debug|Win32 + {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Debug|x86.Build.0 = Debug|Win32 + {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Release|x64.ActiveCfg = Release|x64 + {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Release|x64.Build.0 = Release|x64 + {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Release|x86.ActiveCfg = Release|Win32 + {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DDE0FE54-030A-4DFD-98A1-952779FB461F} + EndGlobalSection +EndGlobal diff --git a/src/Native/libmeowpow/libmeowpow.vcxproj b/src/Native/libmeowpow/libmeowpow.vcxproj index f337e3f63..e1ab04e1d 100644 --- a/src/Native/libmeowpow/libmeowpow.vcxproj +++ b/src/Native/libmeowpow/libmeowpow.vcxproj @@ -1,206 +1,206 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942} - Win32Proj - netmultihashnative - 10.0 - libmeowpow - - - - DynamicLibrary - true - v142 - Unicode - - - DynamicLibrary - false - v142 - true - Unicode - - - DynamicLibrary - true - v142 - Unicode - - - DynamicLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)\..\..\..\..\boost_1_62_0;$(ProjectDir)windows\include\libsodium;$(IncludePath);$(ProjectDir) - $(SolutionDir)\..\..\..\..\boost_1_62_0\lib32-msvc-14.0;$(LibraryPath) - - - true - $(SolutionDir)\..\..\..\..\boost_1_62_0;$(ProjectDir)windows\include\libsodium;$(IncludePath);$(ProjectDir) - $(SolutionDir)\..\..\..\..\boost_1_62_0\lib64-msvc-14.0;$(ProjectDir)windows\lib\x64;$(LibraryPath) - - - false - $(SolutionDir)\..\..\..\..\boost_1_62_0;$(ProjectDir)windows\include\libsodium;$(IncludePath);$(ProjectDir) - $(SolutionDir)\..\..\..\..\boost_1_62_0\lib32-msvc-14.0;$(LibraryPath) - - - false - $(SolutionDir)\..\..\..\..\boost_1_62_0;$(ProjectDir)windows\include\libsodium;$(ProjectDir)windows\include\libsodium;$(IncludePath);$(ProjectDir) - $(SolutionDir)\..\..\..\..\boost_1_62_0\lib64-msvc-14.0;$(LibraryPath) - - - - - - Level3 - Disabled - SODIUM_STATIC;_CRT_SECURE_NO_WARNINGS - true - MultiThreadedDebug - stdcpp14 - - - Windows - true - Ws2_32.lib;%(AdditionalDependencies) - - - - - - - Level3 - Disabled - SODIUM_STATIC;_CRT_SECURE_NO_WARNINGS - true - MultiThreadedDebug - stdcpp14 - - - Windows - true - Ws2_32.lib;%(AdditionalDependencies) - - - - - - - Level3 - MaxSpeed - true - true - SODIUM_STATIC;_CRT_SECURE_NO_WARNINGS - true - MultiThreaded - stdcpp14 - - - Windows - true - true - true - Ws2_32.lib;%(AdditionalDependencies) - - - - - - - Level3 - MaxSpeed - true - true - SODIUM_STATIC;_CRT_SECURE_NO_WARNINGS - true - MultiThreaded - stdcpp14 - - - Windows - true - true - true - Ws2_32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942} + Win32Proj + netmultihashnative + 10.0 + libmeowpow + + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + $(SolutionDir)\..\..\..\..\boost_1_62_0;$(ProjectDir)windows\include\libsodium;$(IncludePath);$(ProjectDir) + $(SolutionDir)\..\..\..\..\boost_1_62_0\lib32-msvc-14.0;$(LibraryPath) + + + true + $(SolutionDir)\..\..\..\..\boost_1_62_0;$(ProjectDir)windows\include\libsodium;$(IncludePath);$(ProjectDir) + $(SolutionDir)\..\..\..\..\boost_1_62_0\lib64-msvc-14.0;$(ProjectDir)windows\lib\x64;$(LibraryPath) + + + false + $(SolutionDir)\..\..\..\..\boost_1_62_0;$(ProjectDir)windows\include\libsodium;$(IncludePath);$(ProjectDir) + $(SolutionDir)\..\..\..\..\boost_1_62_0\lib32-msvc-14.0;$(LibraryPath) + + + false + $(SolutionDir)\..\..\..\..\boost_1_62_0;$(ProjectDir)windows\include\libsodium;$(ProjectDir)windows\include\libsodium;$(IncludePath);$(ProjectDir) + $(SolutionDir)\..\..\..\..\boost_1_62_0\lib64-msvc-14.0;$(LibraryPath) + + + + + + Level3 + Disabled + SODIUM_STATIC;_CRT_SECURE_NO_WARNINGS + true + MultiThreadedDebug + stdcpp14 + + + Windows + true + Ws2_32.lib;%(AdditionalDependencies) + + + + + + + Level3 + Disabled + SODIUM_STATIC;_CRT_SECURE_NO_WARNINGS + true + MultiThreadedDebug + stdcpp14 + + + Windows + true + Ws2_32.lib;%(AdditionalDependencies) + + + + + + + Level3 + MaxSpeed + true + true + SODIUM_STATIC;_CRT_SECURE_NO_WARNINGS + true + MultiThreaded + stdcpp14 + + + Windows + true + true + true + Ws2_32.lib;%(AdditionalDependencies) + + + + + + + Level3 + MaxSpeed + true + true + SODIUM_STATIC;_CRT_SECURE_NO_WARNINGS + true + MultiThreaded + stdcpp14 + + + Windows + true + true + true + Ws2_32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file