Skip to content
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

fix(rpc): Fixes getNodeInfo serialisation #1991

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

spalladino
Copy link
Collaborator

When calling the RPC server across HTTP, the automagical json-rpc-server serialisation was failing to deserialise the NodeInfo. The constructor of the NodeInfo object was not exactly Object, so the converter did not go recursively into each field.

This PR makes the check for "is something an object" wider, and changes the RPC server test so it reproduces the issue without the fix. Before this change, getNodeInfo().rollupAddress was equal to { type: 'EthAddress', data: '0x...' }, so calling toString() on it resulted in the string [object Object].

@spalladino spalladino merged commit 0a29fa8 into master Sep 5, 2023
@spalladino spalladino deleted the palla/fix-node-info-serialisation branch September 5, 2023 21:55
spypsy pushed a commit that referenced this pull request Sep 6, 2023
🤖 I have created a new Aztec Packages release
---


##
[0.1.0-alpha60](v0.1.0-alpha59...v0.1.0-alpha60)
(2023-09-06)


### Features

* Goblin recursive verifier
([#1822](#1822))
([f962cb6](f962cb6))
* initial `is_valid` eip1271 style wallet + minimal test changes
([#1935](#1935))
([f264c54](f264c54))


### Bug Fixes

* benchmark git repo
([#2041](#2041))
([3c696bb](3c696bb))
* cli canary & deployment
([#2053](#2053))
([1ddd24a](1ddd24a))
* **rpc:** Fixes getNodeInfo serialisation
([#1991](#1991))
([0a29fa8](0a29fa8))


### Miscellaneous

* **circuits:** - use msgpack for cbind routines of native private
kernel circuits
([#1938](#1938))
([3dc5c07](3dc5c07))
* **docs:** API docs stucture
([#2014](#2014))
([9aab9dd](9aab9dd))
* Update function selector computation
([#2001](#2001))
([e07ea1a](e07ea1a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
spalladino added a commit that referenced this pull request Sep 6, 2023
Adds a guide on testing dapps. While writing the guide, I had to add a
`getPrivateStorageAt` method; but while reviewing other issues I noted
that this method already existed and was deleted on purpose, due to lack
of authentication.

I'd like to reincorporate the method, since it's useful for testing, and
we already lack authentication for accessing other private information
(like just calling `view` on a function that loads private notes) so we
are not opening a new avenue for attack.

- [x] Explain how to use sandbox pre-created accounts instead of
creating new ones (depends on #2002)
- [x] Extract utility function to spin up local node and show how to use
it
- [x] Set blockTimestamp to block object, add getBlock method to RPC
server, and use it to demo `warp` usage (extracted to
#2009)
- [x] Add documentation test suite to CI as yet another e2e
- [x] Add `getPrivateStorageAt` to cheat codes

Depends on #1991
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants