-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Draft BLAKE2b precompile EIP #131
Conversation
Free bitcoin to me.... Wonderful |
EIP editor here: Please tag with editor-needs-to-review when you feel it's ready to go. It is possible that the Metropolis EIPs serve the purpose of allowing Zcash header verification in Ethereum. @chriseth: Do the proposed metro EIPs related to zk-SNARKS make this EIP unnecessary? Also, please enable allow edits from maintainers. |
@Souptacular this is unrelated to zksnarks, but zksnarks might allow for speedups here. |
Please renumber as EIP-131 and update the filename and header, and we can accept this as a draft. |
EIPS/eip-9.md
Outdated
|
||
### Specification | ||
|
||
Adds a precompile at address `0x0000....0c` which accepts a variable length input interpreted as |
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.
Cannot this be written as just 0xc
?
EIPS/eip-9.md
Outdated
[OUTSIZE, D_1, D_2, ..., D_INSIZE] | ||
|
||
|
||
where `INSIZE` is the length in bytes of the input. Throws if `OUTSIZE` is greater than 64. Returns the `OUTSIZE`-byte BLAKE2b digest, as defined in [RFC 7693](https://tools.ietf.org/html/rfc7693). |
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.
Does INSIZE
refer to D_INSIZE
?
EIPS/eip-9.md
Outdated
|
||
Gas costs would be equal to `GBLAKEBASE + GBLAKEWORD * floor(INSIZE / 32)` | ||
|
||
In order to maintain backwards compatibility, the precompile will return `0` if `CURRENT_BLOCKNUM < METROPOLIS_FORK_BLKNUM` |
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.
What does return `0`
means? Call fails? Provided output memory is not touched?
I assume it is just a non-existent address before METROPOLIS_FORK_BLKNUM
and therefore it s a regular failure.
I think this should be updated with the missing fields from |
This is a courtesy notice to let you know that the format for EIPs has been modified slightly. If you want your draft merged, you will need to make some small changes to how your EIP is formatted:
If your PR is editing an existing EIP rather than creating a new one, this has already been done for you, and you need only rebase your PR. In addition, a continuous build has been setup, which will check your PR against the rules for EIP formatting automatically once you update your PR. This build ensures all required headers are present, as well as performing a number of other checks. Please rebase your PR against the latest master, and edit your PR to use the above format for frontmatter. For convenience, here's a sample header you can copy and adapt:
|
Closes #152. |
Please contribute to the discussion on this forum: https://ethereum-magicians.org/t/blake2b-f-precompile/3157/6 |
#2024 tries to merge this PR. If that is merged, this one should be closed. |
No description provided.