-
Notifications
You must be signed in to change notification settings - Fork 184
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
[RPC] getStateUpdate #365
[RPC] getStateUpdate #365
Conversation
Update the database manager with the marshal and unmarshal functions from protobuf definitions. Use Felt instead its hex representation for storage diffs maps.
Codecov Report
@@ Coverage Diff @@
## main #365 +/- ##
==========================================
- Coverage 92.12% 91.82% -0.30%
==========================================
Files 66 67 +1
Lines 7083 7228 +145
==========================================
+ Hits 6525 6637 +112
- Misses 554 585 +31
- Partials 4 6 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Use github.com/stretchr/testify/assert instead of gotest.tools/assert
Use gotest.tools/assert instead of github.com/stretchr/testify/assert
Resolves #364
Resolves #353
Description
The
starknet_getStateUpdate
RPC endpoint returnsFelt
values as decimal representation when we need it to return them as hexadecimal. Also, I introduce some improvements to the StateUpdate flow (get-save-serve).Changes:
sync.proto
file to manage all database marshal and unmarshal processes forStateUpdate
StateDiff
toStateUpdate
Felt
as a key inStorageDiff
map instead ofstring
BlockHash
instateUpdateResponseToStateDiff
functionValue()
method toFelt
to get the value referenced by a pointer toFelt
Types of changes
Testing
Requires testing: Yes
Did you write tests??: No. I test the output of
starkent_getStateUpdate
by hand and all the errors are fixed. In the future, we need to add unit tests to this.Documentation
If this requires a documentation update, did you add one? No. The documentation is already on
main