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

Commit

Permalink
Merge branch 'dp/feature/eip-152-add-blake2-precompile' of github.com…
Browse files Browse the repository at this point in the history
…:paritytech/parity-ethereum into dp/feature/eip-152-add-blake2-precompile

* 'dp/feature/eip-152-add-blake2-precompile' of github.com:paritytech/parity-ethereum:
  Update json/src/spec/builtin.rs
  Update json/src/spec/builtin.rs
  Update util/EIP-152/src/lib.rs
  • Loading branch information
dvdplm committed Sep 4, 2019
2 parents 362bd90 + ad61a15 commit 5818117
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions json/src/spec/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use uint::Uint;

/// Pricing for Blake2 compression function: each call costs the same amount per round.
/// Price per round of Blake2 compression.
pub type Blake2F = u64;

/// Linear pricing.
Expand Down Expand Up @@ -68,7 +68,7 @@ pub struct AltBn128Pairing {
#[serde(deny_unknown_fields)]
#[serde(rename_all = "snake_case")]
pub enum Pricing {
/// Fixed pricing.
/// Pricing for Blake2 compression function: each call costs the same amount per round.
Blake2F(Blake2F),
/// Linear pricing.
Linear(Linear),
Expand Down
2 changes: 1 addition & 1 deletion util/EIP-152/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub fn compress(h: &mut [u64; 8], m: [u64; 16], t: [u64; 2], f: bool, rounds: us
v[13] ^= t[1];

if f {
v[14] = !v[14] // Invert all bits is the last-block-flag is set.
v[14] = !v[14] // Invert all bits if the last-block-flag is set.
}
for i in 0..rounds {
// Message word selection permutation for this round.
Expand Down

0 comments on commit 5818117

Please sign in to comment.