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

limit unrolling when searching for a snapshot. #159

Merged
merged 3 commits into from
Oct 19, 2022

Conversation

tsahee
Copy link
Contributor

@tsahee tsahee commented Sep 2, 2022

Unrolling to find snapshot could save a lot of time avoiding the need to regenerate it, but it could also force a too-long rewind which is just not worth it. Allow user to set a gas-limit to decide.

@tsahee tsahee marked this pull request as draft September 2, 2022 17:06
@tsahee tsahee closed this Sep 6, 2022
@tsahee tsahee deleted the snapshot_rollback_configurable branch September 6, 2022 21:03
@PlasmaPower PlasmaPower restored the snapshot_rollback_configurable branch October 14, 2022 13:43
@@ -618,6 +632,14 @@ func (bc *BlockChain) setHeadBeyondRoot(head uint64, root common.Hash, repair bo
log.Debug("Rewound to block with state", "number", newHeadBlock.NumberU64(), "hash", newHeadBlock.Hash())
break
}
if lastFullBlock != 0 && rewindLimit > 0 {
gasRolledBack += newHeadBlock.GasUsed()
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to subtract out the gas used for L1 in receipts for arbitrum

@tsahee tsahee reopened this Oct 18, 2022
@tsahee tsahee marked this pull request as ready for review October 18, 2022 00:34
Copy link
Collaborator

@PlasmaPower PlasmaPower left a comment

Choose a reason for hiding this comment

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

LGTM

@PlasmaPower PlasmaPower merged commit d15f2be into master Oct 19, 2022
@PlasmaPower PlasmaPower deleted the snapshot_rollback_configurable branch October 19, 2022 18:14
@Tristan-Wilson Tristan-Wilson mentioned this pull request Feb 28, 2023
13 tasks
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