Tags: r3v4s/gno
Tags
fix(tm2/std)!: use snake_case JSON fields for MemFile and MemPackage (g… …nolang#2019) This PR changes the MemFile and MemPackage to use `snake_case` fields for their JSON key names. This matches what all other objects in transactions do. A new test ensures that no transaction objects within the VM keeper have uppercase runes within their exported json fields. **BREAKING CHANGE:** old `m_addpkg` and `m_run` transactions will stop working. Clients will need to update accordingly, and this change needs to be synced like gnolang#1939. cc/ @zivkovicmilos @gnolang/berty @gnolang/onbloc --------- Co-authored-by: Miloš Živković <[email protected]>
fix(examples): update /r/demo/bar20/gno.mod (gnolang#2398) <!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details> Update /r/demo/bar20/gno.mod because of failing pipeline
chore(gnovm): move invalid labels tests to tests/files/ (gnolang#2058) See-also https://github.com/gnolang/gno/pull/1877/files#r1568968846
feat: improve missing config error message (gnolang#2247) <!-- please provide a detailed description of the changes made in this pull request. --> If the config file can't be found when running `gnoland start`, then the error message should tell me how to fix this by running `gnoland config init`. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [x] Provided any useful hints for running manual tests - [x] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
fix: Change goreleaser secret name (gnolang#2171)
feat(gnovm, tm2): implement event emission with `std.Emit` (gnolang#1653 ) # Description Succeed in my predecessor's legacy. I have implemented the output to show the path where the event occurred, as discussed in gnolang#1833. Also made it print the timestamp or block height together. ## Key Changes In this change, event emission functionality has been added to the Gno. The main changes include: 1. Introducing of the `emitEvent` function: - The `emitEvent` function emits an event based on the given type and attributes - Attributes are passed as an even-length of array key-value pairs - When emitting an event, the current _package path_, _timestamp_, and _block height_ information are recorded along with the event(discussed in gnolang#1833). This metadata provides additional context about where the event occured. 2. Additional of event-related types and functions in the `sdk` packages: - `NewEvent` creates a new `Event` object based on the provided information. - `ArributedEvent` struct contains informations such as event type, package path, block height, timestamp and attributes. But I'm not sure how to utilize the `eventType` yet. So, I've just put it as a placeholder which will be a disscussion for another time. - `EventArribute` represents an attribute of an event and consists of a key-value pair - `NewEventArribute` creates a new `EventAttribute` object based on the given key-value pair. ## Example ```go package ee import ( "std" ) const ( EventSender = "sender" EventReceiver = "receiver" ) func Sender(){ SubSender() SubReceiver() } func SubSender() { std.Emit( EventSender, "key1", "value1", "key2", "value2", "key3", "value3", ) } func SubReceiver() { std.Emit( EventReceiver, "bar", "baz", ) } func Receiver() { std.Emit( EventReceiver, "foo", "bar", ) } ``` ### Result ```json [ "{\"type\":\"sender\",\"pkg_path\":\"gno.land/r/demo/ee\",\"identifier\":\"SubSender\",\"timestamp\":1713846501,\"attributes\":[{\"key\":\"key1\",\"value\":\"value1\"},{\"key\":\"key2\",\"value\":\"value2\"},{\"key\":\"key3\",\"value\":\"value3\"}]}", "{\"type\":\"receiver\",\"pkg_path\":\"gno.land/r/demo/ee\",\"identifier\":\"SubReceiver\",\"timestamp\":1713846501,\"attributes\":[{\"key\":\"bar\",\"value\":\"baz\"}]}" ] ``` ## Related Issue/PR gnolang#575 emit & event built-in functions (@r3v4s) gnolang#853 feat: event & emit in gno (@anarcher) <- previous work. gnolang#975 [META] Gno Wishlist / Feature Request Dump (@zivkovicmilos) --------- Co-authored-by: n3wbie <[email protected]> Co-authored-by: Manfred Touron <[email protected]>
fix: hardcode max vm cycles in keeper (gnolang#1807) <!-- please provide a detailed description of the changes made in this pull request. --> This hardcodes the maximum VM cycles in the keeper to ten million, the same that is currently being used from genesis. It doesn't seem like there is a reason why we should want people to be able to adjust this. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [x] Provided any useful hints for running manual tests - [x] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
refactor!: split `r/demo/users` (gnolang#1433) Splits `r/demo/users` into `p/demo/users` and `r/demo/users` Related gnolang#1393 <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [x] Provided any useful hints for running manual tests - [x] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
feat(cmd/gno): move test output within gno code (gnolang#1594) Once again, welcome to "I was annoyed by a small thing that I wanted to do a 10 minute fix for and ended up on a refactoring detour". This PR moves the output of the `gno test` function to happen within the gno code. This solves a number of issues: - filtered tests are no longer printed to the console with `--- FILT` (my original 10-minute fix) - test output is no longer buffered - success of subtests is reported correctly - run/success report of subtests goes to stderr instead of stdout - `--- FAIL` is not printed for every time a Fail function is called (ie. only once) - as a bonus, `SkipNow` and `FailNow` actually work, so now you can Skip and Fatal your way out of test functions. Fixes gnolang#665
style: increase doc body max width (gnolang#1485) <!-- please provide a detailed description of the changes made in this pull request. --> Increase documentation website body `max-width` in order to improve the render on large screen but keeping the main column width under the recommended `max-width` for staying comfortable to read (UX). <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
PreviousNext