Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1eac4eb
add lumera auth module
j-rafique Apr 11, 2025
3358e23
gRPC fixes
mateeullahmalik Apr 13, 2025
d0036a1
implement action sdk
mateeullahmalik Apr 13, 2025
481da27
Merge branch 'updates/supernode' into featur/action-sdk
mateeullahmalik Apr 13, 2025
3fb670d
Merge branch 'lumeraAuthModule' into featur/action-sdk
mateeullahmalik Apr 13, 2025
06de857
Update Adapters
mateeullahmalik Apr 13, 2025
1a9cdeb
Remove rq store
mateeullahmalik Apr 16, 2025
0ea4eed
Updates
mateeullahmalik Apr 25, 2025
b6478e1
Updates
mateeullahmalik Apr 29, 2025
4249eb8
Updates
mateeullahmalik Apr 29, 2025
d4ad176
more updates
mateeullahmalik Apr 30, 2025
a5c4411
Code cleanup (#36)
mateeullahmalik May 1, 2025
031aa9c
Change rq library (#37)
mateeullahmalik May 2, 2025
b6c4c8c
made adjustments to supernode cascade action processing proto (#38)
j-rafique May 2, 2025
7d93322
refactor SN (#39)
mateeullahmalik May 2, 2025
2a4d7b2
Merge branch 'master' into feature/action-sdk
mateeullahmalik May 2, 2025
04d6e70
fix go.mod
mateeullahmalik May 2, 2025
880d7cf
resolve go build problems
mateeullahmalik May 2, 2025
4baec8b
Merge action-params into feature/action-sdk
mateeullahmalik May 2, 2025
2c86a6c
SDK api updates
mateeullahmalik May 2, 2025
eb40758
Merge pull request #41 from LumeraProtocol/update/cascade-test
mateeullahmalik May 2, 2025
1abdb03
Fix errors
mateeullahmalik May 2, 2025
8a6941d
Fixes
mateeullahmalik May 2, 2025
59b3f7a
More fixes
mateeullahmalik May 3, 2025
0466b0a
Fix Encode func
mateeullahmalik May 3, 2025
57a5113
Updates config
mateeullahmalik May 4, 2025
16e491d
fixes , clean up
mateeullahmalik May 5, 2025
2d37f56
Merge pull request #43 from LumeraProtocol/encoding-fixes
mateeullahmalik May 5, 2025
c5e5c32
fix unit-tests and integration-tests + minor bugs
j-rafique May 5, 2025
2f2a4cd
Merge pull request #44 from LumeraProtocol/fixTestPipelines
j-rafique May 5, 2025
f0c5acb
Update/add txid (#45)
mateeullahmalik May 5, 2025
e2cc711
SDK Unit Tests (#46)
mateeullahmalik May 6, 2025
9a1595a
Add healthcheck (#47)
mateeullahmalik May 6, 2025
46f0a0d
Fix
mateeullahmalik May 6, 2025
9777252
Add secure comm
mateeullahmalik May 6, 2025
06365b4
Action Fee Check (#48)
mateeullahmalik May 6, 2025
f9c9da2
Update/pipeline fixes (#49)
mateeullahmalik May 7, 2025
febf37b
test enhancements
mateeullahmalik May 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
17 changes: 17 additions & 0 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Setup Environment
description: Sets up Go and installs system dependencies

runs:
using: "composite"
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24'

- name: Install libwebp-dev
run: |
sudo apt-get update
sudo apt-get install -y libwebp-dev
shell: bash

121 changes: 68 additions & 53 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,84 @@
# name: tests
name: tests

# on:
# push:
# paths-ignore:
# - '**.md'
# - 'docs/**'
# - '.gitignore'
on:
push:
paths-ignore:
- '**.md'
- 'docs/**'
- '.gitignore'

# jobs:
# unit-tests:
# name: unit-tests
# runs-on: ubuntu-latest
jobs:
unit-tests:
name: unit-tests
runs-on: ubuntu-latest

# steps:
# - name: Checkout code
# uses: actions/checkout@v3
steps:
- name: Checkout code
uses: actions/checkout@v3

# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: '1.24'
- name: Setup Go and system deps
uses: ./.github/actions/setup-env

# - name: Install dependencies
# run: go mod download
- name: Install dependencies
run: go mod download

# - name: Run unit tests
# run: go test ./... -v
- name: Run unit tests
run: go test $(go list ./... | grep -v '/tests') -v

# integration-tests:
# name: integration-tests
# runs-on: ubuntu-latest
integration-tests:
name: integration-tests
runs-on: ubuntu-latest

# steps:
# - name: Checkout code
# uses: actions/checkout@v3
steps:
- name: Checkout code
uses: actions/checkout@v3

# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: '1.24'

# - name: Run integration tests
# run: go test -v -p 1 -count=1 -tags=integration ./...
- name: Setup Go and system deps
uses: ./.github/actions/setup-env

- name: Install dependencies
run: go mod download

# system-tests:
# name: system-tests
# runs-on: ubuntu-latest
- name: Run integration tests
run: go test -v ./tests/integration/...

# steps:
# - name: Checkout code
# uses: actions/checkout@v3
system-tests:
name: system-tests
runs-on: ubuntu-latest

# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: '1.24'
steps:
- name: Checkout code
uses: actions/checkout@v3

# - name: Install dependencies
# run: cd tests/system && go mod download
- name: Setup Go and system deps
uses: ./.github/actions/setup-env

- name: Install dependencies
run: |
go mod download
cd tests/system && go mod download

# - name: Install lumera
# run: cd tests/scripts && ./install-lumera.sh
- name: Install Lumera
run: |
cd tests/scripts
chmod +x ./install-lumera.sh
sudo ./install-lumera.sh

# - name: Copy CSV file to home directory
# run: cp claims.csv ~/
- name: Setup Supernode environments
run: |
cd tests/scripts
chmod +x ./setup-supernodes.sh
./setup-supernodes.sh all \
../../supernode/main.go \
../system/supernode-data \
../system/config.test-1.yml \
../system/supernode-data2 \
../system/config.test-2.yml \
../system/supernode-data3 \
../system/config.test-3.yml

- name: Copy CSV file to home directory
run: cp claims.csv ~/

# - name: Run system tests
# run: cd tests/system && go test -tags=system_test -v .
- name: Run system tests
run: cd tests/system && go test -v .
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ go.work.sum
.env
/data
/tests/system/data
tests/system/supernode-data
tests/system/supernode-data2
tests/system/supernode-data3
25 changes: 20 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
{
"version": "0.2.0",
"configurations": [



{
"name": "Debug main.go",
"name": "Launch Supernode",
"type": "go",
"request": "launch",
"mode": "debug",
"mode": "auto",
"program": "${workspaceFolder}/supernode/main.go",
"env": {},
"args": ["start"],
"showLog": true
"cwd": "${workspaceFolder}",
"args": ["start", "-c=${workspaceFolder}/supernode/config.yaml"]
},
{
"name": "Run System Test",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}/tests/system",
"buildFlags": "-tags=system_test",
"args": ["-test.run=TestCascadeE2E", "-test.v"],
"showLog": true,
"env": {
"LOG_LEVEL": "debug" // This may vary depending on your logger
}
}
]
}
59 changes: 43 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test-unit test-integration test-system tests-system-setup
.PHONY: test-unit test-integration test-system install-lumera setup-supernodes system-test-setup

# Run unit tests (regular tests with code)
test-unit:
Expand All @@ -12,18 +12,45 @@ test-integration:
test-system:
cd tests/system && go test -tags=system_test -v .

tests-system-setup:
cd tests/scripts && ./install-lumera.sh

gen-lumera-proto:
cd ./proto/lumera/action && protoc --go_out=../../../gen/lumera/action --go-grpc_out=../../../gen/lumera/action --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative action.proto && cd ../../../
cd ./proto/lumera/action && protoc --go_out=../../../gen/lumera/action --go-grpc_out=../../../gen/lumera/action --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative action_service.proto && cd ../../../
cd ./proto/lumera/supernode && protoc --go_out=../../../gen/lumera/supernode --go-grpc_out=../../../gen/lumera/supernode --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative supernode.proto && cd ../../../
cd ./proto/lumera/supernode && protoc --go_out=../../../gen/lumera/supernode --go-grpc_out=../../../gen/lumera/supernode --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative supernode_service.proto && cd ../../../

gen-dupe-detection-proto:
cd ./proto/dupedetection && protoc --go_out=../../gen/dupedetection --go-grpc_out=../../gen/dupedetection --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative dd-server.proto && cd ../../

gen-raptor-q-proto:
cd ./proto/raptorq && protoc --go_out=../../gen/raptorq --go-grpc_out=../../gen/raptorq --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative raptorq.proto && cd ../../

gen-cascade:
protoc \
--proto_path=proto \
--go_out=gen \
--go_opt=paths=source_relative \
--go-grpc_out=gen \
--go-grpc_opt=paths=source_relative \
proto/supernode/action/cascade/service.proto

# Define the paths
SUPERNODE_SRC=supernode/main.go
DATA_DIR=tests/system/supernode-data
DATA_DIR2=tests/system/supernode-data2
DATA_DIR3=tests/system/supernode-data3
CONFIG_FILE=tests/system/config.test-1.yml
CONFIG_FILE2=tests/system/config.test-2.yml
CONFIG_FILE3=tests/system/config.test-3.yml

# Setup script
SETUP_SCRIPT=tests/scripts/setup-supernodes.sh

# Install Lumera
install-lumera:
@echo "Installing Lumera..."
@chmod +x tests/scripts/install-lumera.sh
@sudo tests/scripts/install-lumera.sh

# Setup supernode environments
setup-supernodes:
@echo "Setting up all supernode environments..."
@chmod +x $(SETUP_SCRIPT)
@bash $(SETUP_SCRIPT) all $(SUPERNODE_SRC) $(DATA_DIR) $(CONFIG_FILE) $(DATA_DIR2) $(CONFIG_FILE2) $(DATA_DIR3) $(CONFIG_FILE3)

# Complete system test setup (Lumera + Supernodes)
system-test-setup: install-lumera setup-supernodes
@echo "System test environment setup complete."
@if [ -f claims.csv ]; then cp claims.csv ~/; echo "Copied claims.csv to home directory."; fi

# Run system tests with complete setup
test-system-full: system-test-setup
@echo "Running system tests..."
@cd tests/system && go test -tags=system_test -v .
Loading