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

log's topics is null #10910

Closed
5 of 11 tasks
amncjf opened this issue May 23, 2023 · 4 comments · Fixed by #10971
Closed
5 of 11 tasks

log's topics is null #10910

amncjf opened this issue May 23, 2023 · 4 comments · Fixed by #10971
Assignees
Labels
area/fvm kind/bug Kind: Bug P2 P2: Should be resolved

Comments

@amncjf
Copy link

amncjf commented May 23, 2023

Checklist

  • This is not a security-related bug/issue. If it is, please follow please follow the security policy.
  • I have searched on the issue tracker and the lotus forum, and there is no existing related issue or discussion.
  • I am running the Latest release, the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.
  • I did not make any code changes to lotus.

Lotus component

  • lotus daemon - chain sync
  • lotus fvm/fevm - Lotus FVM and FEVM interactions
  • lotus miner/worker - sealing
  • lotus miner - proving(WindowPoSt/WinningPoSt)
  • lotus JSON-RPC API
  • lotus message management (mpool)
  • Other

Lotus Version

All versions

Repro Steps

  1. curl --data '{"jsonrpc": "2.0", "id":1, "method": "eth_getBlockByHash", "params": ["0x53b5686d0309e3617e02c8e3f2fe8a5facc14672d746afd948a2db8eb29f292b",true] }' -H 'Content-Type:application/json' https://api.calibration.node.glif.io/rpc/v1

Describe the Bug

https://api.calibration.node.glif.io/rpc/v1 has obtained the receipt of transaction 0x53b5686d0309e3617e02c8e3f2fe8a5facc14672d746afd948a2db8eb29f292b, where the logIndex is 7 and the topics of the log are null. Why? topics are always not null

Logging Information

N/A
@maciejwitowski
Copy link
Contributor

Looks like this has already been discussed on Slack.
This can happen if the contact uses LOG0.

@amncjf
Copy link
Author

amncjf commented May 24, 2023

It is recommended to set the topics of log0 to [] instead of null, so that I can use getLogs of ethers instead of writing it myself

@maciejwitowski
Copy link
Contributor

Not sure why it results in null but I agree [] would make more sense.

@amncjf
Copy link
Author

amncjf commented May 25, 2023

There is also better compatibility!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fvm kind/bug Kind: Bug P2 P2: Should be resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants