Fix lint warnings#815
Conversation
lightclient
left a comment
There was a problem hiding this comment.
Is it possible to not require the title for the schema? It feels weird to just copy the name into the title field directly below. Everything else looking okay.
4f47835 to
a9e7e60
Compare
a9e7e60 to
29ca788
Compare
yeah, agreed. Updated schema title where it added new information, but added to the ignore list. |
| $ref: '#/components/schemas/uint' | ||
| errors: | ||
| - code: 4444 | ||
| message: Pruned history unavailable |
There was a problem hiding this comment.
I don't think 4444 is a valid error for the state related methods, it should only be returned if there isn't sufficient block history to fill request for blocks, headers, bodies, and logs.
There was a problem hiding this comment.
Ah, thank you. Sorry for the slop. Claude tells me that these error codes can come back from eth_getStorageAt, for example:
| Code | Message | Reference |
|---|---|---|
| -32602 | (varies) | internal/ethapi/api.go:619 |
| -32000 | "pending state is not available" | eth/api_backend.go:229 |
| -32000 | "finalized block not found" | eth/api_backend.go:87 |
| -32000 | "safe block not found" | eth/api_backend.go:94 |
| -32000 | "header not found" | eth/api_backend.go:239 |
| -32000 | "header for hash not found" | eth/api_backend.go:261 |
| -32000 | "hash is not currently canonical" | eth/api_backend.go:264 |
| -32000 | "invalid arguments; neither block nor hash specified" | eth/api_backend.go:275 |
| -32000 | "historical state %x is not available" | core/state/database_history.go:255 |
| -32000 | "historical state over ubt is not yet supported" | core/blockchain_reader.go:453 |
I'm pretty sure messages aren't standardized across clients, but do you think it's worth adding all the possible error codes here? I think it would be useful info, but I'm worried it'll get out of sync if nothing is checking this. I don't have a good feel for how often error codes change/get added.
There was a problem hiding this comment.
I think we can hold off on fully defining the errors and wait for the error catalog work to do that?
With the new openrpc linter, there are new rules introduced. Some were set to
warnto begin. This PR fixes lint rules that create warnings.EDIT: Also added the build as a dependency for the lint because lint runs on
refs-openrpc.jsonand was not picking up the latest changes without the build.