Skip to content

Conversation

@dzajkowski
Copy link
Contributor

ModExp cost calculation change and guard on current fork.

val expHead =
if (expLength <= lengthBytes)
expBytes.padToByteString(expLength, 0.toByte)
private def getMultComplexity(x: BigInt): BigInt = {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe a comment explaining all those numbers? I wouldn't know how to change that piece because I don't know where all those numbers are coming from

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hence the name of the object (PostEIP198Cost). I can quote the EIP but I think this is too complex to just explain away in a comment - it needs to be read at the source. I'll add a link to the EIPs though.

@dzajkowski dzajkowski force-pushed the feature/etcm-910-change-modexp-cost-calculation branch from 31f1f47 to 8f29db1 Compare June 23, 2021 07:46
@dzajkowski dzajkowski merged commit 17e68c3 into develop Jun 23, 2021
@dzajkowski dzajkowski deleted the feature/etcm-910-change-modexp-cost-calculation branch June 23, 2021 09:11
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.

4 participants