error-groups, tools, tests: add spec-mandated error-code fixtures for methods#784
error-groups, tools, tests: add spec-mandated error-code fixtures for methods#784simsonraj wants to merge 2 commits into
Conversation
Added test fixtures for the error codes
|
From RPC Standards call: Ideally, we need to get a go-ethereum PR to fix, so we can remove the error code overwriting logic from the generator, and then update the go-ethereum target. |
|
Opened ethereum/go-ethereum#35105, which makes I verified it directly against the fixtures in this PR: regenerating the So once #35105 merges, the rewrite shim here can be dropped: the codes come straight from go-ethereum, and the fixtures can be regenerated natively (a go-ethereum dependency bump instead of the rewrite step). Flagging now so the rewrite mechanism doesn't get baked in long-term — happy to help with the follow-up once it lands. |
|
Do we know if clients have already shipped the error codes specified in #650? I think it's unfortunate that the codes defined in #650 are inconsistent with the ones in eth_simulateV1 for the same failure mode. This means that eth_sendRawTransaction or e.g. eth_call return |
Follow-up to #650 that turns the new error-code catalog into a forcing function for client adoption via hive's
rpc-compatsimulator.txpool-errors.yaml.ExpectErrorCodeto the testgen. When set, rpctestgen rewrites the capturederror.codein the generated.iofixture to the spec-mandated valueeth_sendRawTransactionerror scenarios, each tagged with its catalog code.error.codeagainst the method's resolvederrors[]; emits[WARN]on unknown codes.Scenarios
send-nonce-too-lowExecutionErrorssend-intrinsic-gas-too-lowGasErrorssend-tx-gas-exceeds-block-limitGasErrorssend-tip-above-fee-capGasErrorssend-insufficient-fundsGasErrorssend-already-knownTxPoolErrorssend-replacement-underpricedTxPoolErrorsMeasured on docker-ized
go-ethereum,hyperledger/besu,nethermind/nethermind(full data and fixtures: simsonraj/eth-err-tests).Deferred
Four scenarios that can't yet be reliably reproduced across all clients because hive doesn't expose the relevant client-launch flags. (commented currently)