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

EIP-213 precompiles for BN128 addition and scalar multiplication #924

Merged
merged 6 commits into from
Aug 30, 2017

Conversation

mkalinin
Copy link
Contributor

No description provided.

@mkalinin
Copy link
Contributor Author

Implementation of ethereum/EIPs#213
Relates to #923

@mkalinin mkalinin mentioned this pull request Aug 28, 2017
13 tasks
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 57.456% when pulling f82d16a on eip-213 into a8b94f7 on develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 57.591% when pulling cedfc93 on eip-213 into a8b94f7 on develop.

// spend all gas on failure, push zero and revert state changes
this.refundGas(0, "call pre-compiled");
this.stackPushZero();
track.rollback();
Copy link
Member

@Nashatyrev Nashatyrev Aug 29, 2017

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) ?

Copy link
Contributor Author

@mkalinin mkalinin Aug 30, 2017

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
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 57.56% when pulling cda227b on eip-213 into 037958d on develop.

@Nashatyrev Nashatyrev merged commit 529a546 into develop Aug 30, 2017
@mkalinin mkalinin deleted the eip-213 branch December 26, 2018 06:34
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

Successfully merging this pull request may close these issues.

3 participants