Skip to content

Commit

Permalink
Merge branch 'add-eventix' of https://github.com/JJOptimist/gno into …
Browse files Browse the repository at this point in the history
…add-eventix
  • Loading branch information
JJOptimist committed Feb 25, 2025
2 parents 9de9d74 + eaf4987 commit 818967d
Show file tree
Hide file tree
Showing 421 changed files with 6,876 additions and 2,961 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/BUG-REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Describe your issue in as much detail as possible here

### Your environment

* Go version (example: go1.22.4)
* Go version (example: go1.23.6)
* OS and CPU architecture (example: linux/amd64)
* Gno commit hash causing the issue (example: f24690e7ebf325bffcfaf9e328c3df8e6b21e50c)

Expand All @@ -37,4 +37,4 @@ Please paste any logs here that demonstrate the issue, if they exist

### Proposed solution

If you have an idea of how to fix this issue, please write it down here, so we can begin discussing it
If you have an idea of how to fix this issue, please write it down here, so we can begin discussing it
8 changes: 4 additions & 4 deletions .github/golangci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
run:
concurrency: 8
timeout: 10m
issue-exit-code: 1
issues-exit-code: 1
tests: true
skip-dirs-use-default: true
modules-download-mode: readonly
allow-parallel-runners: false
go: ""

output:
uniq-by-line: false
path-prefix: ""
sort-results: true

Expand Down Expand Up @@ -55,7 +53,7 @@ linters-settings:
- G306 # Expect WriteFile permissions to be 0600 or less
- G115 # Integer overflow conversion, no solution to check the overflow in time of convert, so linter shouldn't check the overflow.
stylecheck:
checks: [ "all", "-ST1022", "-ST1003" ]
checks: ["all", "-ST1022", "-ST1003"]
errorlint:
asserts: false

Expand All @@ -78,6 +76,8 @@ issues:
max-same-issues: 0
new: false
fix: false
exclude-dirs-use-default: true
uniq-by-line: false

exclude-rules:
- path: _test\.go
Expand Down
68 changes: 68 additions & 0 deletions .github/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ builds:
goarch:
- amd64
- arm64
- id: gnodev
dir: ./contribs/gnodev/cmd/gnodev
binary: gnodev
ldflags:
# using hardcoded ldflag
- -X github.com/gnolang/gno/gnovm/pkg/gnoenv._GNOROOT=/gnoroot
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
# Gno Contribs
# NOTE: Contribs binary will be added in a single docker image below: gnocontribs
- id: gnobro
Expand Down Expand Up @@ -307,6 +321,50 @@ dockers:
ids:
- gnofaucet

# gnodev
- use: buildx
dockerfile: Dockerfile.release
goos: linux
goarch: amd64
image_templates:
- "ghcr.io/gnolang/{{ .ProjectName }}/gnodev:{{ .Version }}-amd64"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnodev:{{ .Env.TAG_VERSION }}-amd64"
build_flag_templates:
- "--target=gnodev"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnodev"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnodev
extra_files:
- gno.land/genesis/genesis_balances.txt
- gno.land/genesis/genesis_txs.jsonl
- examples
- gnovm/stdlibs
- use: buildx
dockerfile: Dockerfile.release
goos: linux
goarch: arm64
image_templates:
- "ghcr.io/gnolang/{{ .ProjectName }}/gnodev:{{ .Version }}-arm64v8"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnodev:{{ .Env.TAG_VERSION }}-arm64v8"
build_flag_templates:
- "--target=gnodev"
- "--platform=linux/arm64/v8"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnodev"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnodev
extra_files:
- gno.land/genesis/genesis_balances.txt
- gno.land/genesis/genesis_txs.jsonl
- examples
- gnovm/stdlibs

# gnocontribs
- use: buildx
dockerfile: Dockerfile.release
Expand Down Expand Up @@ -406,6 +464,16 @@ docker_manifests:
- ghcr.io/gnolang/{{ .ProjectName }}/gnofaucet:{{ .Env.TAG_VERSION }}-amd64
- ghcr.io/gnolang/{{ .ProjectName }}/gnofaucet:{{ .Env.TAG_VERSION }}-arm64v8

# gnodev
- name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnodev:{{ .Version }}
image_templates:
- ghcr.io/gnolang/{{ .ProjectName }}/gnodev:{{ .Version }}-amd64
- ghcr.io/gnolang/{{ .ProjectName }}/gnodev:{{ .Version }}-arm64v8
- name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnodev:{{ .Env.TAG_VERSION }}
image_templates:
- ghcr.io/gnolang/{{ .ProjectName }}/gnodev:{{ .Env.TAG_VERSION }}-amd64
- ghcr.io/gnolang/{{ .ProjectName }}/gnodev:{{ .Env.TAG_VERSION }}-arm64v8

# gnocontribs
- name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Version }}
image_templates:
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/docs-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
- name: Set up Go (docs builder)
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version-file: misc/devdeps/go.mod

- name: Install dependencies
- name: Install dependencies (docs builder)
working-directory: misc/devdeps
run: go mod download

- name: Build docs
Expand All @@ -30,5 +31,14 @@ jobs:
- name: Check diff
run: git diff --exit-code || (echo "Some docs files are not formatted, please run 'make build'." && exit 1)

- name: Set up Go (docs linter)
uses: actions/setup-go@v5
with:
go-version-file: misc/docs-linter/go.mod

- name: Install dependencies (docs linter)
working-directory: misc/docs-linter
run: go mod download

- name: Run linter
run: make -C docs/ lint
10 changes: 5 additions & 5 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.22.x"
- "1.23.x"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand All @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.22.x"
- "1.23.x"
# unittests: TODO: matrix with contracts
runs-on: ubuntu-latest
timeout-minutes: 30
Expand All @@ -58,7 +58,7 @@ jobs:
fail-fast: false
matrix:
goversion:
- "1.22.x"
- "1.23.x"
# unittests: TODO: matrix with contracts
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -83,13 +83,13 @@ jobs:
uses: ./.github/workflows/build_template.yml
with:
modulepath: "examples"
go-version: "1.22.x"
go-version: "1.23.x"

mod-tidy:
strategy:
fail-fast: false
matrix:
go-version: [ "1.22.x" ]
go-version: ["1.23.x"]
# unittests: TODO: matrix with contracts
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gnofmt_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
description: "Go version to use"
required: false
type: string
default: "1.22.x"
default: "1.23.x"

jobs:
fmt:
Expand All @@ -30,4 +30,4 @@ jobs:

- name: Check for unformatted code
run: |
git diff --exit-code || (echo "Some gno files are not formatted, please run 'make fmt'." && exit 1)
git diff --exit-code || (echo "Some gno files are not formatted, please run 'make fmt'." && exit 1)
2 changes: 1 addition & 1 deletion .github/workflows/gnoland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ["1.22.x"]
go-version: ["1.23.x"]
# unittests: TODO: matrix with contracts
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/lint_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ jobs:
uses: golangci/golangci-lint-action@v6
with:
working-directory: ${{ inputs.modulepath }}
args:
--config=${{ github.workspace }}/.github/golangci.yml
version: v1.62 # sync with misc/devdeps
args: --config=${{ github.workspace }}/.github/golangci.yml
version: v1.64 # sync with misc/devdeps
3 changes: 1 addition & 2 deletions .github/workflows/main_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: "Go version to use"
required: false
type: string
default: "1.22.x"
default: "1.23.x"
secrets:
codecov-token:
required: true
Expand Down Expand Up @@ -39,4 +39,3 @@ jobs:
tests-extra-args: ${{ inputs.tests-extra-args }}
secrets:
codecov-token: ${{ secrets.codecov-token }}

2 changes: 1 addition & 1 deletion .github/workflows/releaser-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
go-version-file: go.mod
cache: true

- uses: sigstore/[email protected].0
- uses: sigstore/[email protected].1
- uses: anchore/sbom-action/[email protected]

- uses: docker/login-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/releaser-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
go-version-file: go.mod
cache: true

- uses: sigstore/[email protected].0
- uses: sigstore/[email protected].1
- uses: anchore/sbom-action/[email protected]

- uses: docker/login-action@v3
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The gno repository is primarily based on Go (Golang) and Gno.

The primary tech stack for working on the repository:

- Go (version 1.22+)
- Go (version 1.23+)
- make (for using Makefile configurations)

It is recommended to work on a Unix environment, as most of the tooling is built around ready-made tools in Unix (WSL2
Expand Down Expand Up @@ -514,4 +514,3 @@ automatic label management.
| info needed | Issue is lacking information needed for resolving |
| investigating | Issue is still being investigated by the team |
| question | Issue starts a discussion or raises a question |

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build gno
FROM golang:1.22-alpine AS build-gno
FROM golang:1.23-alpine AS build-gno
RUN go env -w GOMODCACHE=/root/.cache/go-build
WORKDIR /gnoroot
ENV GNOROOT="/gnoroot"
Expand All @@ -11,7 +11,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build go build -o ./
RUN --mount=type=cache,target=/root/.cache/go-build go build -o ./build/gno ./gnovm/cmd/gno

# build misc binaries
FROM golang:1.22-alpine AS build-misc
FROM golang:1.23-alpine AS build-misc
RUN go env -w GOMODCACHE=/root/.cache/go-build
WORKDIR /gnoroot
ENV GNOROOT="/gnoroot"
Expand Down
13 changes: 13 additions & 0 deletions Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ COPY ./gnofaucet /usr/bin/gnofaucet
EXPOSE 5050
ENTRYPOINT [ "/usr/bin/gnofaucet" ]

#
## ghcr.io/gnolang/gno/gnodev
FROM base as gnodev

COPY ./gnodev /usr/bin/gnodev
COPY ./examples /gnoroot/examples/
COPY ./gnovm/stdlibs /gnoroot/gnovm/stdlibs/
COPY ./gno.land/genesis/genesis_balances.txt /gnoroot/gno.land/genesis/genesis_balances.txt
COPY ./gno.land/genesis/genesis_txs.jsonl /gnoroot/gno.land/genesis/genesis_txs.jsonl
# gnoweb exposed by default
EXPOSE 8888
ENTRYPOINT [ "/usr/bin/gnodev" ]

#
## ghcr.io/gnolang/gno
FROM base as gno
Expand Down
4 changes: 1 addition & 3 deletions contribs/github-bot/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/gnolang/gno/contribs/github-bot

go 1.22.0

toolchain go1.23.2
go 1.23.6

replace github.com/gnolang/gno => ../..

Expand Down
5 changes: 2 additions & 3 deletions contribs/gnodev/cmd/gnobro/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"net/url"
"os"
"os/signal"
"path/filepath"
gopath "path"
"strings"
"time"

Expand Down Expand Up @@ -239,7 +239,6 @@ func runLocal(ctx context.Context, gnocl *gnoclient.Client, cfg *broCfg, bcfg br
)

var errgs errgroup.Group

if cfg.dev {
devpoint, err := getDevEndpoint(cfg)
if err != nil {
Expand Down Expand Up @@ -453,7 +452,7 @@ func ValidatePathCommandMiddleware(pathPrefix string) wish.Middleware {
return
case 1: // check for valid path
path := cmd[0]
if strings.HasPrefix(path, pathPrefix) && filepath.Clean(path) == path {
if strings.HasPrefix(path, pathPrefix) && gopath.Clean(path) == path {
s.Context().SetValue("path", path)
next(s)
return
Expand Down
3 changes: 2 additions & 1 deletion contribs/gnodev/cmd/gnodev/command_staging.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"flag"
"path"
"path/filepath"

"github.com/gnolang/gno/contribs/gnodev/pkg/packages"
Expand All @@ -28,7 +29,7 @@ var defaultStagingOptions = AppConfig{
interactive: false,
unsafeAPI: false,
lazyLoader: false,
paths: filepath.Join(DefaultDomain, "/**"), // Load every package under the main domain},
paths: path.Join(DefaultDomain, "/**"), // Load every package under the main domain},

// As we have no reason to configure this yet, set this to random port
// to avoid potential conflict with other app
Expand Down
3 changes: 2 additions & 1 deletion contribs/gnodev/cmd/gnodev/setup_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"fmt"
"log/slog"
gopath "path"
"path/filepath"
"regexp"
"strings"
Expand Down Expand Up @@ -103,5 +104,5 @@ func guessPath(cfg *AppConfig, dir string) (path string) {
}

rname := reInvalidChar.ReplaceAllString(filepath.Base(dir), "-")
return filepath.Join(cfg.chainDomain, "/r/dev/", rname)
return gopath.Join(cfg.chainDomain, "/r/dev/", rname)
}
Loading

0 comments on commit 818967d

Please sign in to comment.