Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .claude/skills/smartcontracts/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: build-contracts
description: "Builds all cosmwasm contracts"
---
# Instructions
When requested, execute [make build-contracts] from the project root directory.
38 changes: 38 additions & 0 deletions .claude/skills/vanity/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: vanity
description: "Registers node major version vanity URL in the sibling vanity repo"
---
# Instructions

Register the current node major version as a vanity URL in the `github.com/com/akash-network/vanity` repo.

## Steps

1. **Read the major version** from `go.mod` in this repo. Extract the version suffix from the module path (e.g. `pkg.akt.dev/node/v2``v2`). If the module path has no version suffix (v0/v1), abort — no vanity entry is needed.

2. **Get the current git branch name** using `git rev-parse --abbrev-ref HEAD`.

3. **Open `vanity/vangen.json`** and check if a repository entry with `"prefix": "node/vN"` already exists (where `vN` is the version from step 1). If it exists, inform the user and abort.

4. **Add a new entry** to the `repositories` array in `vanity/vangen.json`:
```json
{
"prefix": "node/vN",
"type": "git",
"main": true,
"url": "https://github.com/akash-network/node",
"source": {
"home": "https://github.com/akash-network/node",
"dir": "https://github.com/akash-network/node/tree/BRANCH{/dir}",
"file": "https://github.com/akash-network/node/blob/BRANCH{/dir}/{file}#L{line}"
},
"website": {
"url": "https://github.com/akash-network/node"
}
}
```
Replace `vN` with the detected version and `BRANCH` with the detected branch name. Place the entry after the last existing `node` entry.

5. **Run `make vangen`** in `vanity` to regenerate HTML files.

6. **Verify** that `vanity/node/vN/index.html` was created and contains the correct `go-import` and `go-source` meta tags pointing to the detected branch. Also verify that existing `vanity/node/index.html` and any `vanity/node/vN/index.html` is unchanged.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
GO111MODULE=on
CGO_ENABLED=1

KIND_VERSION=0.11.1
ROOT_DIR=${AKASH_ROOT}

AKASH_DEVCACHE_BASE=${AKASH_ROOT}/.cache
AKASH_DEVCACHE=${AKASH_DEVCACHE_BASE}
AKASH_DEVCACHE_BIN=${AKASH_DEVCACHE}/bin
AKASH_DEVCACHE_LIB=${AKASH_DEVCACHE}/lib
AKASH_DEVCACHE_INCLUDE=${AKASH_DEVCACHE}/include
AKASH_DEVCACHE_VERSIONS=${AKASH_DEVCACHE}/versions
AKASH_DEVCACHE_NODE_MODULES=${AKASH_DEVCACHE}
AKASH_DEVCACHE_NODE_BIN=${AKASH_DEVCACHE_NODE_MODULES}/node_modules/.bin
AKASH_RUN=${AKASH_DEVCACHE}/run
AKASH_RUN_BIN=${AKASH_RUN}/bin

CARGO_TARGET_DIR=${AKASH_DEVCACHE_BASE}/cosmwasm
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export GOTOOLCHAIN
export GOTOOLCHAIN_SEMVER
export GOWORK

PATH_add "$AKASH_DEVCACHE_NODE_BIN"
PATH_add "$AKASH_DEVCACHE_BIN"
PATH_add "$AKASH_DEVCACHE_NODE_BIN"

AKASH_DIRENV_SET=1
AKASH=$AKASH_DEVCACHE_BIN/akash
Expand Down
5 changes: 4 additions & 1 deletion .github/actions/setup-ubuntu/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y make direnv unzip lz4 wget curl npm jq pv coreutils libudev-dev
sudo apt install -y make direnv unzip lz4 wget curl npm jq pv coreutils musl-tools libudev-dev gcc
- name: Setup npm
uses: actions/setup-node@v4
with:
Expand All @@ -38,3 +38,6 @@ runs:
uses: HatsuneMiku3939/direnv-action@v1
with:
masks: ''
- name: Clear stale registry cache
shell: bash
run: docker volume rm registry_cache || true
11 changes: 0 additions & 11 deletions .github/workflows/dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,3 @@ jobs:
workflow: akash
ref: refs/heads/main
inputs: '{ "tag" : "${{ env.RELEASE_TAG }}" }'
dispatch-provider:
runs-on: ubuntu-latest
steps:
- name: notify homebrew with new release
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ secrets.GORELEASER_ACCESS_TOKEN }}
repo: akash-network/homebrew-tap
workflow: provider-services
ref: refs/heads/main
inputs: '{"tag": "${{ env.RELEASE_TAG }}"}'
41 changes: 10 additions & 31 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,6 @@ on:
- v*

jobs:
build-macos:
runs-on: macos-latest
steps:
- name: Install dependencies
run: |
brew install bash direnv pv lz4
sudo chsh -s "$(brew --prefix)/bin/bash"
- name: Hook direnv to bash
run: echo 'eval "$(direnv hook bash)"' >> $HOME/.bashrc
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
- name: Detect required Go version
run: |
toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//')
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GOVERSION }}"
check-latest: true
- name: Setup direnv
run: |
direnv allow
direnv export gha >> "$GITHUB_ENV"
- run: make bins

build-bins:
runs-on: ubuntu-latest
steps:
Expand All @@ -55,9 +30,13 @@ jobs:
dotnet: true # .NET runtime. Saves ~2.7GB. Total CI impact: +10s (not used in build)
haskell: true # Haskell (GHC). Saves ~5GB. Total CI impact: +10s (not used in build)
large-packages: true # large packages (llvm, php, mysql, etc). Saves ~5.3GB. Total CI impact: +60s (not used in build)
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup environment
uses: ./.github/actions/setup-ubuntu
- run: make bins
- run: make build-contracts bins
- run: make docker-image

