Skip to content
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

jsonrpc-feature returned #417

Merged
merged 42 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
27257ce
feat: go from websocket-server to json rpc websocket/http server
zeeshanlakhani Oct 31, 2023
16392e7
refactor: cleanup settings
zeeshanlakhani Oct 31, 2023
234621d
refactor: testing around e2e websocket/jsonrpc, feature-fl
zeeshanlakhani Nov 2, 2023
ed774e4
chore: return of the retry
zeeshanlakhani Nov 3, 2023
708369e
chore: test setup
zeeshanlakhani Nov 3, 2023
6da6e71
fix: subscription map, checks, multiple broadcasts
zeeshanlakhani Nov 6, 2023
3af2ff1
fix: move to sub id as lookup key
zeeshanlakhani Nov 6, 2023
5659f06
chore: cleanup
zeeshanlakhani Nov 6, 2023
049a4ba
chore: fix warning
zeeshanlakhani Nov 6, 2023
44b8485
chore: comment
zeeshanlakhani Nov 6, 2023
64bfe77
chore: websocket->webserver
zeeshanlakhani Nov 7, 2023
058deef
feat: Add event notifications (#410)
bgins Nov 7, 2023
713718e
fix: p2p timeout, ipfs settings, more
zeeshanlakhani Nov 8, 2023
ff4ebc8
chore: updates, new wasms
zeeshanlakhani Nov 8, 2023
aa1d673
chore: add one cleanup
zeeshanlakhani Nov 8, 2023
14d7dc2
chore: wasms update is life
zeeshanlakhani Nov 8, 2023
20694da
chore: test fixins
zeeshanlakhani Nov 8, 2023
f6a3b4f
chore: minor updates
zeeshanlakhani Nov 9, 2023
b7ae3f9
chore: updates
zeeshanlakhani Nov 9, 2023
0aac079
chore: updates
zeeshanlakhani Nov 9, 2023
b88d113
chore: updates
zeeshanlakhani Nov 9, 2023
b233e1c
chore: updates
zeeshanlakhani Nov 9, 2023
522b42a
chore: testing
zeeshanlakhani Nov 9, 2023
476c47f
feat: Add pubsub receipt sharing notifications (#418)
bgins Nov 10, 2023
7ad88b5
refactor: Fix connection notification test (#424)
bgins Nov 11, 2023
b9cfa50
chore: additional test
zeeshanlakhani Nov 11, 2023
82f3348
fix: better usage, bin docs
zeeshanlakhani Nov 11, 2023
0616a33
chore: builds on for pr
zeeshanlakhani Nov 13, 2023
951abe6
refactor: (#429)
bgins Nov 13, 2023
9f817f2
chore: update debs for targets
zeeshanlakhani Nov 13, 2023
da344c1
chore: builds trial1
zeeshanlakhani Nov 13, 2023
11a8f88
fix: make configuration run without -c (all defaults) (#433)
Nov 14, 2023
0cd381d
refactor: static/dynamic nodeinfo and recv deadlines (#435)
Nov 14, 2023
59383e5
refactor: Add Gossipsub Message wrapper (#436)
bgins Nov 15, 2023
ce0c49f
fix: schedule + db conflict (#437)
Nov 15, 2023
0b37875
fix: remove unnecessary decode (#438)
Nov 16, 2023
032427e
chore: Remove databases after test runs (#444)
bgins Nov 17, 2023
c858c68
chore: send_async where possible (#445)
Nov 17, 2023
3168793
refactor: Refactor and split-up settings (#451)
bgins Nov 28, 2023
7c45cf5
Update websocket relay example app (#448)
bgins Nov 28, 2023
0aa6e3a
feat: add npm package to homestar runtime (#434)
hugomrdias Nov 29, 2023
f794950
chore: comments, logs, & cleanup (#456)
Nov 29, 2023
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
2 changes: 2 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ threads-required = 1
[profile.ci]
retries = { backoff = "exponential", count = 3, delay = "30s", jitter = true, max-delay = "300s" }
failure-output = "immediate-final"
leak-timeout = "800ms"
slow-timeout = { period = "120s", terminate-after = 2 }
fail-fast = false

[test-groups]
Expand Down
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use_flake

export RUST_LOG=homestar=debug,homestar_runtime=debug,libp2p=info,libp2p_gossipsub::behaviour=debug,tarpc=info,tower_http=debug,moka=debug
export RUST_LOG=homestar=debug,homestar_runtime=debug,libp2p=info,libp2p_gossipsub::behaviour=debug,tarpc=info,tower_http=debug,jsonrpsee_server=debug,moka=debug
export RUST_BACKTRACE=full
export RUSTFLAGS="--cfg tokio_unstable"
91 changes: 81 additions & 10 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

# for debugging
# pull_request:
# branches: [ '**' ]
# branches: ['**']

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -29,14 +29,19 @@ jobs:
include:
- target: aarch64-unknown-linux-gnu
- target: aarch64-unknown-linux-musl
npm: linux-arm64
- target: aarch64-apple-darwin
os: macos-latest
npm: darwin-arm64
- target: x86_64-unknown-linux-gnu
- target: x86_64-unknown-linux-musl
npm: linux-x64
- target: x86_64-apple-darwin
os: macos-latest
npm: darwin-x64
- target: x86_64-pc-windows-msvc
os: windows-latest
npm: windows-x64
- target: x86_64-unknown-freebsd

permissions:
Expand Down Expand Up @@ -94,25 +99,91 @@ jobs:
include: LICENSE,README.md
token: ${{ secrets.GITHUB_TOKEN }}

build-packages:
npm-publish:
needs: binary-builds
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-unknown-linux-musl
os: linux
arch: arm64
- target: x86_64-unknown-linux-musl
os: linux
arch: x64
- target: aarch64-apple-darwin
os: darwin
arch: arm64
- target: x86_64-apple-darwin
os: darwin
arch: x64
- target: x86_64-pc-windows-msvc
os: windows
arch: x64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
- name: Install cargo get
run: cargo install cargo-get
- name: Prepare os/arch packages
shell: bash
env:
node_os: ${{ matrix.os }}
node_arch: ${{ matrix.arch }}
node_pkg: homestar-${{ matrix.os }}-${{ matrix.arch }}
run: |
export node_version=$(cargo get workspace.package.version)
echo "node_pkg=${node_pkg}" >> "$GITHUB_ENV"
cd homestar-runtime/npm
mkdir -p "${node_pkg}/bin"
envsubst < package.json.tmpl > "${node_pkg}/package.json"
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: ${{ matrix.target }}
path: 'homestar-runtime/npm/${{ env.node_pkg }}/bin'
- name: Publish production
if: github.event_name == 'release' && github.event.action == 'published'
run: |
cd "homestar-runtime/npm/${{ env.node_pkg }}"
npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish RC
if: github.event_name == 'workflow_dispatch'
run: |
cd "homestar-runtime/npm/${{ env.node_pkg }}"
npm version $(cargo get package.version)-rc.$(date +%s) --git-tag-version false
npm publish --access public --tag rc
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

env:
LINUX_TARGET: x86_64-unknown-linux-musl

build-packages:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
- target: x86_64-unknown-linux-musl
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install musl-tools
run: sudo apt update && sudo apt install -y musl-dev musl-tools
if: matrix.target == 'x86_64-unknown-linux-musl'

- name: Install Rust toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: ${{ env.LINUX_TARGET }}
targets: ${{ matrix.target }}

- name: Override rust-toolchain.toml
run: rustup override set ${{steps.toolchain.outputs.name}}
Expand All @@ -131,18 +202,18 @@ jobs:
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: check-${{ env.LINUX_TARGET }}-ubuntu-latest
shared-key: check-${{ matrix.target }}-ubuntu-latest

- name: Create .deb
run: cargo deb -p homestar-runtime --target ${{ env.LINUX_TARGET }} --output homestar.deb
run: cargo deb -p homestar-runtime --target ${{ matrix.target }} --variant ${{ matrix.target }} --output homestar.deb

- name: Create .rpm
run: cargo generate-rpm -p homestar-runtime --target ${{ env.LINUX_TARGET }} --output homestar.rpm
run: cargo generate-rpm -p homestar-runtime --target ${{ matrix.target }} --variant ${{ matrix.target }} --output homestar.rpm

- name: Upload Release Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.LINUX_TARGET }}
name: ${{ matrix.target }}
path: |
*.deb
*.rpm
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests_and_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:

- name: Run Tests (no-default-features)
if: ${{ matrix.default-features == 'none' }}
run: cargo nextest run --workspace --profile ci --no-default-features --features "test-utils"
run: cargo nextest run --profile ci --no-default-features --features "test-utils"

- name: Run Doc Tests
if: ${{ matrix.default-features == 'all' }}
Expand All @@ -199,7 +199,8 @@ jobs:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
env:
RUSTFLAGS: -Ctarget-feature=+crt-static
RUSTFLAGS: -Dwarnings -Ctarget-feature=+crt-static
CARGO_INCREMENTAL: 0
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -241,12 +242,11 @@ jobs:

- name: Run Tests (no-default-features)
if: ${{ matrix.default-features == 'none' }}
run: cargo nextest run --workspace --profile ci --no-default-features --features "test-utils"
run: cargo nextest run --profile ci --no-default-features --features "test-utils"

- name: Run Doc Tests
if: ${{ matrix.default-features == 'all' }}
run: cargo test --doc --workspace
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}

run-docs:
needs: changes
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ report.json
homestar.err
homestar.out
homestar.pid
homestar.log*

# locks
homestar-wasm/Cargo.lock
Expand All @@ -54,3 +55,6 @@ examples/**/tmp/*

# nix build results
/result

# npm packages
homestar-runtime/npm/binaries
2 changes: 2 additions & 0 deletions .ignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ LICENSE
.pre-commit-config.yaml

**/fixtures
*.ipfs*
*.db

## examples
examples/websocket-relay/relay-app
Loading
Loading