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

Incorrect LogIndex value in eth_getTransactionReceipt call #1907

Open
oleksandrSydorenkoJ opened this issue May 29, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working epic:eth-compatibility
Milestone

Comments

@oleksandrSydorenkoJ
Copy link

oleksandrSydorenkoJ commented May 29, 2024

Versions
3.18.2 and below

Preconditions
Active schain medium type
Deployed contract erc20 with events. Example contract
Account with 1 Sfuel and 1000 tokens

To Reproduce

  1. Send several transactions token transfer in 1 block (mtm = 5)
  2. Wait for the block mining and save block number
  3. Check the transaction receipt for the 3rd transaction from the block from step 2

Actual state
LogIndex for the topics from the 3rd transaction is "0x0"

Expected behavior
Log Index should be the position in the block. If there were 3 transactions with events, the log index should be 3

Logs:
Block with transactions (every transaction contains 1 event)

eth.getBlock(102853).transactions
["0xd86259d413ab6f8d7ec9b2c03bb7076421cb4c2f931acfccb09e55073145c459", "0x7dcb4c0bc44930e25614d5522a0c176d28e5ce13e39e70cd6bebe76ff9cbfbf8", "0x6496e66712d0860afadfa6c341d544edef989b788685e452a26a5bfc9b01a915", "0x47928fd9f17d4d8524a8c041e20335b9cf04aba48428f35b843d58e6c3f46eb0"

example request

curl http://localhost:1231/  -X POST   -H "Content-Type: application/json"   --data '{"method":"eth_getTransactionReceipt","params":["0x47928fd9f17d4d8524a8c041e20335b9cf04aba48428f35b843d58e6c3f46eb0"],"id":1,"jsonrpc":"2.0"}'

{"id":1,"jsonrpc":"2.0","result":{"blockHash":"0x13fbfb6a68d395814817129d904aa35bdd798073eba97e662c9b216e69475292","blockNumber":"0x191c5","contractAddress":null,"cumulativeGasUsed":"0x64188","from":"0x946624045fa5d281535039ceb1f47daefcbffef1","gasUsed":"0x19062","logs":[{"address":"0xc5b92e7638e5a38aba11f49ba5b86835ecd40fd1","blockHash":"0x13fbfb6a68d395814817129d904aa35bdd798073eba97e662c9b216e69475292","blockNumber":"0x191c5","data":"","logIndex":"0x0","polarity":false,"topics":["0xcd6e659e4c2e75c3bfe47fecaccf39aeb368116a0ee52afb532e07f6cba6c0d1","0x000000000000000000000000946624045fa5d281535039ceb1f47daefcbffef1","0x000000000000000000000000946624045fa5d281535039ceb1f47daefcbffef1"],"transactionHash":"0x47928fd9f17d4d8524a8c041e20335b9cf04aba48428f35b843d58e6c3f46eb0","transactionIndex":"0x3","type":"mined"}],"logsBloom":"","status":"0x1","to":"0xc5b92e7638e5a38aba11f49ba5b86835ecd40fd1","transactionHash":"0x47928fd9f17d4d8524a8c041e20335b9cf04aba48428f35b843d58e6c3f46eb0","transactionIndex":"0x3"}}
@dimalit
Copy link
Collaborator

dimalit commented Aug 7, 2024

Bug confirmed. Indeed, architecturally, we don't have access to this information where we create LocalisedTransactionReceipt, so some changes are needed.

@PolinaKiporenko PolinaKiporenko moved this from Ready For Pickup to To Do in SKALE Engineering 🚀 Oct 10, 2024
@PolinaKiporenko
Copy link
Contributor

removed from 3.1 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working epic:eth-compatibility
Projects
Status: No status
Development

No branches or pull requests

4 participants