Skip to content

Bug/etcm 797#974

Merged
dzajkowski merged 7 commits intodevelopfrom
bug/ETCM-797
Apr 26, 2021
Merged

Bug/etcm 797#974
dzajkowski merged 7 commits intodevelopfrom
bug/ETCM-797

Conversation

@bsuieric
Copy link
Copy Markdown
Contributor

Description

https://jira.iohk.io/browse/ETCM-797

Proposed Solution

calculate start epoch block, and calculate seed based on the epoch length and start epoch block

@bsuieric bsuieric requested a review from dzajkowski April 26, 2021 14:02
Comment thread src/main/scala/io/iohk/ethereum/jsonrpc/DebugService.scala Outdated
Comment thread src/main/scala/io/iohk/ethereum/jsonrpc/DebugService.scala Outdated
Comment thread src/main/scala/io/iohk/ethereum/consensus/pow/EthashUtils.scala Outdated
Comment thread src/main/scala/io/iohk/ethereum/consensus/pow/EthashDAGManager.scala Outdated
Comment thread src/main/scala/io/iohk/ethereum/jsonrpc/DebugJsonMethodsImplicits.scala Outdated
val seedEpoch0 = ByteStringUtils.string2hash("0000000000000000000000000000000000000000000000000000000000000000")
val seedEpoch1 = ByteStringUtils.string2hash("290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563")
val seedEpoch382 = ByteStringUtils.string2hash("d3d0aa11197dcdcfcb3ad3c73d415af47299bddb47fda6081d31d9dd06462f6a")
val seedEpoch383 = ByteStringUtils.string2hash("bf532874eb434842e7a3e4acd113fe454541651872760d9b95d11d7f90ca25dc")
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.

where did these hashes come from? maybe this would be a good inspiration https://github.com/iquidus/ecip-1099-data ?

Copy link
Copy Markdown
Contributor

@jvdp jvdp Apr 26, 2021

Choose a reason for hiding this comment

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

These are the seeds that correspond to the blocks, calculated with the Mantis code found to be working properly (valid blocks are valid.)

But the strings themselves are not so interesting for the purposes of this bug, just that they are the same across different blocks within a (ECIP-1099) epoch. (For the implementation itself the hashes are important of course.)

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.

(Also, the hash being all zeroes for epoch 0 is a good sign?)

Copy link
Copy Markdown
Contributor

@dzajkowski dzajkowski left a comment

Choose a reason for hiding this comment

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

Please remove the "debug_" endpoint. We can groom it and bring it in properly.

@dzajkowski dzajkowski merged commit c38c2c2 into develop Apr 26, 2021
@dzajkowski dzajkowski deleted the bug/ETCM-797 branch April 26, 2021 16:47
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