Skip to content

Tx Encoding and decoding fix#33

Merged
soc1c merged 4 commits intodevelopmentfrom
austin/oldreceiptdecoding
Aug 13, 2019
Merged

Tx Encoding and decoding fix#33
soc1c merged 4 commits intodevelopmentfrom
austin/oldreceiptdecoding

Conversation

@austinabell
Copy link
Copy Markdown
Contributor

@austinabell austinabell commented Aug 8, 2019

Followed status encoding functions from foundation who implicitly ommitted PostState which altered the logic of the functionality of the receipt encoding and decoding, which was not caught by the existing tests or tests pulled from foundation.

Issue was if a Receipt in storage contained the PostState and Status, the Status would not be translated over into the returned value in favour of the PostState (which was removed and irrelevant at the current block).

I made these changes to remain compatible with all previous versions and now stores all fields without ommitting the PostState as was previously intended, but optimizations can be made later. I also added tests to ensure the compatibility and test these edge cases to make sure no changes affect the compatibility.

Please ensure the tx status appears on receipts migrating from a previous version, I cannot test that specifically.

Fixes #23

GregTheGreek
GregTheGreek previously approved these changes Aug 9, 2019
@eyfl eyfl requested review from r8d8 and tzdybal August 9, 2019 09:18
r8d8
r8d8 previously requested changes Aug 9, 2019
Comment thread core/types/receipt.go Outdated
Copy link
Copy Markdown
Contributor

@tzdybal tzdybal left a comment

Choose a reason for hiding this comment

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

LGTM

@soc1c soc1c dismissed r8d8’s stale review August 13, 2019 07:11

addressed

@soc1c soc1c merged commit fd99d76 into development Aug 13, 2019
@soc1c soc1c deleted the austin/oldreceiptdecoding branch August 13, 2019 07:11
soc1c pushed a commit that referenced this pull request Aug 13, 2019
* Added test for decoding old encoding function

* Fixed decoding issue and improved tests to handle all cases including previous client

* Add compatibility with previous version

* Rename receipt storage variable
@soc1c soc1c mentioned this pull request Aug 13, 2019
4 tasks
soc1c added a commit that referenced this pull request Aug 13, 2019
* Replace repository reference for accounts/abi/bind (#29)

* docs: update badges (#34)

* docs: add gitter badge

* docs: add circle-ci badge

* Update README.md

* Update README.md

* Update README.md

* docs: update repository path

* Update README.md

* Tx Encoding and decoding fix (#33)

* Added test for decoding old encoding function

* Fixed decoding issue and improved tests to handle all cases including previous client

* Add compatibility with previous version

* Rename receipt storage variable

* Storage and edge case fixes (#28)

* Applied storage fixes and updates

* Minor execution refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

For the same txid, why is the "status" returned from getTransactionReceipt different between versions 5.5.2 and 6.0.6?

6 participants