This repository has been archived by the owner on Aug 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Receipt fixes and state trie clearing detail #62
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
austinabell
requested review from
soc1c,
dziabko,
GregTheGreek,
meowsbits and
steviezhang
June 15, 2019 18:00
Is this EIP-658? |
16 tasks
yes, the change necessary to enable 658 is included in this PR: rlp.Encode(w, []interface{}{r.statusEncoding(), r.CumulativeGasUsed, r.Bloom, r.Logs}) and all surrounding logic from: rlp.Encode(w, []interface{}{r.PostState, r.CumulativeGasUsed, r.Bloom, r.Logs}) |
EDIT: Test was incorrect, I added a to field which no longer made it a contract deployment.
Bytecode is equivalent to this (use this version of remix to verify):
|
@GregTheGreek you have a |
GregTheGreek
suggested changes
Jun 17, 2019
@noot woops thanks for that catch, disregard previous comment this looks to be functioning correctly
|
GregTheGreek
approved these changes
Jun 17, 2019
noot
approved these changes
Jun 17, 2019
soc1c
approved these changes
Jun 17, 2019
dziabko
pushed a commit
that referenced
this pull request
Jun 20, 2019
* receipt and state trie clearing changes * Fixed receipt storage and added backward compatible decoding
dziabko
pushed a commit
that referenced
this pull request
Jun 20, 2019
* receipt and state trie clearing changes * Fixed receipt storage and added backward compatible decoding
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes how the receipts are encoded and decoded to follow proper protocol of replacing intermediate state root with status encoding. Also performs state trie clearing at some appropriate points in a simulated system that was previously missed (see:
state.IntermediateRoot(config.IsAtlantis(parent.Number())
like changes).Since previous receipts would have had status encoded and saved into the database, I have made the decoding backwards compatible:
where decodeOldStoredReceiptRLP does not assume the ambiguous nature of PostStateOrStatus field of the Receipts and sets both fields specifically.
Also cleaned up the struct declaration for encoding/ decoding because encoding and decoding an untyped interface relying on positional variables and the confusing logic structure was very bad.
Edit: Resolves #55