Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

BLAKE2b Implementation in Pantheon for Istanbul Hard Fork #19

Closed
shemnon opened this issue Jun 24, 2019 · 14 comments
Closed

BLAKE2b Implementation in Pantheon for Istanbul Hard Fork #19

shemnon opened this issue Jun 24, 2019 · 14 comments

Comments

@shemnon
Copy link

shemnon commented Jun 24, 2019

Description

As part of the Istanbul network upgrade, BLAKE2b support will be added to Ethereum.

This bounty is to implement a BLAKE2b precompile as part of Pantheon that conforms to the specification in EIP-131 (as specified in this Github PR link) as required for the Istanbul Hard fork EIP-1679.

Note: if you wish to work on this bounty for the hackathon, please comment on the Github issue so that others know you are working on it.

The implementations should use a coding style consistent with the rest of Pantheon. Please see our Contribution Guidelines for more information, along with the following classes for reference:

  • The RipeMD precompiled contract is expected to have a similar pattern: Github search results
  • The BouncyCastle library has a Blake2bDigest that may be of use implementing the EIP. Bouncy Castle has a MIT style license and is compatible with our Apache 2.0 license. Be sure to attribute authorship and point to the relevant license when copying code.

Submission Requirements

  • Implementation of a BLAKE2b precompile as part of Pantheon which is compliant with EIP-131 (also possibly known under the numbers 2129 and 2024) and the requirements for the Istanbul network upgrade.
  • Unit test code to validate correct behavior.
  • Integration test to demonstrate correct behavior.
  • Passes all reference tests for the Blake 2b precompiles in the Ethereum reference tests, if they are available prior to the submission deadline.
  • All libraries and dependencies must use Apache 2.0 friendly licenses
  • A demo.md file that explains how PegaSys engineers can verify that the code works as intended, ideally without the use of 3rd party tools.

Submission Deadline: July 10th

Judging Criteria

The bounty will be awarded to the best submission based on compliance the EIP specification, code and testing quality, compliance with Contribution Guidelines, performance speed, maintenance burdens, and the Submission Requirements above, according to PegaSys.

Judging Date: July 12th

Bounty: 1000 DAI

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1000.0 DAI (1000.0 USD @ $1.0/DAI) attached to it as part of the PegaSysEng fund.

@atoulme
Copy link

atoulme commented Jun 26, 2019

I'll look at implementing this functionality, if you'll have me.

@gitcoinbot
Copy link

gitcoinbot commented Jun 26, 2019

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 1 week, 5 days from now.
Please review their action plans below:

1) iikirilov has started work.

Read the EIP
Implement the precompile
Write tests
Profit
2) adhikasp has started work.

  • Read EIP
  • Read existing Pantheon codebase
  • Implement Blake2b to crypto/Hash module
  • Write tests
    3) ramanan12345 has started work.

Work with github
Study
Whether is it possible solve

Learn more on the Gitcoin Issue Details page.

@timbeiko
Copy link
Contributor

@atoulme this bounty is part of the ongoing Gitcoin hackathon. Anyone is free to start working on it, but the bounty will only be awarded to the winning implementation at the end of the hackathon.

@iikirilov
Copy link

iikirilov commented Jun 26, 2019

@timbeiko I'm a bit confused here. Is the aim do a blake2b precompile or a blake2b f compression precompile?

From what I understand it is the latter - as the other PR is closed...

@shemnon
Copy link
Author

shemnon commented Jun 26, 2019

It's the Compression Function F precompile, this PR will update EIP-131 - https://github.com/ethereum/EIPs/pull/2129/files

@mhluongo
Copy link

mhluongo commented Jul 4, 2019

To be clear the correct EIP number for the F precompile is EIP-152!

https://github.com/ethereum/EIPs/pull/2129/files

@timbeiko
Copy link
Contributor

timbeiko commented Jul 4, 2019

@mhluongo yours and @shemnon's link are pointing to the same PR. Did the EIP number just change? cc: @iikirilov

@iikirilov
Copy link

iikirilov commented Jul 8, 2019

EIP-152 is the successor of EIP-131 as stated in ethereum/EIPs#131 (comment)

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 1000.0 DAI (1000.0 USD @ $1.0/DAI) has been submitted by:

  1. @iikirilov

@alexvotofuture please take a look at the submitted work:


@shemnon
Copy link
Author

shemnon commented Jul 12, 2019

Because completion of the hack was impossible (specifically the Gas calculation has not been specified in the EIP) we have decided to offer a compromise prize. @iikirilov submitted the most complete solution, and that solution has the hardest part of the EIP complete: an implementation of the F compression function. We will award half the hackathon bounty now based on that work. Once the EIP is complete @iikirilov can submit a completed implementation ready for integration for the second half of the prize.

@gitcoinbot
Copy link

⚡️ A tip worth 500.00000 DAI (500.0 USD @ $1.0/DAI) has been granted to @iikirilov for this issue from @alexvotofuture. ⚡️

Nice work @iikirilov! Your tip has automatically been deposited in the ETH address we have on file.

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This Bounty has been completed.

Additional Tips for this Bounty:

  • alexvotofuture tipped 500.0000 DAI worth 500.0 USD to iikirilov.

@gitcoinbot
Copy link

⚡️ A tip worth 500.00000 DAI (500.0 USD @ $1.0/DAI) has been granted to @iikirilov for this issue from @alexvotofuture. ⚡️

Nice work @iikirilov! Your tip has automatically been deposited in the ETH address we have on file.

@shemnon shemnon closed this as completed Sep 16, 2019
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

6 participants