Skip to content

Feature/etcm 910 change modexp cost calculation#1013

Merged
dzajkowski merged 5 commits intodevelopfrom
feature/etcm-910-change-modexp-cost-calculation
Jun 23, 2021
Merged

Feature/etcm 910 change modexp cost calculation#1013
dzajkowski merged 5 commits intodevelopfrom
feature/etcm-910-change-modexp-cost-calculation

Conversation

@dzajkowski
Copy link
Copy Markdown
Contributor

ModExp cost calculation change and guard on current fork.

Comment thread src/test/scala/io/iohk/ethereum/vm/PrecompiledContractsSpec.scala Outdated
Comment thread src/main/scala/io/iohk/ethereum/vm/PrecompiledContracts.scala Outdated
Comment thread src/main/scala/io/iohk/ethereum/vm/PrecompiledContracts.scala Outdated
val expHead =
if (expLength <= lengthBytes)
expBytes.padToByteString(expLength, 0.toByte)
private def getMultComplexity(x: BigInt): BigInt = {
Copy link
Copy Markdown
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
Copy Markdown
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.

3 participants