-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix: EthAPI: Make newEthBlockFromFilecoinTipSet faster and correct #10380
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arajasek
force-pushed
the
asr/fix-eth-api
branch
from
March 2, 2023 17:25
ae3aeb4
to
842a16a
Compare
arajasek
force-pushed
the
asr/fix-eth-api
branch
from
March 2, 2023 17:34
842a16a
to
cfb5eac
Compare
raulk
approved these changes
Mar 3, 2023
Stebalien
approved these changes
Mar 3, 2023
Merged
wanyvic
reviewed
Mar 7, 2023
|
||
for txIdx, msg := range compOutput.Trace { | ||
// skip system messages like reward application and cron | ||
if msg.Msg.From == builtintypes.SystemActorAddr { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arajasek, there is still an issue. The transactionIndex
returns different results in the eth_getBlockByNumber
and eth_getTransactionReceipt
interfaces. The reason is that txIdx
did not ignore system messages, and this is not as expected.
Example in hyperspace:
curl -s --location 'http://localhost:8839/rpc/v1' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc":"2.0",
"method":"eth_getTransactionReceipt",
"params":["0xcc502ba55e9d312349c647783964c7edb00c3890b96842bd53e718475dc8c71e"],
"id":1
}' |gojq
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHash": "0x52206698ebadc31c0e3e211a9cd3f02dc81603f74e8a604dc460fa3cab1f597b",
"blockNumber": "0x1f302",
"contractAddress": null,
"cumulativeGasUsed": "0x0",
"effectiveGasPrice": "0x48724a74",
"from": "0xff000000000000000000000000000000000005e4",
"gasUsed": "0x135482a",
"logs": [],
"logsBloom": "0x09000c0000085003840012000100102008204100010000002105018000100000040000400024000100800000003000000010001002001110500000020016a0048880004040800081488100088e80400208048011010410000120000180002086200000280a022004000000812068490000002004000400000a01001000420800010000440400000002410100000004045800200500b000a0800140024001000060081000008109000000001800020800000420008083800060888044000040000200840a00002010600000000010d0800400000000080048081408000800600028400800048000400000400000a1000108000020001003440504088000026000",
"root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xff0000000000000000000000000000000000088a",
"transactionHash": "0xcc502ba55e9d312349c647783964c7edb00c3890b96842bd53e718475dc8c71e",
"transactionIndex": "0x0",
"type": "0x2"
}
}
curl -s --location 'http://localhost:8839/rpc/v1' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"id": 1,
"params": ["0x1f302", true]
}
' |gojq
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"baseFeePerGas": "0x64",
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x2540be400",
"gasUsed": "0x135482a",
"hash": "0x52206698ebadc31c0e3e211a9cd3f02dc81603f74e8a604dc460fa3cab1f597b",
"logsBloom": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"miner": "0x0000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x1f302",
"parentHash": "0xef02f6d94ef93a9755fcfa001708a45f058569e5a871b9b0ed574a2ee79501c6",
"receiptsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x0",
"stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x63ff621c",
"totalDifficulty": "0x0",
"transactions": [
{
"accessList": [],
"blockHash": "0x52206698ebadc31c0e3e211a9cd3f02dc81603f74e8a604dc460fa3cab1f597b",
"blockNumber": "0x1f302",
"chainId": "0xc45",
"from": "0xff000000000000000000000000000000000005e4",
"gas": "0x18149c7",
"hash": "0xcc502ba55e9d312349c647783964c7edb00c3890b96842bd53e718475dc8c71e",
"input": "0x",
"maxFeePerGas": "0x3a27a7a0",
"maxPriorityFeePerGas": "0x3a27a382",
"nonce": "0x113f",
"r": "0x0",
"s": "0x0",
"to": "0xff0000000000000000000000000000000000088a",
"transactionIndex": "0x1",
"type": "0x2",
"v": "0x0",
"value": "0x0"
}
],
"transactionsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"uncles": []
}
}
7 tasks
19 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related Issues
Wany on Slack reported that trying to eth_getBlockByNumber on hyperspace #124390 incorrectly returned empty values. This was because we have silent failures in
newEthBlockFromFilecoinTipSet
, which gives up and returns empty blocks with no errors if message lookups fail.Proposed Changes
StateCompute
on the relevant tipset, instead ofStateSearchMsg
ing every message which would be very slow and potentially failAdditional Info
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps