Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New proving algo with 8/56 split eager/lazy difficulty check #36

Merged
merged 14 commits into from
Apr 24, 2023

Conversation

poszu
Copy link
Collaborator

@poszu poszu commented Apr 19, 2023

Implementations of proving algorithms proposed by Wojtek:

  • 8/56 (eager 8bit and lazy 56bit)
  • 16/48
  • 32/32

The existing algorithm is renamed to 64/0.

Also added a benchmark under src/bin/prover.rs. Some results on different machines:
💡 speed means the speed of going through POST data assuming 16 parallel nonces.

i7-12700k:

[8/56]  speed: 2028 MiB/s
[16/48] speed: 2059 MiB/s
[32/32] speed: 1947 MiB/s
[64/0]  speed: 1361 MiB/s

Intel(R) Xeon(R) CPU E5-1410 v2 @ 2.80GHz

🟡 prod: 2014

[8/56]  speed: 745 MiB/s
[16/48] speed: 570 MiB/s
[32/32] speed: 342 MiB/s
[64/0]  speed: 263 MiB/s

M2

💡 Disabling AES HW support shows the theoretical speed up.

with AES HW support

[8/56]  speed: 1899 MiB/s
[16/48] speed: 2254 MiB/s
[32/32] speed: 1612 MiB/s
[64/0]  speed: 1283 MiB/s

AES HW support disabled

[8/56] speed: 177 MiB/s
[16/48] speed: 114 MiB/s
[32/32] speed: 57 MiB/s
[64/0] speed: 30 MiB/s

Ryzen 7950x

[8/56]  speed: 2840 MiB/s
[16/48] speed: 2330 MiB/s
[32/32] speed: 1854 MiB/s
[64/0]  speed: 1575 MiB/s

Intel(R) Celeron(R) CPU G3900 @ 2.80GHz

[8/56]  speed: 927 MiB/s
[16/48] speed: 928 MiB/s
[32/32] speed: 592 MiB/s
[64/0]  speed: 489 MiB/s

Intel(R) Pentium(R) Silver J5040 CPU @ 2.00GHz

[8/56]  speed: 663 MiB/s
[16/48] speed: 551 MiB/s
[32/32] speed: 389 MiB/s
[64/0]  speed: 319 MiB/s

@poszu poszu force-pushed the partial-proving-algos branch from 1a7edc8 to d75dd1e Compare April 19, 2023 11:26
@poszu poszu requested review from iddo333 and fasmat April 19, 2023 11:39
@poszu poszu changed the title Partial proving algos New proving algos with split eager/lazy hashing Apr 19, 2023
@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Merging #36 (81ac1c9) into main (7eb5839) will increase coverage by 1.2%.
The diff coverage is 97.4%.

@@           Coverage Diff           @@
##            main     #36     +/-   ##
=======================================
+ Coverage   96.6%   97.8%   +1.2%     
=======================================
  Files         12      12             
  Lines       1065    1213    +148     
=======================================
+ Hits        1029    1187    +158     
+ Misses        36      26     -10     
Impacted Files Coverage Δ
src/compression.rs 100.0% <ø> (ø)
src/verification.rs 96.4% <89.6%> (+4.5%) ⬆️
src/prove.rs 97.0% <99.4%> (+1.6%) ⬆️
src/cipher.rs 98.7% <100.0%> (+0.3%) ⬆️
src/difficulty.rs 100.0% <100.0%> (+7.6%) ⬆️
src/metadata.rs 88.8% <100.0%> (ø)
src/pow.rs 97.1% <100.0%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@poszu poszu marked this pull request as ready for review April 21, 2023 13:52
@poszu poszu changed the title New proving algos with split eager/lazy hashing New proving algo with 8/56 split eager/lazy hashing Apr 21, 2023
@poszu poszu changed the title New proving algo with 8/56 split eager/lazy hashing New proving algo with 8/56 split eager/lazy difficulty check Apr 21, 2023
@poszu poszu force-pushed the partial-proving-algos branch from a191fb1 to ccfc837 Compare April 24, 2023 09:28
@poszu poszu merged commit b29742e into main Apr 24, 2023
@poszu poszu deleted the partial-proving-algos branch April 24, 2023 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants