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

[ETCM-17] Implements blak2b compress #649

Merged
merged 5 commits into from
Aug 27, 2020

Conversation

KonradStaniec
Copy link
Contributor

@KonradStaniec KonradStaniec requested a review from mmrozek August 27, 2020 09:54
@KonradStaniec KonradStaniec force-pushed the etcm-17-blake2-pre-compile branch from 3374b76 to 28789a9 Compare August 27, 2020 09:57
private def bytesToLong(bytes: Array[Byte]) = Pack.littleEndianToLong(bytes, 0)

def isValidInput(input: Array[Byte]): Boolean= {
if (input.length != MessageBytesLength || (input(212) & 0xFE) != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just def isValidInput(input: Array[Byte]): Boolean = !(input.length != MessageBytesLength || (input(212) & 0xFE) != 0) ?

@@ -37,6 +39,10 @@ object PrecompiledContracts {
Bn128MulAddr -> Bn128Mul,
Bn128PairingAddr -> Bn128Pairing
)

val istanbulPhoenisContracts = byzantiumAtlantisContracts ++ Map(
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: typo: istanbulPhoenixContracts

Copy link
Contributor

@mmrozek mmrozek left a comment

Choose a reason for hiding this comment

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

LGTM!

@KonradStaniec KonradStaniec merged commit 362b99c into phase/etc_forks Aug 27, 2020
@KonradStaniec KonradStaniec deleted the etcm-17-blake2-pre-compile branch August 27, 2020 13:27
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.

2 participants