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

[R4R]fix blockhash not correct for the logs of system tx receipt #444

Merged
merged 2 commits into from
Oct 11, 2021

Conversation

unclezoro
Copy link
Collaborator

Description

This PR is target to fix #443

Rationale

When parlia engine process the system tx, the preparation of statedb is not correct, the blockhash is empty, so the logs of generated receipts did not assign with correct blockhash.

This issue is exposed only after we add the cache of receipts. This PR did not fix the issue thoroughly, it will need a hardfork to fix this.

Example

eth.getTransactionReceipt("0xa1f96d672ab4fa2782d1b9acb38b95a19ac64541b40caefbbe549b664172d705")
{
blockHash: "0xca3e86e69d0958fe1e1fc1990ea51e3a44e8da5915c34162928f51e07a30de61",
blockNumber: 13045778,
contractAddress: null,
cumulativeGasUsed: 176795,
from: "0xf474cf03cceff28abc65c9cbae594f725c80e12d",
gasUsed: 17150,
logs: [{
address: "0x0000000000000000000000000000000000001000",
blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
blockNumber: 13045778,
data: "0x0000000000000000000000000000000000000000000000000005abf67b26d400",
logIndex: 4,
removed: false,
topics: ["0x93a090ecc682c002995fad3c85b30c5651d7fd29b0be5da9d784a3302aedc055", "0x000000000000000000000000f474cf03cceff28abc65c9cbae594f725c80e12d"],
transactionHash: "0xa1f96d672ab4fa2782d1b9acb38b95a19ac64541b40caefbbe549b664172d705",
transactionIndex: 3
}],
logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000002010000000000000000000000000000000000020000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000",
status: "0x1",
to: "0x0000000000000000000000000000000000001000",
transactionHash: "0xa1f96d672ab4fa2782d1b9acb38b95a19ac64541b40caefbbe549b664172d705",
transactionIndex: 3,
type: "0x0"
}

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

Preflight checks

  • build passed (make build)
  • tests passed (make test)
  • manual transaction test passed

Already reviewed by

...

Related issues

... reference related issue #'s here ...

@unclezoro unclezoro changed the base branch from master to develop October 8, 2021 14:36
@unclezoro unclezoro changed the title [WIP]fix blockhash not correct for the logs of system tx receipt [R4R]fix blockhash not correct for the logs of system tx receipt Oct 10, 2021
@unclezoro unclezoro merged commit 03febe1 into develop Oct 11, 2021
This was referenced Oct 19, 2021
@unclezoro unclezoro deleted the issue443 branch December 5, 2021 09:43
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.

missing block hash in the logs of system tx.
2 participants