Skip to content

Fix lint warnings#815

Open
kclowes wants to merge 5 commits into
ethereum:mainfrom
kclowes:fix-lint-warnings
Open

Fix lint warnings#815
kclowes wants to merge 5 commits into
ethereum:mainfrom
kclowes:fix-lint-warnings

Conversation

@kclowes

@kclowes kclowes commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

With the new openrpc linter, there are new rules introduced. Some were set to warn to 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.json and was not picking up the latest changes without the build.

@kclowes kclowes marked this pull request as ready for review June 2, 2026 20:11
@kclowes kclowes requested a review from fjl June 2, 2026 20:12

@lightclient lightclient left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kclowes kclowes force-pushed the fix-lint-warnings branch from 4f47835 to a9e7e60 Compare June 4, 2026 16:53
@kclowes kclowes force-pushed the fix-lint-warnings branch from a9e7e60 to 29ca788 Compare June 4, 2026 17:09
@kclowes

kclowes commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

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.

yeah, agreed. Updated schema title where it added new information, but added to the ignore list.

Comment thread src/eth/state.yaml
$ref: '#/components/schemas/uint'
errors:
- code: 4444
message: Pruned history unavailable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kclowes kclowes Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can hold off on fully defining the errors and wait for the error catalog work to do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants