-
Notifications
You must be signed in to change notification settings - Fork 130
[Hackathon] Blake2b f compression precompile #1614
Conversation
c8664fa
to
c32274d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable so far.
.../main/java/tech/pegasys/pantheon/ethereum/mainnet/precompiles/BLAKE2fPrecompileContract.java
Outdated
Show resolved
Hide resolved
...t/java/tech/pegasys/pantheon/ethereum/mainnet/precompiles/BLAKE2fPrecompileContractTest.java
Outdated
Show resolved
Hide resolved
...t/java/tech/pegasys/pantheon/ethereum/mainnet/precompiles/BLAKE2fPrecompileContractTest.java
Outdated
Show resolved
Hide resolved
56d68dd
to
2d5c73d
Compare
2d5c73d
to
e4fecfa
Compare
This PR has passed the deadline for the hackathon period but it is still incomplete.
I have the capacity to follow up on this should that be requested by the reviewer. |
e4fecfa
to
d722745
Compare
The gas cost appears to be specified in ethereum/EIPs#2129. While this is still open the got some positive feedback on the All Core Devs call. Can you finish the gas cost calculations and function registration based on these values? |
@shemnon you will find that the gas requirement method already reflects this. Should this be abstracted to the |
No need to bring it into frontier. You listed some other TODOs -
For 1 this task is outstanding. |
d722745
to
f33393c
Compare
I have addressed the above. Waiting for the tests cases to be updated and we should be good to go. |
*represent uint as long for safe mod and comparison operation. Using UnsignedInts.remainder(divedent, divisor) converts int to long for each round. *use BC Pack utils for long <-> bytes
3e838d0
to
cecadd3
Compare
PR description
Introduces the Blake2b F compression function as a precompile in Pantheon as specified in ethereum/EIPs#2129
Using the test vectors from https://github.com/keep-network/go-ethereum/blob/f-precompile/core/vm/contracts_test.go#L350
Implementation of Blake2b F compression function ported from https://github.com/keep-network/blake2 (BSD license)
Fixed Issue(s)
Consensys/protocol-BountiedWork#19