-
Notifications
You must be signed in to change notification settings - Fork 341
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
feat: add /r/sys/vals
#2130
base: master
Are you sure you want to change the base?
feat: add /r/sys/vals
#2130
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2130 +/- ##
==========================================
+ Coverage 54.64% 54.67% +0.03%
==========================================
Files 578 577 -1
Lines 77870 77671 -199
==========================================
- Hits 42551 42468 -83
+ Misses 32149 32049 -100
+ Partials 3170 3154 -16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
import ( | ||
"std" | ||
|
||
"gno.land/p/demo/json" |
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.
please, please, please, do NOT use this. especially on sys contracts.
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.
Do you suggest we simply return the typed set itself, instead of marshaling it to JSON?
The biggest concern I have there is that clients will be unable to parse the returned set, because our VM calls return values that need custom parsing (and don't contain type info)
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.
About std.Emit
in your contract:
- You can keep it for external users.
- However, you cannot use it to transfer data from the userland to the module. Instead, you should use a returned value that is explicitly typed and returned, making it easily testable and type-safe. Use a
gno.Machine
and call an unexported function getChanges from your realm to retrieve the changes and reset the changes set. For now, you can use simple types, but later we may need to improve to use ABCI types from the userland or what Guilhem is working on with Amino. - You can keep the event trigger routing in this PR, but it would also be acceptable/(preferred?) to keep this PR super simple and only perform
gno.Machine
verification at each block until another PR improves thegnosdk
with this optimized triggering logic.
I've applied the following suggestions in this commit:
We left this logic for #2229 -- after the minimal event footprint in this PR, we can make the logic work as follows:
|
Description
This PR introduces an initial validator set implementation in Gno (realm based), as outlined in #1824.
I've added 2 example implementations:
I've left the door open to arbitrary protocol implementations (Proof of Contribution...).
Closes #1824
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description