Skip to content

Commit

Permalink
Add comment explaining why resetObjectChange dirtied returns nil
Browse files Browse the repository at this point in the history
  • Loading branch information
PlasmaPower committed Nov 21, 2023
1 parent d893229 commit d8a4531
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/state/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ func (ch resetObjectChange) revert(s *StateDB) {
}

func (ch resetObjectChange) dirtied() *common.Address {
// Arbitrum: We keep the behavior that existed before go-ethereum v1.12.1 and return nil,
// instead of returning the reset address as upstream go-ethereum v1.12.1 does.
// That's because, unlike for go-ethereum, whether this account is dirty or not is relevant for Arbitrum.
// Arbitrum hooks manipulate the state in some ways that go-ethereum doesn't which cause that relevance,
// e.g. subtracting balance from an account that hasn't been otherwise touched.
// See https://github.com/OffchainLabs/nitro/pull/1976 for details
return nil
}

Expand Down

0 comments on commit d8a4531

Please sign in to comment.