Conversation
| val epoch = EthashUtils.epoch(parentBlock.header.number.toLong + 1) | ||
|
|
||
| val blockNumber = parentBlock.header.number.toLong + 1 | ||
| val epoch = EthashUtils.epoch(blockNumber, blockCreator.blockchainConfig.ecip1099BlockNumber.toLong) |
There was a problem hiding this comment.
why not accepting BigInt there? I mean - if domain uses BigInt for block numbers, why shouldn't miner?
There was a problem hiding this comment.
Because we are using only Longs in EthashUtils. I am not sure if we do that because of performance or sth else, but I don't want to change that in this pr.
|
|
||
| # Epoch calibration block number | ||
| # https://ecips.ethereumclassic.org/ECIPs/ecip-1099 | ||
| ecip1099-block-number = "2520000" |
There was a problem hiding this comment.
this has already been reached on Mordor, right? Have we synced and try it there already?
There was a problem hiding this comment.
Good point. I will sync with the Mordor before the merge
| val data = new PowCacheData(cache = EthashUtils.makeCache(epoch, seed), dagSize = EthashUtils.dagSize(epoch)) | ||
|
|
||
| val keys = powCaches.keySet().asScala | ||
| val keysToRemove = keys.toSeq.sorted.take(keys.size - MaxPowCaches + 1) |
There was a problem hiding this comment.
I wonder if it won't make problems during transition. i.e
- lets say we have epoch
358and359here. - we enter fork block
ecip-1099so next epoch is180instead of360 - so we put dag cache for this epoch in cache, and we have there dag for epoch
180and359(as we have limit of 2 dag caches max, and we always removes oldest one) - after some blocks we arive at epoch
181. And now we will remove dag cache for epoch180instead on359.
It means dag dag cache for epoch359will be with us for long time (until we get to new epoch360), and if rollbacks happen accross new epoch boundaries we will need to recreate dag caches. (we have one stale in there, and we have max size of 2 dag caches )
There was a problem hiding this comment.
You're right. I fixed that
|
@jmendiola222, I synced with the Mordor top |
Description
https://ecips.ethereumclassic.org/ECIPs/ecip-1099