-
Notifications
You must be signed in to change notification settings - Fork 77
RPC schema felt validation #401
Comments
I'm also hitting this bug by requesting the transaction receipt of the seed accounts deploy transactions. |
@fracek just proposed another updated regex with a simple |
I believe the devnet should stick with the "official" regexp from starknet's rpc-spec repo. This change will probably soon be released, and my understanding is that regexp used there was deliberate (as the leading 0 does not change the value - I'd rather the devnet complies to the rpc spec (especially that it is supposed to validate payloads/responses against it) than introduce some other regexp that technically works, but is only specific to it. This can lead to all kinds of problems in the future. It probably means some additional work is necessary on the devnet part to make it work (I guess changing/removing |
I don't really have an opinion, I don't understand why people care so much about a leading |
Does it help if EDIT: Yes, running Devnet with: starknet-devnet --disable-rpc-request-validation resolves the issue and can be used at least as a temporary solution. |
Time spent on this PR: 0.5 ## Pull request type Please check the type of change your PR introduces: - [ ] Bugfix - [ ] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no api changes) - [x] Build related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior? The JSON RPC spec does not allow for address missing the leading 0 in hex string ## What is the new behavior? Devnet is started with the `--disable-rpc-request-validation` flag to skip this validation? ## Other information See corresponding discussion in 0xSpaceShard/starknet-devnet#401
Describe the bug (observed vs expected behavior)
For the RPC schema validation of the latest
devnet
version the regular expression used for validatingfelt
fields seems to be too strict. It necessitates that the corresponding values conform to the0x0{digits}
format, while for the earlier versions and fortestnet
the0x{digits}
format is accepted.For the payload:
testnet
replies with a successful responsedevnet 0.4.4
replies with the expectedUNDECLARED_CLASS
errordevnet 0.4.5
replies with the unexpected"Got invalid value for parameter: \"'0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918' does not match '^0x0[a-fA-F0-9]{1,63}$'\""
error messageNot reproducible on alpha-goerli
Devnet version
The text was updated successfully, but these errors were encountered: