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

getTransactionByHashWithProof和getTransactionReceiptByHashWithProof没有返回proof #4290

Open
saiwg opened this issue Mar 8, 2024 · 1 comment

Comments

@saiwg
Copy link

saiwg commented Mar 8, 2024

问题
RPC调用getTransactionByHashWithProof和getTransactionReceiptByHashWithProof接口没有返回proof

操作步骤
Steps to reproduce the behavior:

  1. 部署2.9.1节点
  2. 部署HelloWorld合约
  3. 调用sendRawTransaction接口发送交易,交易成功,成功调用合约set方法修改了值
  4. 调用getTransactionByHashWithProof和getTransactionReceiptByHashWithProof接口查上面的交易
  5. 返回的txProof和receiptProof没有值
    getTransactionByHashWithProof返回结果
    { "id": "1", "jsonrpc": "2.0", "result": { "transaction": { "blockHash": "0xa9102a37fc8c52e4a99c250457d27b7bcfbf512d579914b1b00b503f98f1b3b6", "blockLimit": "0x26b", "blockNumber": "0x14", "chainId": "0x1", "extraData": "0x", "from": "0xc8c852d550a605fb8d9fa961601037ec79c5d42d", "gas": "0x1c9c380", "gasPrice": "0x1c9c380", "groupId": "0x1", "hash": "0x5ee6aaf453752855ac83dd68e67e58866a96910adb826b2589a90384d640556e", "input": "0x4ed3885e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000548656c6c6f000000000000000000000000000000000000000000000000000000", "nonce": "0x2e6f8794b97acb25265d901b1e5d0e4fff6dab431aba0f5881ca0d3a7070d52", "signature": { "r": "0x29fec7e7b6eb28fa229200b758be651505917a5c7c43b0b1794b0bb14798a9b5", "s": "0x1289d348b2ace6d2d2e574ffe12a390102837dd571c03201806ab82282c6ecae", "signature": "0x29fec7e7b6eb28fa229200b758be651505917a5c7c43b0b1794b0bb14798a9b51289d348b2ace6d2d2e574ffe12a390102837dd571c03201806ab82282c6ecae01", "v": "0x1" }, "to": "0x24faaa50ae981ea602e141e366dbd0dae2d9c4fc", "transactionIndex": "0x0", "value": "0x0" }, "txProof": [ { "left": [], "right": [] } ] } }
    getTransactionReceiptByHashWithProof结果
    { "id": "1", "jsonrpc": "2.0", "result": { "receiptProof": [ { "left": [], "right": [] } ], "transactionReceipt": { "blockHash": "0xa9102a37fc8c52e4a99c250457d27b7bcfbf512d579914b1b00b503f98f1b3b6", "blockNumber": "0x14", "contractAddress": "0x0000000000000000000000000000000000000000", "from": "0xc8c852d550a605fb8d9fa961601037ec79c5d42d", "gasUsed": "0x605c", "input": "0x4ed3885e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000548656c6c6f000000000000000000000000000000000000000000000000000000", "logs": [], "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "output": "0x", "remainGas": "0x0", "root": "0x0000000000000000000000000000000000000000000000000000000000000000", "status": "0x0", "statusMsg": "None", "to": "0x24faaa50ae981ea602e141e366dbd0dae2d9c4fc", "transactionHash": "0x5ee6aaf453752855ac83dd68e67e58866a96910adb826b2589a90384d640556e", "transactionIndex": "0x0" } } }
  6. 调用sendRawTransactionAndGetProof接口发送交易,交易成功,成功调用合约set方法修改了值,调用上面两个查询方法也一样没有proof内容

期望
带WithProof的接口能返回交易的proof证明信息

环境/版本

  • OS: Ubuntu 22.04.3
  • FISCO BCOS Version 2.9.1
@kyonRay
Copy link
Member

kyonRay commented Mar 11, 2024

如果只有一笔交易,left和right都是空的应该是符合预期的,因为merkle树树根就是这一笔交易。可以通过getBlock进行二次确认。

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

No branches or pull requests

2 participants