-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test Fwk: Add ScVal validation trait and fns (U63, Bitset, Symbol) #106
Comments
from @graydon
|
@graydon @jonjove Do you folks have opinions on whether we should run through this validation when parsing XDR, or just offer it as additional functions that a developer can call if they wish? I'm thinking the latter since there could be cases where we introduce new constraints in the future and refusing to deserialize any XDR with validations not satisfied could be too blunt. Wdyt? |
Yeah I think from a version-safety perspective it's best to do this in core or some part of the host that can be told which version it's expecting to look at. |
It sounds like from what you're saying that validation needs to occur independently of deserializing. That makes sense and was where I was leaning, I'll continue down that path. I've implemented this as an extension function behind a trait in this crate, but that doesn't prevent us from either adding a parameter to the validation function that contains a Stellar protocol version, or by creating a new trait for each protocol where validation changes and having types implement each. |
No description provided.
The text was updated successfully, but these errors were encountered: