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

Question on SHA3 #31

Closed
axic opened this issue Nov 22, 2015 · 2 comments
Closed

Question on SHA3 #31

axic opened this issue Nov 22, 2015 · 2 comments

Comments

@axic
Copy link
Member

axic commented Nov 22, 2015

This is probably a bad place to ask this, but I don't seem to find anything related on the interwebs.

Back in Feb 2014 it was announced by @vbuterin that all crypto opcodes will be moved to pre-mined contracts. See here and here.

sha256, ripemd160 and ecrecover since have been moved to such contracts, but sha3 remained as an opcode.

The yellow paper defines separate gas costs for all of them, although in different places. For sha3 it is in Appendix G (Fee Schedule), while the others are explained in Appendix E (Precompiled Contracts).

Is there any memo somewhere explaining the design decisions leading to the current state?

@wanderer
Copy link
Member

I think its one of those things that slipped through the cracks. RIPEMD160, SHA256, ecRecover where all opcodes at one point.

@vbuterin
Copy link
Contributor

I think sha3 remained as an opcode essentially because it was deemed "important" enough (eg. infinite data structures in solidity and serpent use it) that putting it into a contract would be far too inefficient.

bumblefudge pushed a commit to bumblefudge/EIPs that referenced this issue Feb 16, 2024
solana: Change CAIP-122 spec to be similar to eip155 one
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

No branches or pull requests

3 participants