forked from gnolang/gno
-
Notifications
You must be signed in to change notification settings - Fork 0
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: DAO SDK #18
Open
n0izn0iz
wants to merge
358
commits into
master
Choose a base branch
from
daosdk
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: DAO SDK #18
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n0izn0iz
force-pushed
the
daosdk
branch
3 times, most recently
from
April 13, 2024 17:22
8390ec4
to
05433bd
Compare
Co-authored-by: Leon Hudak <[email protected]>
Co-authored-by: Leon Hudak <[email protected]>
…lang#2805) minor change spotted when browsing tm2 code. fail.Fail is called a lot in hot paths, like in the tm2 state machine. This avoids calling os.Getenv each time, which actually does a [bunch of stuff](https://github.com/golang/go/blob/ae8708f7441b24dac126122c5365327d29fa0012/src/syscall/env_unix.go#L69-L88), even when there is no associated env var.
Extracted from gnolang#2551 (also gnolang#2516). <!-- 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> --------- Signed-off-by: moul <[email protected]> Co-authored-by: Morgan <[email protected]>
<!-- please provide a detailed description of the changes made in this pull request. --> I noticed that we emit events from the VM even when a transaction fails. This is very difficult to write tests for because we don't display events when a transaction fails, but I was able to verify the following behavior BEFORE this fix: 1. Events emitted for failing transactions are stored in the block results 2. Events emitted by `r/sys/validators` will be processed and the state updated as normal, even if the transaction that emitted them fails Correct me if I'm wrong, but I don't think we want to persist or take any other actions on events sourced from failing transactions. I'm open to suggestions on how to write tests for this, but the fix should be self-explanatory. <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>
I must have used this as an example a thousand times, but I just realised it doesn't exist as an example. <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>
…tions group (gnolang#2810) Bumps the actions group with 1 update: [coursier/setup-action](https://github.com/coursier/setup-action). Updates `coursier/setup-action` from 1.3.5 to 1.3.6 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/coursier/setup-action/releases">coursier/setup-action's releases</a>.</em></p> <blockquote> <h2>v1.3.6</h2> <h2>What's Changed</h2> <ul> <li>build(deps-dev): bump <code>@types/node</code> from 20.11.15 to 20.11.28 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/557">coursier/setup-action#557</a></li> <li>build(deps): bump undici from 5.28.2 to 5.28.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/549">coursier/setup-action#549</a></li> <li>build(deps-dev): bump eslint from 8.56.0 to 8.57.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/559">coursier/setup-action#559</a></li> <li>Update dist by <a href="https://github.com/github-actions"><code>@github-actions</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/558">coursier/setup-action#558</a></li> <li>build(deps): bump peter-evans/create-pull-request from 5 to 6 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/543">coursier/setup-action#543</a></li> <li>build(deps-dev): bump prettier from 3.2.4 to 3.2.5 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/544">coursier/setup-action#544</a></li> <li>build(deps-dev): bump <code>@typescript-eslint/parser</code> from 6.20.0 to 6.21.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/546">coursier/setup-action#546</a></li> <li>build(deps-dev): bump <code>@typescript-eslint/eslint-plugin</code> from 6.20.0 to 7.0.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/548">coursier/setup-action#548</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.11.28 to 20.11.30 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/560">coursier/setup-action#560</a></li> <li>build(deps-dev): bump typescript from 5.3.3 to 5.4.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/562">coursier/setup-action#562</a></li> <li>build(deps-dev): bump eslint-plugin-github from 4.10.1 to 4.10.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/563">coursier/setup-action#563</a></li> <li>build(deps-dev): bump typescript from 5.4.2 to 5.4.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/564">coursier/setup-action#564</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.11.30 to 20.12.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/566">coursier/setup-action#566</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.12.2 to 20.12.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/568">coursier/setup-action#568</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.12.3 to 20.12.4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/569">coursier/setup-action#569</a></li> <li>build(deps): bump undici from 5.28.3 to 5.28.4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/570">coursier/setup-action#570</a></li> <li>Update dist by <a href="https://github.com/github-actions"><code>@github-actions</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/571">coursier/setup-action#571</a></li> <li>build(deps-dev): bump typescript from 5.4.3 to 5.4.4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/572">coursier/setup-action#572</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.12.4 to 20.12.5 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/573">coursier/setup-action#573</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.12.5 to 20.12.6 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/575">coursier/setup-action#575</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.12.6 to 20.12.7 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/576">coursier/setup-action#576</a></li> <li>build(deps-dev): bump typescript from 5.4.4 to 5.4.5 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/577">coursier/setup-action#577</a></li> <li>chore: Update macos CI to use 12 instead of latest by <a href="https://github.com/tgodzik"><code>@tgodzik</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/582">coursier/setup-action#582</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.12.7 to 20.12.8 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/581">coursier/setup-action#581</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.12.8 to 20.12.10 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/583">coursier/setup-action#583</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.12.10 to 20.12.11 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/584">coursier/setup-action#584</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.12.11 to 20.12.13 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/589">coursier/setup-action#589</a></li> <li>build(deps-dev): bump prettier from 3.2.5 to 3.3.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/590">coursier/setup-action#590</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.12.13 to 20.14.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/591">coursier/setup-action#591</a></li> <li>build(deps-dev): bump eslint-plugin-github from 4.10.2 to 5.0.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/592">coursier/setup-action#592</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.14.0 to 20.14.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/595">coursier/setup-action#595</a></li> <li>build(deps-dev): bump prettier from 3.3.0 to 3.3.1 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/596">coursier/setup-action#596</a></li> <li>build(deps-dev): bump eslint-plugin-github from 5.0.0 to 5.0.1 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/597">coursier/setup-action#597</a></li> <li>build(deps-dev): bump prettier from 3.3.1 to 3.3.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/598">coursier/setup-action#598</a></li> <li>build(deps-dev): bump braces from 3.0.2 to 3.0.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/600">coursier/setup-action#600</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.14.2 to 20.14.5 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/601">coursier/setup-action#601</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.14.5 to 20.14.6 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/603">coursier/setup-action#603</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.14.6 to 20.14.7 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/605">coursier/setup-action#605</a></li> <li>build(deps-dev): bump typescript from 5.4.5 to 5.5.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/604">coursier/setup-action#604</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.14.7 to 20.14.8 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/606">coursier/setup-action#606</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.14.8 to 20.14.9 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/608">coursier/setup-action#608</a></li> <li>build(deps-dev): bump typescript from 5.5.2 to 5.5.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/609">coursier/setup-action#609</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.14.9 to 20.14.10 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/611">coursier/setup-action#611</a></li> <li>build(deps-dev): bump prettier from 3.3.2 to 3.3.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/613">coursier/setup-action#613</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.14.10 to 20.14.11 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/615">coursier/setup-action#615</a></li> <li>build(deps-dev): bump typescript from 5.5.3 to 5.5.4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/616">coursier/setup-action#616</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.14.11 to 20.14.12 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/618">coursier/setup-action#618</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 20.14.12 to 22.0.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/619">coursier/setup-action#619</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/coursier/setup-action/commit/0787deaffb0eb8fd3a2fad5953cfae083456a22b"><code>0787dea</code></a> build(deps-dev): bump <code>@types/node</code> from 22.5.4 to 22.5.5</li> <li><a href="https://github.com/coursier/setup-action/commit/37623501981afbabe9795d00442f65e260fa83e8"><code>3762350</code></a> build(deps-dev): bump eslint-plugin-github from 5.0.1 to 5.0.2</li> <li><a href="https://github.com/coursier/setup-action/commit/53517270319003a659fecfe0905169dd86d64ba2"><code>5351727</code></a> build(deps-dev): bump typescript from 5.5.4 to 5.6.2</li> <li><a href="https://github.com/coursier/setup-action/commit/63352a177d2274747656ede709805c62da478820"><code>63352a1</code></a> build(deps): bump peter-evans/create-pull-request from 6 to 7</li> <li><a href="https://github.com/coursier/setup-action/commit/c23b91f658affa1aa2bfb3f79fc4167133be6167"><code>c23b91f</code></a> build(deps-dev): bump <code>@types/node</code> from 22.5.3 to 22.5.4</li> <li><a href="https://github.com/coursier/setup-action/commit/470a4f14163989d8518bd5bcd8494e71f5cd43a8"><code>470a4f1</code></a> build(deps-dev): bump <code>@types/node</code> from 22.5.2 to 22.5.3</li> <li><a href="https://github.com/coursier/setup-action/commit/83da41bbd3a563f0f803111b8009425dd812328d"><code>83da41b</code></a> build(deps-dev): bump <code>@types/node</code> from 22.5.1 to 22.5.2</li> <li><a href="https://github.com/coursier/setup-action/commit/c43d82d51a66b101c7b38ec3a98eebea6d891664"><code>c43d82d</code></a> build(deps-dev): bump <code>@types/node</code> from 22.5.0 to 22.5.1</li> <li><a href="https://github.com/coursier/setup-action/commit/4b88d7ef351b98b33ad7e39404a2dab2de18aaf6"><code>4b88d7e</code></a> Update dist</li> <li><a href="https://github.com/coursier/setup-action/commit/f804cae3a18a8312c27b976b1fbfaadef05fd021"><code>f804cae</code></a> build(deps-dev): bump <code>@types/node</code> from 22.4.2 to 22.5.0</li> <li>Additional commits viewable in <a href="https://github.com/coursier/setup-action/compare/v1.3.5...v1.3.6">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=coursier/setup-action&package-manager=github_actions&previous-version=1.3.5&new-version=1.3.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Extracted from gnolang#2551. See gnolang#2551 (comment). <!-- 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> --------- Signed-off-by: moul <[email protected]>
The quickstart guide on the gno README had outdated gnofaucet information: https://github.com/gnolang/gno/blob/master/examples/gno.land/r/demo/boards/README.md#alternative-run-a-faucet-to-add-gnot Refactored and updated the orphaned gnofaucet README from: https://github.com/gnolang/gno/blob/98cc986cbeb4d911944711a102334eb5d0cb4727/gno.land/cmd/gnofaucet/README.md <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>
The example is using a wrong argument (probably copy pasted from the previous one above) that doesn't match the function signature (2nd param is an optional `height` <details><summary>Contributors' checklist...</summary> - [ ] 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 - [ ] 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>
Closes gnolang#2688. The PR adds support for timezone locations by embedding an [IANA timezone database](https://github.com/eggert/tz) that gets loaded into memory when gno.land is started. The gno stdlib's time package has been updated by porting over code from the go stdlib to support locations. This feature allows users to create time instances with locations to ensure that temporal adjustments result in accurate results by following both historical rules and current rules. <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>
## Things changes * using new action plugin: [benchmark-action/github-action-benchmark](https://github.com/benchmark-action/github-action-benchmark) * previous library was [bobheadxi/gobenchdata](https://github.com/bobheadxi/gobenchdata) * creating alerts when benchmarks results are worse ## Things unchanged * Pushing benchmarks results onto a local branch, then `benchmark` repository will fetch from this into his own `gh-pages` * direct push is possible but requires PAT token to be used ## Things TODO (before merging) * restore benchmarks actions which were manually disabled directly in the `Action` menu in Github * drop and recreate branch `gh-repository` * fix benchmark tests in Gno repo (see gnolang#2711 and gnolang#2714) * Evaluate alternative configuration possibilities [here](https://github.com/benchmark-action/github-action-benchmark?tab=readme-ov-file#action-inputs) ## Things to consider (performance) * Should solve gnolang#2432 * are resources available in the Github basic runners enough for benchmarks? * are multiple runs spawned in the same hw conditions? * consider using [Larger Runner](https://docs.github.com/en/actions/using-github-hosted-runners/using-larger-runners/managing-larger-runners#adding-a-larger-runner-to-an-organization) or restoring a [Self-Hosted Runner](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-an-organization)
<!-- 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> --------- Co-authored-by: Morgan <[email protected]>
…boards easier (gnolang#2823) Fixes gnolang#990. <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>
…ang#2854) Fixing some benchmarks that were failing after activating benchmark runs at PRs and master. Signed-off-by: Antonio Navarro <[email protected]>
- [x] rename `r/manfred` -> `r/moul` - [x] switch from `g1u7y667z64x2h7vc6fmpcprgey4ck233jaww9zq` to `g1manfred47kzduec920z88wfr64ylksmdcedlf5` vanity addr - [x] create anti-squatting r/manfred --------- Signed-off-by: moul <[email protected]> Co-authored-by: Morgan <[email protected]>
Signed-off-by: Antonio Navarro <[email protected]>
…rs (gnolang#2861) Supporting different labels for Self-hosted runners used for Benchmarks test
This PR significantly modifies the github-bot's comment and adds a button to force the success of its CI check, even it the requirements provided in the config are not met. Related to gnolang#3238 (comment) **Edit**: I updated [the comment below](gnolang#3311 (comment)) by running the bot on my laptop if you want to see the result (so the skip button is not working yet).
### Summary This pull request adds a new realm example to the Gno `examples` repository—Matija's Homepage. It showcases a personal homepage built on the Gno chain where users can interact by voting with GNOT tokens to change the page's color. The more tokens users send, the greater influence they have on the color scheme, providing an interactive and dynamic experience. ### Key Features - **Profile Section**: Displays a personal profile with an image and description. - **Color Voting**: Users can vote for the page's color (red, green, blue) by sending GNOT tokens. RGB values are adjusted based on the amount sent. - **Dynamic Updates**: The homepage dynamically updates the color based on votes, showcasing real-time interaction on the Gno blockchain. - **Links to GitHub and LinkedIn**: Includes buttons for GitHub and LinkedIn, making it easy for users to connect. ### Tools & Technologies - Utilizes Gno's native functions to handle voting and token transfers. - Provides a simple, yet effective example of how personal realms can be interactive and engaging on the Gno platform. ### Why this is valuable This example highlights the possibilities of personal realms on Gno, showing how users can create unique and interactive profiles. It’s a fun and approachable entry point for anyone new to Gno development, while also demonstrating the platform's flexibility and potential for creative expression. --------- Co-authored-by: Morgan <[email protected]> Co-authored-by: Leon Hudak <[email protected]>
as the title says. it give incorrect error before fix: ``` unexpected panic: main/files/block0.gno:3:1: [function "foo" does not terminate] ```
<!-- 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> --------- Co-authored-by: Morgan <[email protected]>
…olang#3298) bool8.gno was failing, because the result of the `==` expression is an untyped boolean, while the first value is a typed boolean. This PR ensures that if either of the values in a binary expression is typed, we return a typed bool instead of an untyped bool. --------- Co-authored-by: ltzmaxwell <[email protected]>
The new package is a generic implementation for datasources. It aims to be one possible solution to integrate/aggregate data from different realms.
…lang#3121) If we want to guard the MemStore by checking the active DAO realm, m.daoPkgPath must first be assigned a realm package path; otherwise, the isCallerDAORealm() method may return a false positive, failing to protect the MemStore. <!-- 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 </details> --------- Co-authored-by: Miloš Živković <[email protected]>
fix gnolang#2107 -------------------------- ## Problem > From [gnolang#875 (review)](gnolang#875 (review)): > > > That said, soon after this is merged, I think we'll need to change this API again. This current implementation creates an inconsistency within the Banker API. All other banker methods now require you to pass in the full realm path to the token you're referring to, but IssueCoin and RemoveCoin do not. > > Thus, I think a few more changes are in order: > > > > 1. There should be a `RealmDenom(pkgpath, denom string)` function in `std`, which creates a realm denomination (ie. `/gno.land/r/morgan:bitcoin`). There can be a helper method `Realm.Denom(denom string)` (so you can do `std.CurrentRealm().Denom("bitcoin")` > > 2. Instead of modifying `denom`'s value in the native function, we should check it matches what we expect. ie. `strings.HasPrefix(denom, RealmDenom(std.CurrentRealm().PkgPath())`, then check the last part of the denom to see that it matches the Gno regex. (This can all be done in gno, without needing to put it in native code) > > Related with gnolang#1475 gnolang#1576 ------------------------- ## Solution BREAKING CHANGE: All previous realm calling IssueCoin or RemoveCoin are now expected to append the prefix "/" + realmPkgPath + ":" before the denom, it should be done by using ``std.CurrentRealm().CoinDenom(denom string)`` or by using ``std.CoinDenom(pkgPath, denom string)`` For now to avoid to mix coins and fix security issues like being able to issue coins from other realm, when a realm issue a coin, the pkg path of the realm is added as a prefix to the coin. the thing is some function expect only the base denom ``bitcoin`` (issue & remove) but the others like get require the qualified denom ``gno.land/r/demo/banktest:bitcoin``. it can be confusing I also answer the requirements of the comment @thehowl made: - Two functions are now available ``std.CoinDenom(pkgpath, demon string)`` && the method ``std.Realm.CoinDenom(denom string)`` - the denom's value is changed in the `.gno` file and not the native. Here is an example of how it looks like: ```go func IssueNewCoin(denom string, amount int64) string { std.AssertOriginCall() banker := std.GetBanker(std.BankerTypeRealmIssue) addr := std.PrevRealm().Addr() banker.IssueCoin(addr, std.CurrentRealm().CoinDenom(denom), amount) return std.CurrentRealm().Denom(denom) } func RemoveCoin(denom string, amount int64) { std.AssertOriginCall() banker := std.GetBanker(std.BankerTypeRealmIssue) addr := std.PrevRealm().Addr() banker.RemoveCoin(addr, std.CurrentRealm().CoinDenom(denom), amount) } func GetCoins(denom string) uint64 { banker := std.GetBanker(std.BankerTypeReadonly) addr := std.PrevRealm().Addr() coins := banker.GetCoins(addr) for _, coin := range coins { if coin.Denom == std.CurrentRealm().CoinDenom(denom) { return uint64(coin.Amount) } } return 0 } ``` <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 </details> --------- Co-authored-by: Morgan Bazalgette <[email protected]> Co-authored-by: Leon Hudak <[email protected]>
Co-authored-by: Nathan Toups <[email protected]> Co-authored-by: Morgan <[email protected]>
…nolang#3247) This is quick initial PoC of a Gno.me integration idea.
# loci (package and realm) This is a realm I've developed as part of a larger project I have in the works. While I have a specific purpose for it, the loci realm is free to be used by anyone who wants to have a mutable data store for placing a byte slice tied to their caller address. This can be useful for pointing to other immutable data. `loci` is a single purpose datastore keyed by the caller's address. It has two functions: Set and Get. loci is plural for locus, which is a central or core place where something is found or from which it originates. In this case, it's a simple key-value store where an address (the key) can store exactly one value (in the form of a byte slice). Only the caller can set the value for their address, but anyone can retrieve the value for any address.
address gnolang#3191 Reworking the `gnoweb` package: - Implement `gnoweb` new interface design(cc @alexiscolin). - Move Markdown rendering to the server to enhance speed and security. This change also simplifies the implementation of new components, making it more standardized as a Go library. - Aim to keep dependencies minimal, using only `goldmark` for Markdown and `chroma` for code highlighting, with almost no (in)direct dependencies. - Transition to Tailwind for simplicity and maintainability. - Retain all features from the previous `gnoweb` iteration. ### Preview - Home ![Screenshot 2024-11-25 at 19 39 54](https://github.com/user-attachments/assets/7a4b99d9-c223-49e7-9ae6-6561be85d1d3) - Source ![Screenshot 2024-11-25 at 19 41 25](https://github.com/user-attachments/assets/cb650eca-70d6-48f5-9c25-d247aecf45c3) - Docs ![Screenshot 2024-11-25 at 19 45 16](https://github.com/user-attachments/assets/1d79bb25-e431-42db-bc0e-0fdefca85339) ### TODO: - [x] port and adapt all previous tests to ensure compatibility (it should not take too long) - [x] Some cleanup and restructuring + linting. --------- Signed-off-by: gfanton <[email protected]> Co-authored-by: alexiscolin <[email protected]> Co-authored-by: Morgan Bazalgette <[email protected]>
Remove default static folder to use embed public folder Signed-off-by: gfanton <[email protected]>
closes gnolang#3336 Co-authored-by: Nathan Toups <[email protected]>
[proto/github.com/tendermint/go-amino/genproto/example](https://github.com/gnolang/gno/tree/master/tm2/pkg/amino/genproto/example/proto/github.com/tendermint/go-amino/genproto/example) is using the old repository directory. The proto/* directory is listed in .gitignore and should not be included in the repository.
<!-- please provide a detailed description of the changes made in this pull request. --> ## Summary: This PR updates the CPU and Store gas based on results from the benchmarking tool:gnolang#2241 For CPU gas, the measurement is in nanoseconds per opcode execution. For storage gas, the measurement is in nanoseconds per byte for each type of Gno store access. ## Changes: We moved the gas meter from the underlying store to the upper Gno store to capture accurate resource consumption for VM transactions. At the same time, we retain the original gas store and gas meter for the Auth Keeper to handle regular blockchain transactions that do not necessarily involve the VM. We also updated the gas-wanted in the integration test to reflect actual gas usage. This can serve as a flag to alert us to future changes that might increase gas assumptions. Additional reasons for these changes include: - The Gno VM store processes additional complex encoding and decoding of data structures, rather than simply reading and writing bytes to disk. - For the above reason, we benchmarked gas for store access at the Gno store level. - We want to avoid consuming gas at two points for a single store access during a VM transaction. Here are the diagrams to explain the store access gas before and after changes #### Before: ![image](https://github.com/user-attachments/assets/7f1f7361-623d-4bdf-ba28-9b337da649fc) #### After: ![image](https://github.com/user-attachments/assets/c5ce6e36-e2f7-4f10-bebf-4278f9d16e47) <details><summary>Contributors' checklist...</summary> - [x] Added new tests - [ ] 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 - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests </details>
<!-- please provide a detailed description of the changes made in this pull request. --> # Context This PR is inspired by EIP-1559 and adjusts the gas price based on the ratio of gas used in the last block compared to the target block gas. The gas price is enforced globally across the network. However, validators can still configure a minimum gas price (min-gas-price) to reject low-fee transactions and prevent mempool spam. A higher gas price will take precedence when configured. Current implementation is an alternative to [PR2544](gnolang#2544) and is based on the feedbacks. Here are the main differences: - Dynamic gas prices are managed by a new auth.GasPriceKeeper, rather than being saved in the block header. - Gas price configurations have been moved from consensus parameters to GnoGenesisState and are stored in a new parameter module. - The parameters can be modified later through governance proposals, making it easier to update these configurations without requiring a chain upgrade. - All implementations are on the application side, with no changes made to the consensus layer. # High level flow Start a new node from genesis. The initial gas price and formula parameters are saved in the genesis and loaded into the params keeper and gas keeper. ![image](https://github.com/user-attachments/assets/6f7bbf56-5196-4ee2-9c77-c55331cbfde6) When a node receives a new transaction, the application checks if the user has provided sufficient fees for the transaction. It will reject the transaction if it does not meet the gas price set by the network and individual nodes. ![image](https://github.com/user-attachments/assets/c9123370-0f83-4ef9-a4e6-a09c6aad98c9) The node processes the entire block during the proposal, voting, and restart phases. The GasPriceKeeper will calculate and update the gas price according to the formula in the application’s EndBlock() function. ![image](https://github.com/user-attachments/assets/51d233be-318b-4f05-8a45-3157604657ea) # Formular ![image](https://github.com/user-attachments/assets/ba282aba-a145-46d3-80b8-dcc5787d2a0b) The compressor is used to reduce the impact on price caused by sudden changes in the gas used within a block ## When the last gas used in a block is above the target gas, we increase the gas price ![image](https://github.com/user-attachments/assets/bb31dcbe-aaab-4c1a-b96f-156dafef80fc) ## When the last gas used in a block is below the target gas, we decrease the gas price until it returns to the initial gas price in the block. ![image](https://github.com/user-attachments/assets/c200cd1a-d4f3-4b4d-9198-2af08ad657ab) ## Impact The Cosmos SDK has an optional setting for a minimum gas price. Each validator can configure their own values to only accept transactions with a gas price that meets their setting in the mempool. When a user submits a transaction on-chain, the gas price is calculated as gas-fee / gas-wanted. With the addition of the block gas price, a network-wide minimum gas price is enforced for every validator. Users will need to provide a gas price that meets the requirements set by both the validator and the network. <details><summary>Contributors' checklist...</summary> - [X] Added new tests - [X] Provided an example (e.g. screenshot) to aid review - [ ] 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 the titles and remove social icons from gno.land homepage
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
Signed-off-by: Norman Meier <[email protected]>
…e API (gnolang#3331) ## Description This PR exposes safe objects where possible for ownable and pausable packages. Let's start exposing variables named `Ownable`, ie: ```go var Ownable = ownable.New() ``` This is the intended use, as exposing this field allows direct, safe, MsgRun calls to access the ownable functions. It's also impossible to directly reassign the value of this variable from another realm. This PR also introduces a BREAKING CHANGE: the `Ownable.CallerIsOwner` API now returns a boolean instead of an error, which makes more sense considering the name of the function. --------- Co-authored-by: Guilhem Fanton <[email protected]>
This PR aims to fix some of remaining UI bugs on gnoweb after the revamp merge. Some of: gnolang#3355 - Fixes Safari select input design and icons - Fixes input hover - Fixes ToC font style - Fixes UI details and improve CSS - Fixes Responsive with long content - Fixes Scrollbar - Fixes fonts loading strategy and size - Fixes ts issue with copy btn (quick clicks) - Fixes some A11y
This PR aims to fix some of remaining UI bugs on gnoweb after the revamp merge. Some of: gnolang#3355 - Fixes Safari select input design and icons - Fixes input hover - Fixes ToC font style - Fixes UI details and improve CSS - Fixes Responsive with long content - Fixes Scrollbar - Fixes fonts loading strategy and size - Fixes ts issue with copy btn (quick clicks) - Fixes some A11y
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
atomic dao sdk pr