Skip to content

Conversation

tsahee
Copy link
Contributor

@tsahee tsahee commented Oct 3, 2022

recording fixes.
If replay uses state.NewDeterministic, PrepareRecording can be called with validateDeleted = false. Otherwise true is required (will collect more preimages)

usedStorage = append(usedStorage, common.CopyBytes(key[:])) // Copy needed for closure
}
if len(keysToDelete) > 0 {
sort.Slice(keysToDelete, func(i, j int) bool { return keysToDelete[i].big.Cmp(keysToDelete[j].big) < 0 })
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can directly compare common.Hashs as they're a [32]byte right? It's worth a try to simplify this I think.

for addr := range s.stateObjectsPending {
addressesToUpdate = append(addressesToUpdate, addressAndBig{addr, addr.Hash().Big()})
}
sort.Slice(addressesToUpdate, func(i, j int) bool { return addressesToUpdate[i].big.Cmp(addressesToUpdate[j].big) < 0 })
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing here, I think we can directly compare addresses

PlasmaPower
PlasmaPower previously approved these changes Oct 3, 2022
Copy link
Contributor

@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

Not enough to fix recordings.
Specifically, for arbone block 27,199,859
Copy link
Contributor

@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 9da94bd into master Oct 5, 2022
@PlasmaPower PlasmaPower deleted the recording-fixes branch October 5, 2022 03:58
@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