Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fixed receipt serialization and RPC #6555

Merged
merged 1 commit into from
Sep 21, 2017
Merged

Fixed receipt serialization and RPC #6555

merged 1 commit into from
Sep 21, 2017

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Sep 19, 2017

Closes #6550

@arkpar arkpar added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Sep 19, 2017
@@ -90,7 +90,7 @@ impl Decodable for Receipt {
};

let first = rlp.at(0)?;
if first.is_data() && first.data()?.len() == 1 {
Copy link
Collaborator Author

@arkpar arkpar Sep 19, 2017

Choose a reason for hiding this comment

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

"0" status code is actually zero bytes when RLP encoded

@@ -125,6 +125,8 @@ pub struct RichReceipt {
pub log_bloom: LogBloom,
/// State root
pub state_root: Option<H256>,
/// Status byte. Optional before EIP-658.
pub status_code: Option<u8>,
Copy link
Contributor

Choose a reason for hiding this comment

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

since state root and status code are an either-or kind of thing, maybe it should be encoded as an enum instead of two separate fields? like

enum TransactionOutcome {
    Unknown(Option<H256>), // optional state root because of eip98
    Success,
    Failure,
}

@arkpar arkpar added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. and removed A0-pleasereview 🤓 Pull request needs code review. labels Sep 19, 2017
@arkpar arkpar added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Sep 19, 2017
@arkpar arkpar force-pushed the receipt-fix branch 2 times, most recently from 3ec6640 to 4368229 Compare September 20, 2017 09:50
@gavofyork gavofyork merged commit 4dc7d3d into master Sep 21, 2017
@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Sep 21, 2017
@arkpar arkpar deleted the receipt-fix branch September 21, 2017 08:39
arkpar added a commit that referenced this pull request Sep 21, 2017
arkpar added a commit that referenced this pull request Sep 21, 2017
* Sync progress and error handling fixes (#6560)

* Fixed receipt serialization and RPC (#6555)

* v1.7.3
@jackkleeman
Copy link

I can confirm this fixed the issue for me, thanks so much!

pedrobranco pushed a commit to uphold-forks/parity that referenced this pull request Sep 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants