Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Use BigUint::modpow for ModExp precompile #11772

Merged
merged 3 commits into from
Jun 12, 2020
Merged

Conversation

vorot93
Copy link

@vorot93 vorot93 commented Jun 8, 2020

Switches ModExp precompile implementation to use BigUint::modpow, should be faster per #11714

@vorot93 vorot93 added the A0-pleasereview 🤓 Pull request needs code review. label Jun 8, 2020
Copy link
Collaborator

@ordian ordian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's not that different than the current implementation if the modulus is even
https://github.com/rust-num/num-bigint/blob/5e6c262cba681b0d88134cf4bf6d0630b98d8572/src/biguint.rs#L2646-L2652, maybe even slightly slower.
Please remove unused imports.

ethcore/builtin/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, modulo the unused imports.

@ordian ordian added A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jun 12, 2020
@vorot93 vorot93 merged commit 1165549 into master Jun 12, 2020
@vorot93 vorot93 deleted the vorot93/upstream-modexp branch June 12, 2020 15:55
dvdplm added a commit that referenced this pull request Jun 30, 2020
* master:
  Update parity-crypto dependency (#11791)
  ethcore/private-tcx: fix deadlock caused by conflicting lock order (#11764)
  Feature/publish draft release ci (#11786)
  Trigger custom docker build when adding ci-build-docker to the commit (#11782)
  Fix alpine docker image entry point (#11749)
  Use BigUint::modpow for ModExp precompile (#11772)
  Add YOLO-1 testnet (#11757)
  Upgrade num to 0.2, use enum-primitive-derive (#11636)
  Update Simple Subroutines to the latest spec  (#11731)
  update secret-store reference (#11761)
  Implementation of EIP 2537 (#11707)
  Add missing forks to fork ID (#11747)
  Use nightly tag for master branch (#11732)
dvdplm added a commit that referenced this pull request Jun 30, 2020
…ereum/openethereum into dp/chore/upgrade-to-rocksdb-0.14

* 'dp/chore/upgrade-to-rocksdb-0.14' of github.com:openethereum/openethereum:
  Update parity-crypto dependency (#11791)
  ethcore/private-tcx: fix deadlock caused by conflicting lock order (#11764)
  Feature/publish draft release ci (#11786)
  Trigger custom docker build when adding ci-build-docker to the commit (#11782)
  Fix alpine docker image entry point (#11749)
  Use BigUint::modpow for ModExp precompile (#11772)
  Add YOLO-1 testnet (#11757)
  Upgrade num to 0.2, use enum-primitive-derive (#11636)
  Update Simple Subroutines to the latest spec  (#11731)
  update secret-store reference (#11761)
  Implementation of EIP 2537 (#11707)
  Add missing forks to fork ID (#11747)
  Use nightly tag for master branch (#11732)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants