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
Test/action #2
Open
Villaquiranm
wants to merge
96
commits into
master
Choose a base branch
from
test/Action
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
Test/action #2
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
## Description This PR removes the ancient docker integration test contained in `misc` that fails, and a random docker compose, also in `misc`. This test package is actually never even run on `master`, because it requires a specific build flag `docker` 🤷♂️ Closes gnolang#3161 <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 - [ ] Provided any useful hints for running manual tests </details>
…ed -> r/moul (gnolang#2820)" (gnolang#2865)" (gnolang#3024) This reverts commit 69400d4. Revertception. <!-- 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> --------- Signed-off-by: moul <[email protected]> Co-authored-by: Miloš Živković <[email protected]>
…tion which does not return any value (gnolang#3049) This PR aims at resolving this issue: gnolang#1082 This depends on gnolang#3017 because it refactored the code to sync the logic/code between AssignStmt vs ValueDecl. Related gnolang#2695 <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: hieu.ha <[email protected]> Co-authored-by: Mikael VALLENET <[email protected]>
This provides validation for cases where bit shifting const expressions overflow. Closes gnolang#3128 --------- Co-authored-by: ltzmaxwell <[email protected]>
…lang#3177) <!-- please provide a detailed description of the changes made in this pull request. --> ## Description Fixes a broken link on the home page and renames the gno.land blog. Two options for the blog name: - gno.land's blog - The Gno Blog Option 1 seems favorable. <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>
…ang#3183) # TLDR There's no place like [home](https://gno.land/r/n2p5/home). This PR is for `gno` code in [/r/n2p5/home](https://gno.land/r/n2p5/home) and its supporting packages and realms. This is a more extensive PR than I'd hoped, but it is because I ended up structuring out two new little packages [chonk]() and [group](), as well as a [config]() pattern that works for my home realm, but is reusable as well. If you like this, vote for me on [Leon's Hall of Fame](https://gno.land/r/leon/hof) # Summary of changes ## [/p/n2p5/chonk](https://gno.land/p/n2p5/chonk/) `chonk` is a linked-list based string chunker. This allows for arbitrarily large strings to be stored on-chain across multiple transactions. The original idea for this was to be able to support large `Render(path string) string` calls. You can think of this as supporting a "static site generator" pattern, where Markdown can be broken up into chunks and then rendered as one large payload. It is used directly in `/r/n2p5/home`. ## [/p/n2p5/mgroup](https://gno.land/p/n2p5/mgroup/) `mgroup` (Managed Group) is a bit like `authorizable,` but the goals are a bit different. I wanted a "managed group" with a single `ownable` owner, but I wanted an arbitrary list of "backup owners," which are accounts that could "claim" ownership if the owner account became unavailable. I also wanted to be able to manage the group members themselves. Another difference here is has the ability to return information about the group such as - a list of all backup owners (there is a method for the complete list, but also a method for an offset and max count iterator for large groups) - a list of all members (there is a method for the complete list, but also a method for an offset and max count iterator for large groups) ## [/r/n2p5/config](https://gno.land/r/n2p5/config) Inspired by the config work done by @moul and @leohhhn for their home realms, I decided to take a crack at it as well. This config allows me to use `mgroup` to manage the config auth. This allows me to power cross-realm auth using this config realm, and it powers the auth for my home realm. ## [/r/n2p5/home](https://gno.land/r/n2p5/home) Bringing this all together, the home realm uses `chonk` and `/r/n2p5/config` to Render the Markdown stored in the chonk data store. Because you might submit data over multiple transactions, I've added the ability to "preview" and "promote" render data, you can see this in the two variations on the URL: - https://gno.land/r/n2p5/home - https://gno.land/r/n2p5/home:preview <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>
This PR tackles a large amount of improvements in our current internal testing systems for the gnovm, as well as those for `gno test`. The primary target is the execution of filetests; however many improvements have been implemented to remove dead or duplicate code, and bring over some of the improvements that have been implemented in tests to filetests, when they come at little added "cost". The biggest headline concerns the execution of filetests. I wrote the specific improvements undertaken in a [blog post on "diary of a gnome"](https://gno.howl.moe/faster-tests/), but here's a side-by-side comparison of the execution in this PR (left) and the execution on master (right). ![filetests](https://github.com/user-attachments/assets/049680f2-baeb-4f24-8f0f-60ae5fa4bce5) - Fixes gnolang#1084 - Fixes gnolang#2826 (by addressing root cause of slowness) - Fixes gnolang#588, only running `_long` filetests on master and generally speeding up test execution. ## Impact - Test context (tests and filetests) - Tests and filetests now share the same `test.Store` when running. Coupled with `test.LoadImports`, it allows us to "eagerly load" imports ahead of the test execution, and save it in the store. This is the primary performance improvement of this PR, as all pure packages can be run and preprocessed only once, whereas before it was once per package, and once per filetest. (More info in the blog post.) - One of the consequences of this is that package initialization happens outside of the test; so a filetest can no longer check the output of a `println` used in package initialization. - The default user no longer has 200 gnot by default. There are two mechanisms that make this unnecessary: `// SEND:`, and `std.TestIssueCoin`. Some test balances had to be updated. - Filetests - Running filetests in `gno test -v` now also prints their output. - Realm tests are no longer executed in `main.gno`, but in a filename following the name of the filetest; this changed some `// Realm:` directives. - The sytem to read directives and update them in the filetests has been re-written, and should now be more resilient and with fewer "exceptions". This means that leading and trailing whitespace in output now is correctly considered as output, leading to the addition of many empty `//` in the tests. - `// Error:` directives are now treated the same as everything else; and are updated if the `-update-golden-tests` flag is passed. - Removed the `imports` metric from the runtime metrics, as it's now no longer straightforward to calculate (given that imports are loaded "eagerly"). - Removed support for different "modes" of importing stdlibs; further removing support for gonative (gnolang#1361). The remaining gonative libraries are `os`, `fmt`, `encoding/json`, `internal/os_test` and `math/big`. This removes the `-with-native-fallback` flag from `gno test`. - Consequently, filetests ending with `_native.gno` have largely been removed, and those ending with `_stdlibs.go` have had their suffix removed. - Some files testing `gonative` types and functions which were only used in a small subset of these tests, have been removed. - Tests - `gno test`, for testing packages, created a `main_test.gno` file that is then called directly from the machine on each test. This creates two identifiers, `tests` and `runtest`, which could come into conflict with those defined by the tests themselves. We now call `testing.RunTest` directly, without an intermediary. - Exports in the normal tests (ie. defined in `pkg`) are now visible in the tests of `pkg_test`. This is most useful for some standard library tests, where there often is an `export_test.go` with the sole scope of exporting some internal functions and methods for testing in the "real" testing file. - `gno lint`, and other occasions where we use `issueFromError` (like when parsing errors in `gno test`), will now also print the column of the error if given. ## Summary of internal changes - pkg/gnolang - `TestFiles` is the new function running the filetests. - `eval_test.go` has been removed, moving some of its improvements over to `TestFiles`, and reducing the scope of the corresponding tests in `debugger.go`, to what it's actually supposed to test for. - As a consequence of removing all of type mappings in `imports.go`, I removed `SetStrictGo2GnoMapping` in favour of always being "strict", and not allowing defining native types of defined types any more. - The tests in `gonative_test` where primarily related to this, so I removed them. Similarly for `preprocess_test`. - `TestFunc` / `TestMemPackage` have been removed as redundant, including some of their features in `cmd/go/test.go` (like supporting exporting symbols in `_test.gno` files) - The `Store` no longer has `ClearCache` and `SetStrictGo2GnoMapping`; `ClearCache` now has a better substitute in `BeginTransaction`. - the `testing` stdlib no longer caches `matchPat` and `matchString` as pure packages should not be able to modify their values during execution, and as a result of other changes this was failing. - The tests/ directory has been removed / moved to `gnovm/pkg/test`. This directory should eventually contain the internal code for `gno test` as well; but for now I wanted to clean `tests` to ensure it is a directory just for integration tests, rather than code and testing systems. - `TestMachine` and `TestStore` have been renamed to Machine and Store, to avoid redundancy with the `test` package name. - Removed plenty instructions in `gnovm/Makefile` as now most tests are just in `pkg/gnolang`. - I removed `MsgContext.Msg` as unused. It can be re-added later if necessary. - In the CI, tests are now run with `-short`, at least until we figure out how to make the VM efficient enough to run these tests. Aside from some filetests, this now excludes some stdlibs: `bytes`, `strconv`, `regexp/syntax`. I accept other proposals that could make us have fast tests on PR's, while still testing (mostly) everything. --- [![Open Source Saturday](https://img.shields.io/badge/%E2%9D%A4%EF%B8%8F-open%20source%20saturday-F64060.svg)](https://lu.ma/open-source-saturday-torino) --------- Co-authored-by: Marc Vertes <[email protected]>
Closes gnolang#3040 50% of the work comes from @harry-hov's PR gnolang#1393 (let's repay to Caesar what belongs to Caesar) 🚀 Notable additions: - handle different domains (e.g github.com/p/demo/...) - skip non ``.gno`` files (LICENSE, README, ...) or empty files <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: n0izn0iz <[email protected]> Co-authored-by: Morgan <[email protected]> Co-authored-by: Morgan <[email protected]>
…20e7 to 0.23.0 in /contribs/gnomd in the go_modules group across 1 directory (gnolang#3154) Bumps the go_modules group with 1 update in the /contribs/gnomd directory: [golang.org/x/net](https://github.com/golang/net). Updates `golang.org/x/net` from 0.0.0-20190813141303-74dc4d7220e7 to 0.23.0 <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/golang/net/commits/v0.23.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/net&package-manager=go_modules&previous-version=0.0.0-20190813141303-74dc4d7220e7&new-version=0.23.0)](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 You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/gnolang/gno/network/alerts). </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#2699) # Description Closes gnolang#1946 The `isNamedConversion` function now includes a safety check to prevent the use of blank identifiers ("_") as values or types. If both `xt` and `t` are nil, the function assumes that a blank identifier is being used inappropriately and panics with an error message that includes the location of the issue. ## Variable Explanations - `xt` (Expression Type): Represents the type of the right-hand side of an assignment or expression. It's the type resulting from evaluating an expression. - `t` (Target Type): Represents the type of the left-hand side of an assignment. It's the variable or field that will receive the value. Checks if a named conversion is needed when assigning a value of type `xt` to a variable of type `t`. ## Preprocess Added some checks to prevent the disallowd usage of blank identifiers in `Preprocess` function level. Theses checks are performed at different stages of the preprocessing: 1. `TRANS_ENTER` for `AssignStmt`: - Checks if both LHS and RHS are blank identifiers in a `DEFINE` statement. 2. `TRANS_LEAVE` for `NameExpr`: - Checks if blank identifier is used as a value in disallowed contexts (excluding `TRANS_ASSIGN_LHS`, `TRANS_RANGE_KEY` and `TRANS_RANGE_VALUE`). 3. `TRANS_LEAVE` for `AssignStmt`: - Checks if RHS is a blank identifier when LHS is not, in a `DEFINE` statement. When any of these conditions are met, the function throws an panics like go message. <!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [X] 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 - [X] 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]>
- [x] depends on gnolang#2941 resolve gnolang#1509 This PR addresses the timestamp issue on gnodev by implementing the `MetadataTX` changes from gnolang#2941. Timestamps will now be correctly handled for `Reload` and `import`/`export`. For `Reset`, the timestamp will be updated to the current time. cc @zivkovicmilos @thehowl #### ~TODOs~ - [x] test replays (I've only tested it manually) <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: gfanton <[email protected]>
## Description This PR allows for a balances restore for the portal loop. <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 - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests </details>
…gnolang#3214) Bumps the actions group with 2 updates in the / directory: [tj-actions/changed-files](https://github.com/tj-actions/changed-files) and [anchore/sbom-action](https://github.com/anchore/sbom-action). Updates `tj-actions/changed-files` from 41 to 45 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tj-actions/changed-files/releases">tj-actions/changed-files's releases</a>.</em></p> <blockquote> <h2>v45</h2> <h1>Changes in v45.0.4</h1> <h2>What's Changed</h2> <ul> <li>Upgraded to v45.0.3 by <a href="https://github.com/tj-actions-bot"><code>@tj-actions-bot</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2308">tj-actions/changed-files#2308</a></li> <li>fix(deps): update dependency <code>@actions/core</code> to v1.11.1 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2309">tj-actions/changed-files#2309</a></li> <li>chore(deps): lock file maintenance by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2310">tj-actions/changed-files#2310</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.7.5 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2312">tj-actions/changed-files#2312</a></li> <li>chore(deps): update dependency typescript to v5.6.3 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2313">tj-actions/changed-files#2313</a></li> <li>chore(deps): lock file maintenance by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2315">tj-actions/changed-files#2315</a></li> <li>skip: step for dependabot PRs by <a href="https://github.com/jackton1"><code>@jackton1</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2317">tj-actions/changed-files#2317</a></li> <li>feat: prevent ignore files warning by <a href="https://github.com/jackton1"><code>@jackton1</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2318">tj-actions/changed-files#2318</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.7.6 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2321">tj-actions/changed-files#2321</a></li> <li>chore(deps): update dependency <code>@types/lodash</code> to v4.17.11 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2322">tj-actions/changed-files#2322</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.7.7 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2323">tj-actions/changed-files#2323</a></li> <li>chore(deps): update dependency <code>@types/lodash</code> to v4.17.12 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2324">tj-actions/changed-files#2324</a></li> <li>chore(deps): lock file maintenance by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2325">tj-actions/changed-files#2325</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.7.8 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2327">tj-actions/changed-files#2327</a></li> <li>chore(deps): update dependency <code>@types/jest</code> to v29.5.14 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2328">tj-actions/changed-files#2328</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.7.9 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2329">tj-actions/changed-files#2329</a></li> <li>chore(deps): update actions/setup-node action to v4.1.0 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2330">tj-actions/changed-files#2330</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.8.0 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2331">tj-actions/changed-files#2331</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.8.1 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2332">tj-actions/changed-files#2332</a></li> <li>chore(deps): lock file maintenance by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2333">tj-actions/changed-files#2333</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.8.2 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2334">tj-actions/changed-files#2334</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.8.4 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2335">tj-actions/changed-files#2335</a></li> <li>chore(deps): update dependency <code>@types/lodash</code> to v4.17.13 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2336">tj-actions/changed-files#2336</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.8.5 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2337">tj-actions/changed-files#2337</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.8.6 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2338">tj-actions/changed-files#2338</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.8.7 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2339">tj-actions/changed-files#2339</a></li> <li>chore(deps): lock file maintenance by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2340">tj-actions/changed-files#2340</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.9.0 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2341">tj-actions/changed-files#2341</a></li> <li>chore(deps): update dependency eslint-plugin-jest to v28.9.0 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2342">tj-actions/changed-files#2342</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/tj-actions/changed-files/compare/v45...v45.0.4">https://github.com/tj-actions/changed-files/compare/v45...v45.0.4</a></p> <hr /> <h1>Changes in v45.0.3</h1> <h2>What's Changed</h2> <ul> <li>Upgraded to v45.0.2 by <a href="https://github.com/tj-actions-bot"><code>@tj-actions-bot</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2282">tj-actions/changed-files#2282</a></li> <li>chore(deps): update dependency eslint to v8.57.1 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2284">tj-actions/changed-files#2284</a></li> <li>chore(deps): update peter-evans/create-pull-request action to v7.0.5 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2286">tj-actions/changed-files#2286</a></li> <li>chore(deps): update actions/setup-node action to v4.0.4 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2287">tj-actions/changed-files#2287</a></li> <li>chore(deps): lock file maintenance by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2289">tj-actions/changed-files#2289</a></li> <li>chore(deps): update dependency <code>@types/lodash</code> to v4.17.9 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2291">tj-actions/changed-files#2291</a></li> <li>chore(deps): update dependency <code>@vercel/ncc</code> to v0.38.2 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2290">tj-actions/changed-files#2290</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.6.1 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2292">tj-actions/changed-files#2292</a></li> <li>chore(deps): update dependency <code>@types/node</code> to v22.7.0 by <a href="https://github.com/renovate"><code>@renovate</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2294">tj-actions/changed-files#2294</a></li> <li>fix: test for since last remote commit check on pull_request closed by <a href="https://github.com/jackton1"><code>@jackton1</code></a> in <a href="https://redirect.github.com/tj-actions/changed-files/pull/2295">tj-actions/changed-files#2295</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tj-actions/changed-files/blob/main/HISTORY.md">tj-actions/changed-files's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <h1><a href="https://github.com/tj-actions/changed-files/compare/v45.0.3...v45.0.4">45.0.4</a> - (2024-11-05)</h1> <h2><!-- raw HTML omitted -->🚀 Features</h2> <ul> <li>Prevent ignore files warning (<a href="https://redirect.github.com/tj-actions/changed-files/issues/2318">#2318</a>) (<a href="https://github.com/tj-actions/changed-files/commit/1f772e919bcbf025d221836bc4b8e3b72e2ef117">1f772e9</a>) - (Tonye Jack)</li> </ul> <h2><!-- raw HTML omitted -->🐛 Bug Fixes</h2> <ul> <li><strong>deps:</strong> Update dependency <code>@actions/core</code> to v1.11.1 (<a href="https://github.com/tj-actions/changed-files/commit/4d0aab94b6284beb85e6cc3dd23ec0ee523dcca6">4d0aab9</a>) - (renovate[bot])</li> </ul> <h2><!-- raw HTML omitted -->➕ Add</h2> <ul> <li>Added missing changes and modified dist assets. (<a href="https://github.com/tj-actions/changed-files/commit/9d7201ded6d75401ce2b888a4f643a921bfb8604">9d7201d</a>) - (GitHub Action)</li> <li>Added missing changes and modified dist assets. (<a href="https://github.com/tj-actions/changed-files/commit/0104c75ccc49741ff97b817da4cd36887e0c13cd">0104c75</a>) - (GitHub Action)</li> </ul> <h2><!-- raw HTML omitted -->📝 Other</h2> <ul> <li>Step for dependabot PRs (<a href="https://redirect.github.com/tj-actions/changed-files/issues/2317">#2317</a>) (<a href="https://github.com/tj-actions/changed-files/commit/684c5e6d941e3591a9de8182da044dd242dc17c9">684c5e6</a>) - (Tonye Jack)</li> </ul> <h2><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h2> <ul> <li><strong>deps:</strong> Update dependency eslint-plugin-jest to v28.9.0 (<a href="https://github.com/tj-actions/changed-files/commit/4edd678ac3f81e2dc578756871e4d00c19191daf">4edd678</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.9.0 (<a href="https://github.com/tj-actions/changed-files/commit/f08255874b882608b0d7f6dde476c5756dbfc08c">f082558</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Lock file maintenance (<a href="https://github.com/tj-actions/changed-files/commit/92c02a00a1b05d13ef79d053e8e8e4aafc1431cd">92c02a0</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.8.7 (<a href="https://github.com/tj-actions/changed-files/commit/b70221184d8c03f985dc253d1a84169c4b530010">b702211</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.8.6 (<a href="https://github.com/tj-actions/changed-files/commit/435fd74b2ec5d115590c1a20ba1101bf9a291563">435fd74</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.8.5 (<a href="https://github.com/tj-actions/changed-files/commit/0626fa3ff3e2030febaa380334fab666814bd24f">0626fa3</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/lodash</code> to v4.17.13 (<a href="https://github.com/tj-actions/changed-files/commit/8817a797cbad83643006b4fafc757bb72a50bd51">8817a79</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.8.4 (<a href="https://github.com/tj-actions/changed-files/commit/54174910beb91e8c0eb59a8449720659f72bf24b">5417491</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.8.2 (<a href="https://github.com/tj-actions/changed-files/commit/84ef16253002b9f411c38d53e45521709f43247e">84ef162</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Lock file maintenance (<a href="https://github.com/tj-actions/changed-files/commit/b672a5115a5ab8c2b27838329a827d3ffda1202c">b672a51</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.8.1 (<a href="https://github.com/tj-actions/changed-files/commit/678cdc28086f7f6f8762a1934db3e94e7c0cadb4">678cdc2</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.8.0 (<a href="https://github.com/tj-actions/changed-files/commit/27b7bbb0aeabaa9258fe4bfd52318bbbb9bdbc9c">27b7bbb</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update actions/setup-node action to v4.1.0 (<a href="https://github.com/tj-actions/changed-files/commit/83610723bb32196f24d5880eca9cd59951b17c69">8361072</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.7.9 (<a href="https://github.com/tj-actions/changed-files/commit/21acf46f4af54c16f04ec314f1929b73692c4441">21acf46</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/jest</code> to v29.5.14 (<a href="https://github.com/tj-actions/changed-files/commit/f356b3c86b5e3dbe272d6579b57cb7344f3e8ea3">f356b3c</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.7.8 (<a href="https://github.com/tj-actions/changed-files/commit/66275de0606e56bdce755a9408b1cef1aac91580">66275de</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Lock file maintenance (<a href="https://github.com/tj-actions/changed-files/commit/a16702bf7a036756d8ef85e34bf2e6cbcd474726">a16702b</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/lodash</code> to v4.17.12 (<a href="https://github.com/tj-actions/changed-files/commit/aa11897ec4afaea2c563502c017812d493d21a90">aa11897</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.7.7 (<a href="https://github.com/tj-actions/changed-files/commit/6513fe1691ddc9793b54c3b337d6946cd331ab26">6513fe1</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/lodash</code> to v4.17.11 (<a href="https://github.com/tj-actions/changed-files/commit/45e0c78ac7fad3fc00ec4a92c7d93a3f4489a906">45e0c78</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.7.6 (<a href="https://github.com/tj-actions/changed-files/commit/a949a8338c60e9581f87873ab195f1a23066a4fc">a949a83</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Lock file maintenance (<a href="https://github.com/tj-actions/changed-files/commit/f93ff336292f0bcab245d8fc70fe7f1a6446464b">f93ff33</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency typescript to v5.6.3 (<a href="https://github.com/tj-actions/changed-files/commit/729c70475c2976c3d4ca8897d34d9df975a4d05c">729c704</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Update dependency <code>@types/node</code> to v22.7.5 (<a href="https://github.com/tj-actions/changed-files/commit/2009d446ac92d696d7df2230847a71ba91db7d4a">2009d44</a>) - (renovate[bot])</li> <li><strong>deps:</strong> Lock file maintenance (<a href="https://github.com/tj-actions/changed-files/commit/b693fc207f2cd18198a39916698cec17bc8e8d42">b693fc2</a>) - (renovate[bot])</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tj-actions/changed-files/commit/4edd678ac3f81e2dc578756871e4d00c19191daf"><code>4edd678</code></a> chore(deps): update dependency eslint-plugin-jest to v28.9.0</li> <li><a href="https://github.com/tj-actions/changed-files/commit/f08255874b882608b0d7f6dde476c5756dbfc08c"><code>f082558</code></a> chore(deps): update dependency <code>@types/node</code> to v22.9.0</li> <li><a href="https://github.com/tj-actions/changed-files/commit/92c02a00a1b05d13ef79d053e8e8e4aafc1431cd"><code>92c02a0</code></a> chore(deps): lock file maintenance</li> <li><a href="https://github.com/tj-actions/changed-files/commit/b70221184d8c03f985dc253d1a84169c4b530010"><code>b702211</code></a> chore(deps): update dependency <code>@types/node</code> to v22.8.7</li> <li><a href="https://github.com/tj-actions/changed-files/commit/435fd74b2ec5d115590c1a20ba1101bf9a291563"><code>435fd74</code></a> chore(deps): update dependency <code>@types/node</code> to v22.8.6</li> <li><a href="https://github.com/tj-actions/changed-files/commit/0626fa3ff3e2030febaa380334fab666814bd24f"><code>0626fa3</code></a> chore(deps): update dependency <code>@types/node</code> to v22.8.5</li> <li><a href="https://github.com/tj-actions/changed-files/commit/8817a797cbad83643006b4fafc757bb72a50bd51"><code>8817a79</code></a> chore(deps): update dependency <code>@types/lodash</code> to v4.17.13</li> <li><a href="https://github.com/tj-actions/changed-files/commit/54174910beb91e8c0eb59a8449720659f72bf24b"><code>5417491</code></a> chore(deps): update dependency <code>@types/node</code> to v22.8.4</li> <li><a href="https://github.com/tj-actions/changed-files/commit/84ef16253002b9f411c38d53e45521709f43247e"><code>84ef162</code></a> chore(deps): update dependency <code>@types/node</code> to v22.8.2</li> <li><a href="https://github.com/tj-actions/changed-files/commit/b672a5115a5ab8c2b27838329a827d3ffda1202c"><code>b672a51</code></a> chore(deps): lock file maintenance</li> <li>Additional commits viewable in <a href="https://github.com/tj-actions/changed-files/compare/v41...v45">compare view</a></li> </ul> </details> <br /> Updates `anchore/sbom-action` from 0.17.7 to 0.17.8 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/anchore/sbom-action/releases">anchore/sbom-action's releases</a>.</em></p> <blockquote> <h2>v0.17.8</h2> <h2>Changes in v0.17.8</h2> <ul> <li>chore(deps): update Syft to v1.17.0 (<a href="https://redirect.github.com/anchore/sbom-action/issues/507">#507</a>) [<a href="https://github.com/anchore-actions-token-generator">anchore-actions-token-generator</a>]</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/anchore/sbom-action/commit/55dc4ee22412511ee8c3142cbea40418e6cec693"><code>55dc4ee</code></a> chore(deps): update Syft to v1.17.0 (<a href="https://redirect.github.com/anchore/sbom-action/issues/507">#507</a>)</li> <li>See full diff in <a href="https://github.com/anchore/sbom-action/compare/v0.17.7...v0.17.8">compare view</a></li> </ul> </details> <br /> 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> Co-authored-by: Morgan Bazalgette <[email protected]>
<!-- please provide a detailed description of the changes made in this pull request. --> <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>
…#3037) This pull request aims to add a bot that extends GitHub's functionalities like codeowners file and other merge protection mechanisms. Interaction with the bot is done via a comment. You can test it on the demo repo here : GnoCheckBot/demo#1 Fixes gnolang#1007 Related to gnolang#1466, gnolang#2788 - The `config.go` file contains all the conditions and requirements in an 'If - Then' format. ```go // Automatic check { Description: "Changes to 'tm2' folder should be reviewed/authored by at least one member of both EU and US teams", If: c.And( c.FileChanged(gh, "tm2"), c.BaseBranch("main"), ), Then: r.And( r.Or( r.ReviewByTeamMembers(gh, "eu", 1), r.AuthorInTeam(gh, "eu"), ), r.Or( r.ReviewByTeamMembers(gh, "us", 1), r.AuthorInTeam(gh, "us"), ), ), } ``` - There are two types of checks: some are automatic and managed by the bot (like the one above), while others are manual and need to be verified by a specific org team member (like the one below). If no team is specified, anyone with comment editing permission can check it. ```go // Manual check { Description: "The documentation is accurate and relevant", If: c.FileChanged(gh, `.*\.md`), Teams: []string{ "tech-staff", "devrels", }, }, ``` - The conditions (If) allow checking, among other things, who the author is, who is assigned, what labels are applied, the modified files, etc. The list is available in the `condition` folder. - The requirements (Then) allow, among other things, assigning a member, verifying that a review is done by a specific user, applying a label, etc. (List in `requirement` folder). - A PR Check (the icon at the bottom with all the CI checks) will remain orange/pending until all checks are validated, after which it will turn green. <img width="1065" alt="Screenshot 2024-11-05 at 18 37 34" src="https://github.com/user-attachments/assets/efaa1657-c254-4fc1-b6d1-49c7b93d8cda"> - The Github Actions workflow associated with the bot ensures that PRs are processed concurrently, while ensuring that the same PR is not processed by two runners at the same time. - We can manually process a PR by launching the workflow directly from the [GitHub Actions interface](https://github.com/GnoCheckBot/demo/actions/workflows/bot.yml). <img width="313" alt="Screenshot 2024-11-06 at 01 36 42" src="https://github.com/user-attachments/assets/287915cd-a50e-47a6-8ea1-c31383014b84"> #### To do - [x] implement base version of the bot - [x] cleanup code / comments - [x] setup a demo repo - [x] add debug printing on dry run - [x] add some tests on requirements and conditions <!-- please provide a detailed description of the changes made in this pull request. --> <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>
<!-- 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>
This PR should (normally) fix the issues with the bot on this repo. In addition to the fixes, I also replaced the old config with a config that has much simpler rules while we decide what to add later on, once we've verified that everything is working properly. Here is the current config, If nothing seems off to you, we can merge it as it is then improve it incrementaly. ```go auto := []automaticCheck{ { description: "Maintainers must be able to edit this pull request", ifC: c.Always(), thenR: r.MaintainerCanModify(), }, { description: "The pull request head branch must be up-to-date with its base", ifC: c.Always(), thenR: r.UpToDateWith(gh, r.PR_BASE), }, { description: "Changes to 'docs' folder must be reviewed/authored by at least one devrel and one tech-staff", ifC: c.FileChanged(gh, "^docs/"), thenR: r.Or( r.And( r.AuthorInTeam(gh, "devrels"), r.ReviewByTeamMembers(gh, "tech-staff", 1), ), r.And( r.AuthorInTeam(gh, "tech-staff"), r.ReviewByTeamMembers(gh, "devrels", 1), ), ), }, } manual := []manualCheck{ { description: "The pull request description provides enough details", ifC: c.Not(c.AuthorInTeam(gh, "core-contributors")), teams: Teams{"core-contributors"}, }, { description: "Determine if infra needs to be updated before merging", ifC: c.And( c.BaseBranch("master"), c.Or( c.FileChanged(gh, `Dockerfile`), c.FileChanged(gh, `^misc/deployments`), c.FileChanged(gh, `^misc/docker-`), c.FileChanged(gh, `^.github/workflows/releaser.*\.yml$`), c.FileChanged(gh, `^.github/workflows/portal-loop\.yml$`), ), ), teams: Teams{"devops"}, }, } ``` <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>
## Description Introduces better `gnoweb` rendering for the GovDAO suite, and better help page actions for voting on proposals. Home page before: <img width="1535" alt="Screenshot 2024-11-08 at 16 29 49" src="https://github.com/user-attachments/assets/d7eb9c5a-4195-45c6-b4ba-e57a57b95c21"> Home page after (also resolves usernames from `r/demo/users`): <img width="1540" alt="Screenshot 2024-11-09 at 13 19 55" src="https://github.com/user-attachments/assets/385e0727-8f2b-4451-b842-44a9c2870d6e"> Prop page before: <img width="1547" alt="Screenshot 2024-11-08 at 16 30 43" src="https://github.com/user-attachments/assets/1a936829-b9db-473e-b64e-bd5a992bffdb"> Prop page after: <img width="1549" alt="Screenshot 2024-11-21 at 13 05 50" src="https://github.com/user-attachments/assets/b75cefd5-ba84-4782-bdaa-910c23a29988"> The actions bar notifies the user when the proposal is no longer active as well. Continuation of gnolang#2579 <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>
Fix master CI runs, and miscellaneous improvements locally, too. - ci: switch to using `-covermode=set` rather than atomic, as it significantly degrades performance while not being shown on codecov. [more info](gnolang#3210 (comment)) - gnolang tests: use `t.Parallel()` to parallelize known "long" tests, both in `-short` and long versions. - stdlibs: provide `unicode` native shims for some common functions used in some standard library tests. This may lead to some small inconsistencies between on-chain behaviour and off-chain should the `unicode` packages diverge; but I think we might we might want to consider a native-based `unicode` stdlib, anyway. - thanks to these improvements, there is no longer the need to run `-short` on PRs, as the CI runs in ~9 mins, ie. 8 minutes less than the gno.land tests.
This PR will allow debugging errors of [this type](https://github.com/gnolang/gno/actions/runs/12072757244) that unfortunately cannot be tested locally since they rely on the context of GitHub Actions. Since I also had to add flags to the matrix subcommand, I moved the two matrix and check subcommands into subfolders. This PR also modify the comment to stick to moul's request and fixes several Github Actions errors. Related to gnolang#3238 Changes: - gnolang@d11ad5a moves matrix and check subcommands to their own packages in internal - gnolang@462ac01 gnolang@5c1edda gnolang@ffdce93 adds a debug to matrix subcommand (print event input / matrix output) + direct output of matrix to GitHub Actions using a matrix-key flag - gnolang@6af501d embed comment template file as a string at compile time instead of opening it at runtime - gnolang@59c3ad6 modifies bot comment to meet [this requirements](gnolang#3238 (comment)) - gnolang@241a755 filter out from the matrix generation and the PR processing all issues or closed PRs (process / list only opened PRs) <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 <[email protected]>
…3222) Fixes: gnolang#3203 <!-- 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>
- [x] Switch to storing a `type XXX func() grc20.Token` instead of a `grc20.Token` directly. - [x] Implement `grc20reg`. - [x] Add new tests in `gnovm/tests` to demonstrate the current VM's management of the cross-realm feature and support potential changes in gnolang#2743. - [x] Create a demo in `atomicswap` or a similar application. (gnolang#2510 (comment)) - [x] Try using a `Token.Getter()` helper. (Works! f99654e) - [ ] Demonstrate how to manage "disappearing" functions during garbage collection by checking if the function pointer is nil or non-resolvable. Alternative to gnolang#2516 NOT(!) depending on gnolang#2743 --------- Signed-off-by: moul <[email protected]>
<!-- 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> Signed-off-by: cuibuwei <[email protected]>
closes gnolang#2573 Had to change the PR from a personal repository as the pipeline was failing old PR: gnolang#2986 <!-- 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: 6h057 <[email protected]> Co-authored-by: Miloš Živković <[email protected]>
Implement empty statement in the runtime exec. Closes gnolang#3202
…tions group (gnolang#3258) Bumps the actions group with 1 update: [coursier/setup-action](https://github.com/coursier/setup-action). Updates `coursier/setup-action` from 1.3.8 to 1.3.9 <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.9</h2> <h2>What's Changed</h2> <ul> <li>Slightly rework os / arch / default version handling by <a href="https://github.com/alexarchambault"><code>@alexarchambault</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/718">coursier/setup-action#718</a></li> </ul> <h2>Updates / maintenance</h2> <ul> <li>build(deps-dev): bump <code>@typescript-eslint/parser</code> from 8.13.0 to 8.14.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/711">coursier/setup-action#711</a></li> <li>build(deps-dev): bump <code>@typescript-eslint/eslint-plugin</code> from 8.13.0 to 8.14.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/710">coursier/setup-action#710</a></li> <li>build(deps-dev): bump <code>@vercel/ncc</code> from 0.38.2 to 0.38.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/712">coursier/setup-action#712</a></li> <li>build(deps-dev): bump <code>@typescript-eslint/eslint-plugin</code> from 8.14.0 to 8.15.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/713">coursier/setup-action#713</a></li> <li>build(deps-dev): bump <code>@stylistic/eslint-plugin</code> from 2.10.1 to 2.11.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/715">coursier/setup-action#715</a></li> <li>build(deps-dev): bump <code>@typescript-eslint/parser</code> from 8.14.0 to 8.15.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/714">coursier/setup-action#714</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 22.9.0 to 22.9.1 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/716">coursier/setup-action#716</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/719">coursier/setup-action#719</a></li> <li>build(deps-dev): bump eslint-plugin-github from 5.0.2 to 5.1.1 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/720">coursier/setup-action#720</a></li> <li>build(deps-dev): bump typescript from 5.6.3 to 5.7.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/721">coursier/setup-action#721</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 22.9.1 to 22.9.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/722">coursier/setup-action#722</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/724">coursier/setup-action#724</a></li> <li>build(deps-dev): bump eslint from 8.57.1 to 9.15.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/723">coursier/setup-action#723</a></li> <li>build(deps-dev): bump <code>@typescript-eslint/eslint-plugin</code> from 8.15.0 to 8.16.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/725">coursier/setup-action#725</a></li> <li>build(deps-dev): bump prettier from 3.3.3 to 3.4.1 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/729">coursier/setup-action#729</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 22.9.3 to 22.10.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/726">coursier/setup-action#726</a></li> <li>build(deps-dev): bump <code>@typescript-eslint/parser</code> from 8.15.0 to 8.16.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/727">coursier/setup-action#727</a></li> <li>build(deps-dev): bump eslint-plugin-github from 5.1.1 to 5.1.2 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/728">coursier/setup-action#728</a></li> <li>build(deps-dev): bump eslint-plugin-github from 5.1.2 to 5.1.3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/730">coursier/setup-action#730</a></li> <li>build(deps-dev): bump <code>@types/node</code> from 22.10.0 to 22.10.1 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/coursier/setup-action/pull/731">coursier/setup-action#731</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/coursier/setup-action/compare/v1...v1.3.9">https://github.com/coursier/setup-action/compare/v1...v1.3.9</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/coursier/setup-action/commit/039f736548afa5411c1382f40a5bd9c2d30e0383"><code>039f736</code></a> build(deps-dev): bump <code>@types/node</code> from 22.10.0 to 22.10.1</li> <li><a href="https://github.com/coursier/setup-action/commit/b0150faff353cc28e39931185a2db5580efe965b"><code>b0150fa</code></a> build(deps-dev): bump eslint-plugin-github from 5.1.2 to 5.1.3</li> <li><a href="https://github.com/coursier/setup-action/commit/0329715ad0cc286745d68be3beb6abb377f2f086"><code>0329715</code></a> build(deps-dev): bump eslint-plugin-github from 5.1.1 to 5.1.2</li> <li><a href="https://github.com/coursier/setup-action/commit/45da7eb06564f0c74c64a01c4eb51b7a22185f7d"><code>45da7eb</code></a> build(deps-dev): bump <code>@typescript-eslint/parser</code> from 8.15.0 to 8.16.0</li> <li><a href="https://github.com/coursier/setup-action/commit/049f21e2c19e13de078d1e6cc8e69f1bde964518"><code>049f21e</code></a> build(deps-dev): bump <code>@types/node</code> from 22.9.3 to 22.10.0</li> <li><a href="https://github.com/coursier/setup-action/commit/ca73c3ea30991959d3e479ec629b85596164d790"><code>ca73c3e</code></a> build(deps-dev): bump prettier from 3.3.3 to 3.4.1</li> <li><a href="https://github.com/coursier/setup-action/commit/e3d80afa2ba40b4aaead325365404da4888530e8"><code>e3d80af</code></a> build(deps-dev): bump <code>@typescript-eslint/eslint-plugin</code></li> <li><a href="https://github.com/coursier/setup-action/commit/72f329cd32fa3235f971a7558ac43307815a2f49"><code>72f329c</code></a> bugfix: Migrate to new config format</li> <li><a href="https://github.com/coursier/setup-action/commit/7441104ad76ab292bbcd5e25ca9b768bde322e7a"><code>7441104</code></a> build(deps-dev): bump eslint from 8.57.1 to 9.15.0</li> <li><a href="https://github.com/coursier/setup-action/commit/d67c30ed6a1e91e6dcf38e4ffc8956d519c80393"><code>d67c30e</code></a> Update dist</li> <li>Additional commits viewable in <a href="https://github.com/coursier/setup-action/compare/v1.3.8...v1.3.9">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.8&new-version=1.3.9)](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>
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
…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
…es (gnolang#2869) continuing the work started on gnolang#1425 thanks FloRichardAloeCorp for the great job on this issue 👍 closes gnolang#1310 <!-- 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: hthieu1110 <[email protected]> Co-authored-by: Florian Richard <[email protected]> Co-authored-by: Morgan Bazalgette <[email protected]>
…3319) This PR fixes this issue: gnolang#3238 (comment) In summary, the `pull_request_review` event, when emitted from a PR opened from a fork, only allows the `GitHub Bot` workflow to run with read-only permissions. This PR addresses this issue by: - Ensuring that the `GitHub Bot` workflow does not fail in the case of a read-only run, but simply saves the number of the PR to be processed by uploading a file containing the number as an artifact (which is possible even in read-only mode). - Adding a new `GitHub Bot Proxy` workflow that monitors all completed runs of the `GitHub Bot` through a subscription to the `workflow_run` event. - If a run of the `GitHub Bot` workflow is triggered by a `pull_request_review` event, the `GitHub Bot Proxy` workflow retrieves the artifact containing the PR number and then re-runs the `GitHub Bot` workflow using a `workflow_dispatch` event. - The `GitHub Bot` workflow then runs again, but this time with write permissions, allowing it to update its comment or the status of its CI check, among other things.
…ang#3357) Related to gnolang#3238 (comment) and gnolang#3238 (comment) This PR: - remove the requirement `head branch must be up-to-date with its base` - clarify the description of the checkbox used to ignore the bot
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.
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description