-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[Fix] Return proper JSON from REST APIs #3751
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
base: staging
Are you sure you want to change the base?
Conversation
|
Would the |
Yeah, that would make sense if you think there are other use cases for it. Maybe we should even have something like Initially, I was also wondering if it makes more sense to just fix the serialization of |
|
Thank you for picking this up. @kaimast which other endpoints exhibit this issue? Based on Kai's answer, @HarukaMa @miazn @iamalwaysuncomfortable are you ok if we change the serialization in a backwards-incompatible way? Or will this break existing tooling to an unbearable degree? |
|
I don't think I'm relying on this specific api behavior so I'm not affected. However, I think the old format is potentially useful if people are manually executing transactions via |
Thank you for pointing this out. I will test that |
9c54c1b to
48b9656
Compare
|
@vicsn this issue is tagged for Q4, but I am not sure what we decided on with regard to changing the API behavior. I think it should change, but we could add a flag to force the old behavior. Also, we haven't decided if the value-to-JSON functionality should reside in snarkVM or remain in snarkOS (as implemented by this PR). The former would require more discussion, as we are trying to avoid API breakage in snarkVM. |
|
This is not priority at the moment but adding this gem here for shared context: ProvableHQ/snarkVM#2404 |
Replaces PR #3606 and fixes issue #3361.
Reproducing the Bug
On
staging, run test network using./devnet.sh. When you query the bonded validator mapping, it should give you the incorrectly formatted output.(here $VALIDATOR_ADDR is a bonded address, that can be retrieved from the logs)
Testing
On the PR branch (
fix/value-json) run another test network and execute the above command again. Now you will get an output with the correct formatting.