Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update detection of successful transaction for byzantium #222

Closed
wants to merge 1 commit into from

Conversation

LittleVulpix
Copy link

The field is returned as int and cannot be unmarshalled to string. The field can be either 0 (fail) or 1 (success).

More details: https://ethereum.stackexchange.com/questions/28077/how-do-i-detect-a-failed-transaction-after-the-byzantium-fork-as-the-revert-opco

The field is returned as int and cannot be unmarshalled to string. The field can be either 0 (fail) or 1 (success).
@sammy007
Copy link
Owner

sammy007 commented Oct 29, 2017

https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding

When encoding QUANTITIES (integers, numbers): encode as hex, prefix with "0x", the most compact representation (slight exception: zero should be represented as "0x0").

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionreceipt

status is a QUANTITY. Must be encoded as hex.

Report it to parity, I am having hard time messing with their own bugs because last time I tested this rpc call there was hex. Now it's an integer. Tomorrow it will be a hex again and we must patch it again.

Is it hex in stable 1.7.x?

@LittleVulpix
Copy link
Author

LittleVulpix commented Oct 29, 2017

Actually it was integer in both. I initially used stable but updated to 1.8.2 hoping it was that other bug, but it wasn't; they both seem to be returning integers... sorry about that. I don't know how to fix parity, so I just made this change on my pool (=your pool) to make it work right now as it was not unlocking blocks - I was not aware that they have to conform to standards. I agree that this is a mess and that it should be fixed on their side instead, so do with this PR as you wish :)

@LittleVulpix
Copy link
Author

LittleVulpix commented Oct 29, 2017

Oh, so it is. openethereum/parity-ethereum#6920

openethereum/parity-ethereum#6887 explains it a bit more...

@sammy007
Copy link
Owner

Yes, it was int in parity shit always, i just confused it. I used private network where status is always null (have no idea why) so this code was ok. It was written in rush so I didn't dig further. As i said dealing with rpc of this shit client is a biggest mistake in my life. Thanks for reporting.

@LittleVulpix
Copy link
Author

Since this is not actually an issue in your code and since it will eventually be resolved by openethereum/parity-ethereum#6926 whenever that's merged, I'll be closing this PR. Thanks for the pool software! :)

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.

2 participants