You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that the schema name suggests that BlockNumber or Tag or BlockHash should be passed, i.e. that oneOf these properties may be passed. However, the schema lays out an anyOf:
oneOf Validation: According to the JSON Schema specification, oneOf requires that the instance validates against exactly one of the subschemas. If the instance is valid against zero or more than one subschema, it’s considered invalid.
Potential for Overlap: In our case, there could indeed be overlap between the uint (block number) and hash32 (block hash) schemas, as both are strings of hexadecimal characters.
{OK this overlap is the reason for the anyOf -- I think, therefore, that the solution may be to prevent more than one value being sent with type: string. I am assuming that with no type set, it's valid to send an illogical array such as 'latest', 0x3. I think that setting to string will throttle this}
The text was updated successfully, but these errors were encountered:
m4sterbunny
changed the title
eth_getBalance is anyOf a typo?
Does eth_getBalance BlockNumber or Tag or BlockHash need array option closed?
Sep 7, 2024
This probably impacts 2 schemas:
execution-apis/src/schemas/block.yaml
Line 130 in a3583d5
Scenario for 1:
eth_getBalance has 2 required parameters. This potential issue refers to Block.
Notice that the schema name suggests that BlockNumber or Tag or BlockHash should be passed, i.e. that oneOf these properties may be passed. However, the schema lays out an anyOf:
BlockNumberOrTagOrHash:
title: Block number, tag, or block hash.
anyOf:
- title: Block number.
$ref: '#/components/schemas/uint'
- title: Block tag.
$ref: '#/components/schemas/BlockTag'
- title: Block hash.
$ref: '#/components/schemas/hash32'
oneOf Validation: According to the JSON Schema specification, oneOf requires that the instance validates against exactly one of the subschemas. If the instance is valid against zero or more than one subschema, it’s considered invalid.
Potential for Overlap: In our case, there could indeed be overlap between the uint (block number) and hash32 (block hash) schemas, as both are strings of hexadecimal characters.
{OK this overlap is the reason for the anyOf -- I think, therefore, that the solution may be to prevent more than one value being sent with type: string. I am assuming that with no type set, it's valid to send an illogical array such as 'latest', 0x3. I think that setting to string will throttle this}
The text was updated successfully, but these errors were encountered: