Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Generate PoH as fast as possible #6519

Closed
mvines opened this issue Oct 23, 2019 · 6 comments
Closed

Generate PoH as fast as possible #6519

mvines opened this issue Oct 23, 2019 · 6 comments
Assignees
Milestone

Comments

@mvines
Copy link
Contributor

mvines commented Oct 23, 2019

Our current PoH generation is believed to be much slower than what the CPU can actually do, exposing various possible attacks. We need to ensure we're hashing as fast as possible.

cc: https://github.com/sakridge/asm-hashes
cc: https://github.com/sakridge/hashes

@garious
Copy link
Contributor

garious commented Dec 10, 2019

Any news here?

@sakridge
Copy link
Contributor

The sha2 fork will probably not merge my PR, they don't like binary blobs in general RustCrypto/asm-hashes#9

There is a pure Rust PR using rust intrinsics but it's ~30% slower for Poh generation and it probably won't be merged for a while: RustCrypto/hashes#90

@mvines wanted to vendor the relevant code, that's a bit of work though. Need to find time to do it..

@ryoqun
Copy link
Contributor

ryoqun commented Jan 27, 2020

@sakridge They recently merged a PR supporting the AArch64 counterparts of sha256 CPU extension support: RustCrypto/asm-hashes#10. Maybe we could rewrite our PR in asm from intrinsics and use that PR as a precedent to get merged. :)

@mvines mvines modified the milestones: Rincon v0.24.0, v0.25.0 Feb 20, 2020
@sakridge
Copy link
Contributor

sakridge commented Mar 8, 2020

@sakridge They recently merged a PR supporting the AArch64 counterparts of sha256 CPU extension support: RustCrypto/asm-hashes#10. Maybe we could rewrite our PR in asm from intrinsics and use that PR as a precedent to get merged. :)

Yea. I see. Weird that they don't mind assembly but don't like the intrinsics version.

@mvines mvines modified the milestones: v1.1.0, v1.2.0 Mar 16, 2020
@mvines mvines modified the milestones: v1.2.0, The Future! Apr 19, 2020
@jon-chuang
Copy link
Contributor

Will validators using multicore CPUs be utilising optimised assembly too?

@sakridge
Copy link
Contributor

Fixed by #14746

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants