Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ae5e21d
chore: bump flake
steinerkelvin Feb 6, 2025
2091d69
docs: improve torus substrate docstrings (#71)
aripiprazole Feb 7, 2025
151076a
chore: remove old commune stuff (#80)
saiintbrisson Feb 11, 2025
0e7b0c7
fix: automatically delegate weights to allocator (#81)
saiintbrisson Feb 12, 2025
15ebf95
feat: add code coverage tooling & reports (#73)
devwckd Feb 13, 2025
ff40ef2
chore: drop substrate-fixed types (#82)
saiintbrisson Feb 14, 2025
95ff1c3
chore: improve proposal and pruning coverage (#83)
saiintbrisson Feb 17, 2025
a546134
feat: transfer fees to treasury (#78)
devwckd Feb 18, 2025
c00bab0
test: improve `torus0` and `governance` pallet tests (#84)
devwckd Feb 23, 2025
375bdaa
chore: new readme (#85)
saiintbrisson Mar 7, 2025
2532ff7
chore: disable `cargo-llvm-cov` on flake shell (marked as broken); un…
steinerkelvin Mar 10, 2025
27aab25
feat: build and push xtask cli tool to github packages (#86)
devwckd Mar 17, 2025
4456ef8
feat: make xtask spec generation tasks go to stdout when no output is…
devwckd Mar 23, 2025
df671d1
chore: add devcontainer.json; organizer Github Action files
steinerkelvin Mar 27, 2025
06ec269
feat: add cooldown and event to agent update extrinsic (#88)
devwckd Mar 31, 2025
88367b8
Merge "feat: transfer fees to treasury (#78)" into dev
saiintbrisson Apr 6, 2025
e24e7e6
feat(permission0): initial implementation (#87)
saiintbrisson Mar 31, 2025
3309fa6
feat(permission0): implement revoking by arbiters
saiintbrisson Apr 6, 2025
44f90b8
feat(permission0): implement multi-sig controllers
saiintbrisson Apr 7, 2025
759e79c
chore: publish autogenerated docs to github pages on push to the `mai…
devwckd Apr 9, 2025
000fe75
feat: add faucet pallet (#96)
devwckd May 21, 2025
d8b2393
feat(permission0): create new curator scope (#97)
saiintbrisson May 22, 2025
491524f
Fix the code coverage bucket URL (#98)
DaviPtrs May 22, 2025
b421a44
chore: bump spec (#99)
devwckd May 23, 2025
fc6cbdf
docs: improve documentation and add Claude Code guidance
steinerkelvin May 25, 2025
b73f239
fix(permission0): until block duration is inclusive
saiintbrisson May 27, 2025
8e69b45
feat: enable testnet features on localnode (#101)
devwckd May 28, 2025
1f22d1b
feat: increase faucet tokens (#102)
devwckd May 28, 2025
c6e1702
fix: ban arithmetic side effects
saiintbrisson May 28, 2025
e012a99
fix(testnet): add code substitute
saiintbrisson May 28, 2025
a926256
chore: bump spec version to 15
saiintbrisson May 29, 2025
87cb3d3
refac(permission0): general pre-release tweaks (#103)
saiintbrisson Jun 2, 2025
78a6481
feat(namespaces): initial impl (#105)
saiintbrisson Jun 16, 2025
240d29b
feat: add stream emission permission editing (#104)
devwckd Jun 16, 2025
e94b5b1
feat(namespace): cost calculation rpc (#106)
saiintbrisson Jun 16, 2025
04288e8
feat: add curator agent freezing toggling (#109)
devwckd Jun 19, 2025
6de5cb2
fix(permission0): allow grantor to delegate emission to itself (#107)
saiintbrisson Jun 20, 2025
a94678e
docs: add testnet deploy steps doc (#94)
devwckd Jun 20, 2025
10b4a0f
chore: update burn parameters (#110)
saiintbrisson Jun 20, 2025
a9dba2b
use Ubicloud
DaviPtrs Jun 21, 2025
beb3529
refac(torus0/namespace): require agent prefix (#111)
saiintbrisson Jun 23, 2025
d881aab
docs: document faucet usage and proof-of-work (#112)
devwckd Jun 24, 2025
b9f14a6
chore(permission0): accumulate distribution remainder
saiintbrisson Jun 24, 2025
e75b350
Merge remote-tracking branch 'main' into dev
saiintbrisson Jun 24, 2025
5d79e22
fix(namespaces): prevent de-registering root (#117)
saiintbrisson Jul 6, 2025
498642d
chore: final migrations tweaks (#118)
saiintbrisson Jul 7, 2025
4c50421
Merge remote-tracking branch 'origin' into dev
saiintbrisson Jul 7, 2025
e0b999d
chore: update changelog for spec 21
saiintbrisson Jul 7, 2025
7952818
chore: update claudio codigus guide
saiintbrisson Jul 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {
"ghcr.io/devcontainers/features/nix:1": {
"flake": "github:nixos/nixpkgs/nixpkgs-unstable#direnv"
}
}
}
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* @supremesource @saiintbrisson @steinerkelvin @devwckd
* @functor-flow @saiintbrisson @steinerkelvin @devwckd

/.github/workflows/* @steinerkelvin @daviptrs @saiintbrisson
/docker/**/* @steinerkelvin @daviptrs @saiintbrisson
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Build and push Docker image
name: Build Torus node Docker image

on:
push:
branches: [main, testnet, github-ci-test]
branches:
- main
- dev
- testnet
- github-ci-test
tags:
- "*"

Expand All @@ -13,9 +17,9 @@ concurrency:
jobs:
build-n-push:
permissions: write-all
runs-on: ubuntu-22.04-32core-karl
runs-on: ubicloud-standard-16
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

Verify the custom runner label configuration.

The runner label ubicloud-standard-16 is not recognized as a standard GitHub Actions runner. If this is a custom self-hosted runner, ensure it's properly configured and consider documenting the runner requirements.


🏁 Script executed:

#!/bin/bash
# Description: Check if ubicloud runner configuration is documented in the repository

# Search for ubicloud runner documentation or configuration
rg -i "ubicloud" --type md
rg -i "runner.*16" --type md
rg -i "self-hosted" --type md

Length of output: 87


Include the self-hosted label and document your custom runner

The workflow is currently targeting only ubicloud-standard-16, which isn’t a GitHub-hosted runner. To ensure this job picks up your self-hosted machine and to make the requirement discoverable, update the runner label and add (or link to) documentation.

• .github/workflows/build-docker-node.yml:20

  • Change the single string to an array including self-hosted.
  • Example diff:
-   runs-on: ubicloud-standard-16
+   runs-on:
+     - self-hosted
+     - ubicloud-standard-16

• Docs:

  • Create or update a section (e.g. in README.md or a new RUNNERS.md) that describes the setup, OS requirements, and any pre-installed software for your ubicloud-standard-16 runner.
  • Reference this documentation from your CONTRIBUTING or CI guide.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
runs-on: ubicloud-standard-16
runs-on:
- self-hosted
- ubicloud-standard-16
🧰 Tools
🪛 actionlint (1.7.7)

20-20: label "ubicloud-standard-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

🤖 Prompt for AI Agents
In .github/workflows/build-docker-node.yml at line 20, change the runner
specification from a single string "ubicloud-standard-16" to an array including
"self-hosted" and "ubicloud-standard-16" to ensure the job targets your
self-hosted runner properly. Additionally, create or update documentation (e.g.,
README.md or a new RUNNERS.md) describing the setup, OS requirements, and
pre-installed software for the "ubicloud-standard-16" runner, and reference this
documentation from your CONTRIBUTING or CI guide to make the requirement clear
and discoverable.

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- id: commit
uses: prompt/actions-commit-hash@v3
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/build-docker-xtask.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build xtask cli tool Docker image

on:
push:
branches:
- main
- dev
- github-ci-test
paths:
- "xtask/**"
- ".github/workflows/build-docker-xtask.yml"
- "docker/xtask.dockerfile"

jobs:
docker:
permissions:
contents: read
packages: write
runs-on: ubicloud-standard-2
steps:
- uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/torus-xtask
tags: |
type=sha,prefix=,enable=true
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
file: ./docker/xtask.dockerfile
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
46 changes: 46 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build docs and publish to github pages

on:
push:
branches:
- main

jobs:
publish:
permissions:
contents: read
id-token: write
pages: write
runs-on: ubicloud-standard-2
steps:
- uses: actions/checkout@v4

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2

- name: Install Rust toolchain
run: |
rustup set profile minimal
rustup show
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: 3.20.1
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Generate Docs
run: |
cargo doc --workspace --no-deps
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'target/doc/'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Build Torus Runtime
name: Build Torus runtime

on:
workflow_dispatch:
push:
tags:
- "runtime/*"
branches:
- "github-ci-test"
- "build-runtime*"
- "testnet"
tags:
- "runtime/*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04-32core-karl
runs-on: ubicloud-standard-16

steps:
- uses: actions/checkout@v4
Expand All @@ -37,7 +37,8 @@ jobs:

- name: Build runtime
run: |
cargo build --release --timings --package torus-runtime
echo "Building ${{ startsWith(github.ref, 'refs/tags/runtime/testnet') && 'with testnet feature flag' || 'without testnet feature flag' }}"
cargo build --release --timings --package torus-runtime ${{ startsWith(github.ref, 'refs/tags/runtime/testnet') && '--features testnet' || '' }}

export SHA256SUM=$(sha256sum target/release/wbuild/torus-runtime/torus_runtime.compact.compressed.wasm | cut -d ' ' -f1)
echo Hash of compact and compressed WASM: $SHA256SUM
Expand Down
91 changes: 88 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ concurrency:

jobs:
check:
runs-on: ubuntu-24.04-8core-bakunin
permissions:
pull-requests: write
id-token: write
pages: write
checks: write
contents: write

runs-on: ubicloud-standard-8

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -44,8 +51,86 @@ jobs:
args: --color=always --tests -- -D warnings
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run tests
# - name: Run tests
# env:
# RUST_BACKTRACE: 1
# SKIP_WASM_BUILD: 1
# run: cargo test

- uses: jwalton/gh-find-current-pr@v1
id: findPr

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extractBranch

- name: Install cargo-llvm-cov
if: success() && steps.findPr.outputs.number && steps.extractBranch.outputs.branch
uses: taiki-e/install-action@cargo-llvm-cov

- name: Install cargo-xtask
if: success() && steps.findPr.outputs.number && steps.extractBranch.outputs.branch
run: cargo install cargo-xtask

- name: Generate lcov code coverage
if: success() && steps.findPr.outputs.number && steps.extractBranch.outputs.branch
run: cargo xtask coverage
env:
RUST_BACKTRACE: 1
SKIP_WASM_BUILD: 1
run: cargo test

- name: Generate coverage summary report
if: success() && steps.findPr.outputs.number && steps.extractBranch.outputs.branch
uses: irongut/[email protected]
with:
filename: target/cov.xml
badge: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both

- name: Generate html code coverage
if: success() && steps.findPr.outputs.number && steps.extractBranch.outputs.branch
run: cargo xtask coverage --html
env:
RUST_BACKTRACE: 1
SKIP_WASM_BUILD: 1

- name: Upload html report to S3 Bucket
if: success() && steps.findPr.outputs.number && steps.extractBranch.outputs.branch
id: htmlUpload
continue-on-error: true
run: |
aws --endpoint-url $ENDPOINT s3 sync ./target/llvm-cov/html s3://$BUCKET_NAME/$BRANCH --acl public-read
echo "link=https://$BUCKET_NAME.$REGION.$ENDPOINT_DOMAIN/$BRANCH/index.html" >> $GITHUB_OUTPUT
env:
BRANCH: ${{ steps.extractBranch.outputs.branch }}
ENDPOINT: ${{ vars.COV_ENDPOINT_URL }}
BUCKET_NAME: ${{ vars.COV_BUCKET_NAME }}
AWS_ACCESS_KEY_ID: ${{ secrets.COV_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.COV_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ vars.COV_DEFAULT_REGION }}
REGION: nyc3
ENDPOINT_DOMAIN: "digitaloceanspaces.com"

- name: Add coverage PR report comment
if: success() && steps.findPr.outputs.number
uses: marocchino/sticky-pull-request-comment@v2
with:
header: report
number: ${{ steps.findPr.outputs.pr }}
recreate: true
path: code-coverage-results.md

- name: Add coverage PR html comment
if: success() && steps.findPr.outputs.number
uses: marocchino/sticky-pull-request-comment@v2
with:
header: html
number: ${{ steps.findPr.outputs.pr }}
recreate: true
message: |
[Detailed coverage report](${{ steps.htmlUpload.outputs.link }})
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Local files
*.local.*

# Temporary files
/tmp/

Expand Down
5 changes: 3 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"rust-lang.rust-analyzer"
"rust-lang.rust-analyzer",
"ryanluker.vscode-coverage-gutters"
]
}
}
24 changes: 21 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,25 @@
// Editor
"editor.formatOnSave": true,
// Rust
"rust-analyzer.cargo.extraEnv": { "SKIP_WASM_BUILD": "1" },
"rust-analyzer.check.extraEnv": { "SKIP_WASM_BUILD": "1" },
"rust-analyzer.cargo.features": ["runtime-benchmarks"]
"rust-analyzer.cargo.extraEnv": {
"SKIP_WASM_BUILD": "1"
},
"rust-analyzer.check.extraEnv": {
"SKIP_WASM_BUILD": "1"
},
"rust-analyzer.cargo.features": ["runtime-benchmarks", "testnet"],
"coverage-gutters.coverageFileNames": ["target/cov.xml"],
// Spell checker
"cSpell.words": [
"alice",
"buildx",
"devcontainers",
"extrinsics",
"irongut",
"jwalton",
"mainnet",
"presign",
"Swatinem",
"wbuild"
]
}
Loading
Loading