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

Commit

Permalink
Add blake2_f precompile (#11017)
Browse files Browse the repository at this point in the history
* feat: implement eip1108

* doc nit: price per point pair

Co-Authored-By: David <dvdplm@gmail.com>

* fix: test-build

* fix: update chain specs

* fix: basic_authority.json chain spec

* fix: change `eip_transition == 0x7fffffffffffff`

* Merge na-eip1108

* Pre-compile plumbing

* Use type alias instead of struct

* Extract the data from incoming EVM call and forward it to blake2_f

* Fetch parity-common from git for now

* Fix broken cost impl
Add remaining test vectors

* cleanup

* Trailing comma in json spec

* Update ethcore/builtin/src/lib.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

* Update ethcore/builtin/src/lib.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

* Rename pricer to be Blake2-specific
Return a cost of u32::MAX if conversion fails
Fix docs and todos

* Fix error handling in cost()

* fix chainspec

* EIP-152 crate

* Update ethcore/builtin/src/lib.rs

Co-Authored-By: Seun LanLege <seunlanlege@gmail.com>

* Address grumbles

* Update ethcore/builtin/src/lib.rs

Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Switch tests to use hex!

* remove parity-crypto from git

* Sort out the SIGMA

* Prefer arrays to vecs

* Update util/EIP-152/src/lib.rs

Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Update json/src/spec/builtin.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

* Update json/src/spec/builtin.rs

Co-Authored-By: Andronik Ordian <write@reusable.software>

* Review feedback

* Do not change chainspecs yet

* Do not assume endianess: precompile output is LE
  • Loading branch information
dvdplm committed Sep 11, 2019
1 parent ffc2aa5 commit cfae6b9
Show file tree
Hide file tree
Showing 6 changed files with 594 additions and 106 deletions.
76 changes: 75 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion ethcore/builtin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ keccak-hash = "0.2.0"
log = "0.4"
num = { version = "0.1", default-features = false, features = ["bigint"] }
parity-bytes = "0.1"
eip-152 = { path = "../../util/EIP-152" }
parity-crypto = "0.4.0"
byteorder = "1.3.2"

[dev-dependencies]
rustc-hex = "1.0"
hex-literal = "0.2.1"
Loading

0 comments on commit cfae6b9

Please sign in to comment.