tests:
Expand All @@ -67,14 +46,14 @@ jobs:
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-ubuntu
- run: make test-full
- run: make build-contracts test-full

coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-ubuntu
- run: make test-coverage
- run: make build-contracts test-coverage
- uses: codecov/codecov-action@v4

lint-go:
Expand Down Expand Up @@ -106,6 +85,8 @@ jobs:
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-ubuntu
- name: build contracts
run: make build-contracts
- name: test-sim-nondeterminism
run: make test-sim-nondeterminism
- name: test-sim-import-export
Expand Down Expand Up @@ -136,8 +117,7 @@ jobs:
- name: git tag
run: git tag -a ${{ env.RELEASE_TAG }} -m ${{ env.RELEASE_TAG }}
- name: release dry-run
run: |
make release
run: make release

network-upgrade-names:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -211,7 +191,6 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags/v')
needs:
- build-macos
- build-bins
- tests
- coverage
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ coverage.txt
/.editorconfig

dev.env

*.test

# Added by cargo

/target
/artifacts
25 changes: 15 additions & 10 deletions .goreleaser-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ builds:
- "-tags={{ .Env.BUILD_TAGS }}"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- -extldflags "-lc -lrt -lpthread"
- "{{ .Env.BUILD_LDFLAGS }}"
- -s -w
- -linkmode=external
# yamllint disable-line rule:line-length
- -extldflags "-L./.cache/lib -lwasmvm_muslc.x86_64 -Wl,-z,muldefs -lm -lrt -lc"
- id: akash-linux-arm64
binary: akash
main: ./cmd/akash
Expand All @@ -43,12 +44,14 @@ builds:
- "-tags={{ .Env.BUILD_TAGS }}"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- -extldflags "-lc -lrt -lpthread"
- "{{ .Env.BUILD_LDFLAGS }}"
- -s -w
- -linkmode=external
# yamllint disable-line rule:line-length
- -extldflags "-L./.cache/lib -lwasmvm_muslc.aarch64 -Wl,-z,muldefs -lm -lrt -lc"

dockers:
- dockerfile: _build/Dockerfile.akash
- dockerfile: _build/akash.Dockerfile
use: buildx
goarch: amd64
goos: linux
Expand All @@ -59,11 +62,12 @@ dockers:
- --label=org.opencontainers.image.url={{.GitURL}}
- --label=org.opencontainers.image.source={{.GitURL}}
- --label=org.opencontainers.image.version={{ .Version }}
# yamllint disable-line rule:line-length
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
image_templates:
- '{{ .Env.DOCKER_IMAGE }}:latest-amd64'
- dockerfile: _build/Dockerfile.akash
- dockerfile: _build/akash.Dockerfile
use: buildx
goarch: arm64
goos: linux
Expand All @@ -74,6 +78,7 @@ dockers:
- --label=org.opencontainers.image.url={{.GitURL}}
- --label=org.opencontainers.image.source={{.GitURL}}
- --label=org.opencontainers.image.version={{ .Version }}
# yamllint disable-line rule:line-length
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
image_templates:
Expand Down
47 changes: 31 additions & 16 deletions .goreleaser-test-bins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ builds:
env:
- CC=o64-clang
- CXX=o64-clang++
- CGO_CFLAGS=-mmacosx-version-min=10.12
- CGO_LDFLAGS=-L./.cache/lib -mmacosx-version-min=10.12
flags:
- "-mod={{ .Env.MOD }}"
- "-tags={{ .Env.BUILD_TAGS }}"
- "-tags={{ .Env.BUILD_TAGS }} static_wasm"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- "{{ .Env.BUILD_LDFLAGS }}"
- -s -w
- -linkmode=external
- id: akash-darwin-arm64
binary: akash
main: ./cmd/akash
Expand All @@ -38,14 +40,16 @@ builds:
env:
- CC=oa64-clang
- CXX=oa64-clang++
- CGO_CFLAGS=-mmacosx-version-min=10.12
- CGO_LDFLAGS=-L./.cache/lib -mmacosx-version-min=10.12
flags:
- "-mod={{ .Env.MOD }}"
- "-tags={{ .Env.BUILD_TAGS }}"
- "-tags={{ .Env.BUILD_TAGS }} static_wasm"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- "{{ .Env.BUILD_LDFLAGS }}"
- -s -w
- -linkmode=external
- id: akash-linux-amd64
binary: akash
main: ./cmd/akash
Expand All @@ -61,10 +65,11 @@ builds:
- "-tags={{ .Env.BUILD_TAGS }}"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- -extldflags "-lc -lrt -lpthread"
- "{{ .Env.BUILD_LDFLAGS }}"
- -s -w
- -linkmode=external
# yamllint disable-line rule:line-length
- -extldflags "-L./.cache/lib -lwasmvm_muslc.x86_64 -Wl,-z,muldefs -lm -lrt -lc"
- id: akash-linux-arm64
binary: akash
main: ./cmd/akash
Expand All @@ -80,10 +85,11 @@ builds:
- "-tags={{ .Env.BUILD_TAGS }}"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- -extldflags "-lc -lrt -lpthread"
- "{{ .Env.BUILD_LDFLAGS }}"
- -s -w
- -linkmode=external
# yamllint disable-line rule:line-length
- -extldflags "-L./.cache/lib -lwasmvm_muslc.aarch64 -Wl,-z,muldefs -lm -lrt -lc"
universal_binaries:
- id: akash-darwin-universal
ids:
Expand All @@ -104,3 +110,12 @@ archives:
- zip
files:
- none*
- id: contracts
name_template: "contracts"
meta: true
wrap_in_directory: false
formats:
- zip
files:
- src: .cache/cosmwasm/artifacts/**.*
strip_parent: true
Loading
Loading