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

getTransactionReceipt RPC support #1397

Merged
merged 9 commits into from
Jul 6, 2015
Merged

Conversation

tgerring
Copy link
Contributor

@tgerring tgerring commented Jul 3, 2015

#1042 #1306

  • XEth.EthTransactionByHash seems to be not returning the block hash for a transaction as expected.
  • Full receipt fields not available
  • Fill fields with parent and sibling context
    • Logs are not currently set

@tgerring
Copy link
Contributor Author

tgerring commented Jul 4, 2015

@obscuren The following error prints in the logs, but it appears to decode fine. Thoughts?

transaction_util.go:67] GetReceipt err: rlp: input list has too many elements for types.ReceiptForStorage

@obscuren
Copy link
Contributor

obscuren commented Jul 4, 2015

You need to decode in to types.Receipt or add a similar decode method for ReceiptForStorage

@obscuren obscuren added this to the 0.9.36 milestone Jul 5, 2015
@frozeman
Copy link
Contributor

frozeman commented Jul 6, 2015

Taylor i just tried you method, but you're using the names wrong.
We use camelCase for every property name starting lowercase. You're property names are all starting uppercase.

e.g.:

BlockHash: "0x1a5c947185813115f832d668364543552d54ff56c7c395c5e8a30348ceb8c5e0"
BlockNumber: "0x4817"
ContractAddress: null
CumulativeGasUsed: "0x58be"
GasUsed: "0x5a3c"
Logs: null
TransactionHash: "0x2d173587dbe656eb77c3c6a9872e7400113281f7a4df17eed44f5cd39c943be3"
TransactionIndex: "0x0"

Additional empty logs, should be an empty array not null, to match the behaviour of eth_getBlock

Could you fix that?

@frozeman
Copy link
Contributor

frozeman commented Jul 6, 2015

If you fixed the above i can re-run my web3 integration:
web3/web3.js#254

v := NewReceiptRes(rec)
v.BlockHash = newHexData(bhash)
v.BlockNumber = newHexNum(bnum)
v.GasUsed = newHexNum(tx.Gas().Bytes())
Copy link
Contributor

Choose a reason for hiding this comment

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

This is incorrect. I'll fix this in a future PR. This should be set based on receipt.cumGas - previousReceipt.cumGas

obscuren added a commit that referenced this pull request Jul 6, 2015
getTransactionReceipt RPC support
@obscuren obscuren merged commit 35add89 into ethereum:develop Jul 6, 2015
@obscuren obscuren removed the review label Jul 6, 2015
@frozeman
Copy link
Contributor

frozeman commented Jul 6, 2015

Guys why you merged it? it has significant errors, as i stated

@obscuren
Copy link
Contributor

obscuren commented Jul 6, 2015

@frozeman they are because it's natively implemented. We're waiting for web3 integration. Start cracking boy ;-)

tony-ricciardi pushed a commit to tony-ricciardi/go-ethereum that referenced this pull request Jan 20, 2022
Description
Improve reliability from the ethstats module

The connectionWrapper was cherrypicked from go-ethereum upstream:
ethereum@82a9e11 (ethereum#21404)

Other changes
Validator injecting its version to the proxy stats chunk

Tested
Manually in a local testnet

Related issues
Fixes ethereum#1395
Fixes ethereum#1397
Backwards compatibility
Yes
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.

3 participants