Skip to content

core, core/state: fixed consensus issue added touch revert#3341

Merged
fjl merged 2 commits into
ethereum:masterfrom
obscuren:touch-delete-fix
Nov 24, 2016
Merged

core, core/state: fixed consensus issue added touch revert#3341
fjl merged 2 commits into
ethereum:masterfrom
obscuren:touch-delete-fix

Conversation

@obscuren
Copy link
Copy Markdown
Contributor

No description provided.

@mention-bot
Copy link
Copy Markdown

@obscuren, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fjl, @karalabe and @Gustav-Simonsson to be potential reviewers.

Comment thread core/state/state_object.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this can never be true, since the line above it is true

@obscuren obscuren force-pushed the touch-delete-fix branch 3 times, most recently from 7b414d5 to 325a359 Compare November 24, 2016 16:57
@GitCop
Copy link
Copy Markdown

GitCop commented Nov 24, 2016

Thank you for your contribution! Your commits seem to not adhere to the repository coding standards

  • Commit: 1e36facf41899c2fa1631011170794e7aab13688
  • Commits must be prefixed with the package(s) they modify

Please check the contribution guidelines for more details.


This message was auto-generated by https://gitcop.com

@GitCop
Copy link
Copy Markdown

GitCop commented Nov 24, 2016

Thank you for your contribution! Your commits seem to not adhere to the repository coding standards

  • Commit: 8c28caa7ec3659756a7f96a2096c48ea2f0b235c
  • Commits must be prefixed with the package(s) they modify

Please check the contribution guidelines for more details.


This message was auto-generated by https://gitcop.com

@obscuren obscuren force-pushed the touch-delete-fix branch 2 times, most recently from 28dc41f to 8e8cc02 Compare November 24, 2016 21:01
Implemented proper touch revert journal entries and copied a Parity
consensus bug in order to remain in sync with the current longest chain.
@fjl fjl changed the title core, core/state: fixes core, core/state: fixed consensus issue added touch revert Nov 24, 2016
Copy link
Copy Markdown
Contributor

@fjl fjl left a comment

Choose a reason for hiding this comment

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

👍

Comment thread core/state/journal.go Outdated
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.

Why does this depend on ripemd?

Copy link
Copy Markdown
Member

@karalabe karalabe Nov 24, 2016

Choose a reason for hiding this comment

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

Parity has a bad implementation of EIP 161. That caused account 0000000000000000000000000000000000000003 to be deleted in block 2675119, even though the deletion should have been reverted due to an out of gas error. Geth didn't handle revertals at all (hence today's bug), but because of this, there wasn't a consensus failure 2 days ago. To avoid rewinding the chain, we added this special case for the Parity bug.

Copy link
Copy Markdown
Contributor

@holiman holiman Nov 24, 2016

Choose a reason for hiding this comment

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

Good question. If I have this right... :

The 00...003 was one of the accounts touched by the attacker, and also by the statesweep. When it was touched by the statesweep, the actual 'touch', in the form of a CALL, went OOG.

This was at block 2675119 , at this tx. When the geth-bug causing the consensus failure today was fixed initially, it was discovered that the Parity implementation was also flawed; the OOG actually did not revert the deletion of 0..3 (ripemd). So the original fix resulted in consensus fail at 2675119 instead.

TLDR; geth failed to revert on OOG-transactions, and Parity failed to revert OOG sub-calls, basically. And the fix above is a hack to sync up with parity.

@fjl fjl force-pushed the touch-delete-fix branch from 2cefbf3 to bca7bfa Compare November 24, 2016 21:56
@fjl fjl merged commit fa0e057 into ethereum:master Nov 24, 2016
@obscuren obscuren deleted the touch-delete-fix branch November 24, 2016 22:09
pirapira added a commit to pirapira/yellowpaper that referenced this pull request Apr 11, 2017
pirapira added a commit to pirapira/yellowpaper that referenced this pull request Apr 11, 2017
pirapira added a commit to pirapira/yellowpaper that referenced this pull request Apr 12, 2017
pirapira added a commit to pirapira/yellowpaper that referenced this pull request Apr 28, 2017
pirapira added a commit to pirapira/yellowpaper that referenced this pull request Jan 19, 2018
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.

7 participants