-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
EIP-213 precompiles for BN128 addition and scalar multiplication #924
Conversation
Implementation of ethereum/EIPs#213 |
// spend all gas on failure, push zero and revert state changes | ||
this.refundGas(0, "call pre-compiled"); | ||
this.stackPushZero(); | ||
track.rollback(); |
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.
M.b. refactor PrecompiledContract
a bit and make it similar to regular call, I.e. leave only execute()
there and throw OGException
if not enough gas for supplied data, and other custom exceptions if invalid data supplied (there you can supply a detailed description on why the call failed) ?
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.
Good idea, but let's do refactoring out of this PR. I spawned related issue #926 for that
Conflicts: ethereumj-core/src/main/java/org/ethereum/vm/program/Program.java
No description provided.