-
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(eth_trace): don't decode return value in EAM create error case #12730
Conversation
3221133
to
048d4f3
Compare
Repurposing this PR to fix the error being diagnosed, #12731 Unfortunately I haven't been able to come up with a replication of the actual error (revert, [
{
"type": "create",
"error": "actor error: 33",
"subtraces": 0,
"traceAddress": [],
"action": {
"from": "0x8edcbdea640d18df98a0a1d5bd8718af9540d2d0",
"gas": "0x8b4ddfd",
"value": "0x0",
"init": "0x608060405234801561001057600080fd5b506040516108a33803806108a383398101604090815281516020830151918301519190920180519091906000908190600a10801590610050575083518511155b801561005c5750600085115b151561006757600080fd5b5060009050805b83518110156101145781600160a060020a0316848281518110151561008f57fe5b60209081029091010151600160a060020a0316116100ac57600080fd5b60016002600086848151811015156100c057fe5b602090810291909101810151600160a060020a03168252810191909152604001600020805460ff1916911515919091179055835184908290811061010057fe5b60209081029091010151915060010161006e565b8351610127906003906020870190610257565b506001859055604080517fd87cd6ef79d4e2b95e15ce8abf732db51ec771f1ca2edccf22a46c729ac564726020808301919091527fb7a0bfa1b79f2443f4d73ebb9259cddbcd510b18be6fc4da7d1aa7b1786e73e6828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060830152608082018690523060a08301527f251543af6a222378665a76fe38dbceae4871a070b7fdaf5c6c30cf758dc33cc060c0808401919091528351808403909101815260e090920192839052815191929182918401908083835b6020831061021d5780518252601f1990920191602091820191016101fe565b5181516020939093036101000a60001901801990911692169190911790526040519201829003909120600455506102e39650505050505050565b8280548282559060005260206000209081019282156102ac579160200282015b828111156102ac5782518254600160a060020a031916600160a060020a03909116178255602090920191600190910190610277565b506102b89291506102bc565b5090565b6102e091905b808211156102b8578054600160a060020a03191681556001016102c2565b90565b6105b1806102f26000396000f3006080604052600436106100485763ffffffff60e060020a60003504166342cde4e8811461004a578063a0ab965314610071578063aa5df9e21461019d578063affed0e0146101d1575b005b34801561005657600080fd5b5061005f6101e6565b60408051918252519081900360200190f35b34801561007d57600080fd5b506040805160206004803580820135838102808601850190965280855261004895369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989b9a99890198929750908201955093508392508501908490808284375050604080516020888301358a018035601f8101839004830284018301909452838352979a8935600160a060020a03169a8a8301359a9199909850606090910196509194509081019250819084018382808284375094975050508335600160a060020a03169450505060209091013590506101ec565b3480156101a957600080fd5b506101b5600435610557565b60408051600160a060020a039092168252519081900360200190f35b3480156101dd57600080fd5b5061005f61057f565b60015481565b6000806000806000806001548d5114151561020657600080fd5b8b518d5114801561021857508d518d51145b151561022357600080fd5b600160a060020a0388163314806102415750600160a060020a038816155b151561024c57600080fd5b7f3ee892349ae4bbe61dce18f95115b5dc02daf49204cc602458cd4c1f540d56d76001028b8b8b6040518082805190602001908083835b602083106102a25780518252601f199092019160209182019101610283565b518151600019602094850361010090810a9190910191821691199290921617909152604080519590930185900385206000548684019b909b52600160a060020a03998a16868501526060860198909852608085019790975260a0840198909852958f1660c08301525060e08082018e9052855180830390910181529301938490525050805190928291908401908083835b602083106103525780518252601f199092019160209182019101610333565b51815160209384036101000a60001901801990921691161790526040805192909401829003822060045460f060020a611901028484015260228401526042808401829052855180850390910181526062909301948590528251909c509195509293508392850191508083835b602083106103dd5780518252601f1990920191602091820191016103be565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020945060009350600092505b600154831015610521576001858f8581518110151561043057fe5b906020019060200201518f8681518110151561044857fe5b906020019060200201518f8781518110151561046057fe5b60209081029091018101516040805160008082528185018084529790975260ff9095168582015260608501939093526080840152905160a0808401949293601f19830193908390039091019190865af11580156104c1573d6000803e3d6000fd5b50505060206040510351915083600160a060020a031682600160a060020a03161180156105065750600160a060020a03821660009081526002602052604090205460ff165b151561051157600080fd5b8193508280600101935050610415565b5060008054600101815588518190819060208c018d8f8cf1905080151561054757600080fd5b5050505050505050505050505050565b600380548290811061056557fe5b600091825260209091200154600160a060020a0316905081565b600054815600a165627a7a723058206c70aa05aaf685458e63601ebe057ffe25afe40052f93fbde08acd4bf2888a70002900000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000004cb2f0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000af846f42c2367effc37d1266c1a2f55c69e687f80000000000000000000000005dd96ca6a3c59e0cbf7c6198cc48c6497569a87f0000000000000000000000008edcbdea640d18df98a0a1d5bd8718af9540d2d00000000000000000000000006e6608de293f3e737aee48d410d60904c918d9ff"
},
"result": {
"gasUsed": "0x495e4d",
"code": "0x"
},
"blockHash": "0xdffc6554bebce63ef84ac051e880e3413e1fba1c634d1b198a2c362061b7fe21",
"blockNumber": 1862499,
"transactionHash": "0xc087a7e778eb8372e6a299bf31ac9aa07ca518c0dbfcfeb85c7c2bafbf58fa97",
"transactionPosition": 1
}
] (I don't know if this is precisely what eth tooling expects, but it's handling the error case at least and I'll have to trust that the original trace implementation followed go-ethereum for these cases 🤞). |
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.
LGTM! If you want this to fail, you can probably create a contract that attempts to create the a contract twice with the same nonce via create2.
048d4f3
to
c57d1c8
Compare
OK, cool, thanks @Stebalien. Easy contract added and trace call succeeds now where it would fail without the change. 👌 PTAL |
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.
LGTM!
Trivial PR just to get xerrors into place because this one is missing in an extended stack trace output I have while trying to debug a faultytrace_block
call. There's two calls todecodeReturn
and this one doesn't have an xerrors wrap so I'm deducing it's the one that I'm dealing with.(Edit: See comment below)