rpcdaemon: fix Hive test eth_getTransactionReceipt pre-byzantium #17509
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the following Hive RPC compatibility tests:
For pre-Byzantium blocks, the Ethereum specification requires that transaction receipts contains:
the "postState" field and
"NOT" the status field.
To calculate "postState" it is necessary enable the commitment
The current database and snapshots for pre-Byzantium blocks do not contain valid postState data, therefore, we must explicitly re-calculate these receipts to be compliant to the specification (postState instead of status).
If "commitment is not enabled", we always provide the "status" field, regardless of the block number.
Some tests has been implemented to see the fixes using the hive DB
In order to see these tests successfully solved in Hive, a PR enabling commitment is required in the Hive repository itself