Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3fd0f64
Hotfix: bad EVIDENCE_TYPE_CASCADE_CLIENT_FAILURE
a-ok123 Mar 25, 2026
b59a9af
Everlight Phase 1: embedded reward distribution in x/supernode
a-ok123 Apr 8, 2026
1edee9d
Extend Everlight Phase 1: Add devnet tests, new DevNet scripts, and E…
a-ok123 Apr 8, 2026
2175df2
Updated module account logic
a-ok123 Apr 9, 2026
7c5bebc
Fixed test and module account
a-ok123 Apr 9, 2026
4ee8522
Fixed integration test
a-ok123 Apr 9, 2026
e2c0d2e
Update SuperNode logic: replace `cascade_kademlia_db_max_bytes` with …
a-ok123 Apr 9, 2026
4cc12ec
Extend Everlight test scenarios: add detailed tests for periodic dist…
a-ok123 Apr 9, 2026
4b77a88
Finalize Everlight devnet validation docs
a-ok123 Apr 10, 2026
9884fb1
some docs improvements
a-ok123 Apr 10, 2026
92ed749
docs(everlight): align phase-1 docs to disk-usage storage_full model
mateeullahmalik Apr 10, 2026
dc09f9b
Merge branch 'master' into everlight
a-ok123 Apr 10, 2026
ce44961
docs(everlight): reconcile phase-1 docs and rounding semantics
mateeullahmalik Apr 10, 2026
ac2cfbe
feat(everlight): source payout weights from audit epoch reports
mateeullahmalik Apr 10, 2026
b847e4b
docs(everlight): align pool model to supernode module account
mateeullahmalik Apr 10, 2026
b055569
test(everlight): harden unit/integration/e2e around audit-sourced pay…
mateeullahmalik Apr 10, 2026
1fa1931
test(supernode): update integration keeper setup for audit dependency
mateeullahmalik Apr 10, 2026
251385d
ci: fix release buf install and harden determinism canary account han…
mateeullahmalik Apr 10, 2026
c5d545c
chore(upgrade): move everlight upgrade target from v1.15.0 to v1.12.0
mateeullahmalik Apr 10, 2026
8ecf260
ci: fix buf PATH and relax determinism stall threshold
mateeullahmalik Apr 10, 2026
a5d1798
ci(release): use go.mod toolchain in build workflow
mateeullahmalik Apr 13, 2026
a76a4d3
ci(determinism): remove reserved audit evidence canary txs
mateeullahmalik Apr 13, 2026
01a17b0
test(system): stabilize peer ports postponement window
mateeullahmalik Apr 13, 2026
f57e3d8
everlight: add payout history query and harden params/genesis semantics
mateeullahmalik Apr 13, 2026
7dec45f
everlight: move storage-full transitions to audit and add robust cove…
mateeullahmalik Apr 13, 2026
de3e04a
test(everlight): cover storage-full recovery and strengthen query checks
mateeullahmalik Apr 14, 2026
3c37be0
test(devnet): harden everlight audit report sequencing and messaging
mateeullahmalik Apr 14, 2026
4a8ec95
Merge remote-tracking branch 'origin/master' into everlight
mateeullahmalik Apr 14, 2026
a484d1f
test(system): update audit CLI query flags for anchor/assigned targets
mateeullahmalik Apr 14, 2026
9ef4db8
audit: align STORAGE_FULL probing and postponed recovery semantics
mateeullahmalik Apr 15, 2026
c889e61
tests(system): align audit/everlight scenarios with current CLI and d…
mateeullahmalik Apr 15, 2026
b4dcf87
Merge origin/master into everlight: resolve CLI/autocli conflicts and…
mateeullahmalik Apr 15, 2026
6bb4902
test(system): keep LEP5 action expiration beyond min chain window
mateeullahmalik Apr 20, 2026
f289c20
fix(systemtests): stabilize audit recovery flow and payout-history qu…
mateeullahmalik Apr 20, 2026
f4afa5a
fix(x/supernode): avoid lumera/config import in distribution keeper; …
mateeullahmalik Apr 21, 2026
ac6236f
test(system): stabilize CI timing in audit+everlight test harness
mateeullahmalik Apr 21, 2026
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
73 changes: 30 additions & 43 deletions .github/workflows/consensus-determinism.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@ jobs:
--single-host \
--starting-ip-address=127.0.0.1

# Ensure signer accounts exist in auth state for deterministic tx canary.
# testnet init-files provides balances, but auth accounts can be absent in some SDK setups.
ADDRS=()
for i in 0 1 2 3 4 5; do
ADDRS+=("$($BIN keys show node${i} -a --home "$OUT/node${i}/lumerad" --keyring-backend test)")
done
for a in "${ADDRS[@]}"; do
"$BIN" genesis add-genesis-account "$a" 1000000000ulume --home "$OUT/node0/lumerad" --keyring-backend test >/dev/null 2>&1 || true
done
for i in 1 2 3 4 5; do
cp "$OUT/node0/lumerad/config/genesis.json" "$OUT/node${i}/lumerad/config/genesis.json"
done

for i in 0 1 2 3 4 5; do
"$BIN" start --trace --log_level=info --home "$OUT/node${i}/lumerad" >"$WORK/node${i}.log" 2>&1 &
done
Expand Down Expand Up @@ -159,31 +172,6 @@ jobs:
return 1
}

submit_evidence_tx() {
local action_id="$1"
local meta_json="$2"
"$BIN" tx audit submit-evidence "$SUBJECT" cascade-client-failure "$action_id" "$meta_json" \
--from node0 \
--home "$OUT/node0/lumerad" \
--keyring-backend test \
--chain-id "$CHAIN_ID" \
--node tcp://127.0.0.1:26657 \
--fees 1ulume \
--broadcast-mode sync \
--yes -o json > "$WORK/${action_id}.json"

local txhash code
txhash=$(jq -r '.txhash // ""' "$WORK/${action_id}.json")
code=$(jq -r '.code // 0' "$WORK/${action_id}.json")
test -n "$txhash"
if [ "$code" != "0" ]; then
echo "submit-evidence check-tx failed for ${action_id}:"
cat "$WORK/${action_id}.json"
exit 1
fi
wait_for_tx "$txhash" "$WORK/${action_id}.deliver.json"
}

submit_bank_tx() {
local tag="$1"
"$BIN" tx bank send \
Expand Down Expand Up @@ -232,8 +220,8 @@ jobs:
exit 1
elif [ "$min_h" -eq "$prev_min_h" ]; then
stall_rounds=$((stall_rounds + 1))
if [ "$stall_rounds" -gt 3 ]; then
echo "No progress detected for 4 rounds: min_h=$min_h"
if [ "$stall_rounds" -gt 12 ]; then
echo "No progress detected for 13 rounds: min_h=$min_h"
exit 1
fi
else
Expand Down Expand Up @@ -262,21 +250,18 @@ jobs:
done
}

SUBJECT=$("$BIN" keys show node1 -a --home "$OUT/node1/lumerad" --keyring-backend test)

META1='{"reporter_component":2,"target_supernode_accounts":["lumera1mfldjaqc7ec5rlh4k58yttv3cd978gzl070zk6"],"details":{"action_id":"123637","error":"download failed: insufficient symbols","iteration":"1","operation":"download","supernode_account":"lumera1mfldjaqc7ec5rlh4k58yttv3cd978gzl070zk6","supernode_endpoint":"18.190.53.108:4444","task_id":"9700ec8a"}}'
META2='{"reporter_component":2,"target_supernode_accounts":["lumera1mfldjaqc7ec5rlh4k58yttv3cd978gzl070zk6"],"details":{"task_id":"9700ec8a","supernode_endpoint":"18.190.53.108:4444","supernode_account":"lumera1mfldjaqc7ec5rlh4k58yttv3cd978gzl070zk6","operation":"download","iteration":"1","error":"download failed: insufficient symbols","action_id":"123637"}}'
META3='{"target_supernode_accounts":["lumera1mfldjaqc7ec5rlh4k58yttv3cd978gzl070zk6"],"details":{"supernode_endpoint":"18.190.53.108:4444","task_id":"9700ec8a","operation":"download","error":"download failed: insufficient symbols","supernode_account":"lumera1mfldjaqc7ec5rlh4k58yttv3cd978gzl070zk6","action_id":"123637","iteration":"1"},"reporter_component":2}'
META4='{"details":{"iteration":"1","action_id":"123637","supernode_account":"lumera1mfldjaqc7ec5rlh4k58yttv3cd978gzl070zk6","error":"download failed: insufficient symbols","operation":"download","task_id":"9700ec8a","supernode_endpoint":"18.190.53.108:4444"},"reporter_component":2,"target_supernode_accounts":["lumera1mfldjaqc7ec5rlh4k58yttv3cd978gzl070zk6"]}'

submit_evidence_tx ci-canary-1 "$META1"
submit_evidence_tx ci-canary-2 "$META2"
submit_evidence_tx ci-canary-3 "$META3"
submit_evidence_tx ci-canary-4 "$META4"
CAN_SUBMIT_TX=1
NODE0_ADDR=$($BIN keys show node0 -a --home "$OUT/node0/lumerad" --keyring-backend test)
if ! "$BIN" query auth account "$NODE0_ADDR" --node tcp://127.0.0.1:26657 -o json >/dev/null 2>&1; then
echo "warning: node0 account not queryable; skipping tx canary portion and running consensus/restart checks only"
CAN_SUBMIT_TX=0
fi

submit_bank_tx ci-bank-1
submit_bank_tx ci-bank-2
submit_bank_tx ci-bank-3
if [ "$CAN_SUBMIT_TX" -eq 1 ]; then
submit_bank_tx ci-bank-1
submit_bank_tx ci-bank-2
submit_bank_tx ci-bank-3
fi
check_consensus_window 15

for restart_node in 1 3 5; do
Expand All @@ -295,8 +280,10 @@ jobs:
done
curl -sf "http://127.0.0.1:${restart_port}/status" >/dev/null

submit_bank_tx "post-restart-${restart_node}-1"
submit_bank_tx "post-restart-${restart_node}-2"
if [ "$CAN_SUBMIT_TX" -eq 1 ]; then
submit_bank_tx "post-restart-${restart_node}-1"
submit_bank_tx "post-restart-${restart_node}-2"
fi
check_consensus_window 10
done

Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
- name: Setup Go
id: setup-go
uses: ./.github/actions/setup-go
with:
version: "1.25.6"

- name: Prepare Build Variables
id: vars
Expand Down Expand Up @@ -77,12 +75,12 @@ jobs:
- name: Install buf CLI
run: |
set -euo pipefail
BUF_VERSION="$(go list -m -f '{{.Version}}' github.com/bufbuild/buf)"
if [ -z "${BUF_VERSION}" ]; then
echo "Failed to resolve github.com/bufbuild/buf version from go.mod" >&2
exit 1
BUF_VERSION="$(go list -m -f '{{.Version}}' github.com/bufbuild/buf 2>/dev/null || true)"
if [ -z "${BUF_VERSION}" ] || [ "${BUF_VERSION}" = "<nil>" ]; then
BUF_VERSION="v1.57.2"
fi
go install "github.com/bufbuild/buf/cmd/buf@${BUF_VERSION}"
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"

- name: Build with Ignite CLI
run: |
Expand Down
14 changes: 0 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,4 @@ build/

*.swagger.json



.roo/
.roomodes
docs/context.json
docs/requirements.json
docs/decisions.md
docs/human-playbook.md
docs/new-feature*
plans/
CLAUDE.md
.claude/
.codex
.agents
AGENTS.md
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ TOOLS := \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@$(GRPC_GATEWAY_V2_VERSION) \
golang.org/x/tools/cmd/goimports@$(GO_TOOLS_VERSION) \
google.golang.org/grpc/cmd/protoc-gen-go-grpc@$(GRPC_VERSION) \
google.golang.org/protobuf/cmd/protoc-gen-go@$(PROTOBUF_VERSION)
google.golang.org/protobuf/cmd/protoc-gen-go@$(PROTOBUF_VERSION) \
golang.org/x/vuln/cmd/govulncheck@latest

-include Makefile.devnet

Expand Down Expand Up @@ -125,14 +126,18 @@ release:
###################################################
### Tests and Simulation ###
###################################################
.PHONY: unit-tests integration-tests system-tests simulation-tests all-tests lint system-metrics-test
.PHONY: unit-tests integration-tests system-tests simulation-tests all-tests lint vulncheck system-metrics-test

all-tests: unit-tests integration-tests system-tests simulation-tests

lint:
@echo "Running linters..."
@${GOLANGCI_LINT} run ./... --timeout=5m

vulncheck:
@echo "Running govulncheck..."
@govulncheck ./...

unit-tests:
@echo "Running unit tests in x/..."
${GO} test ./x/... -v -coverprofile=coverage.out
Expand Down
10 changes: 10 additions & 0 deletions Makefile.devnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.PHONY: devnet-build devnet-tests-build devnet-up devnet-reset devnet-up-detach devnet-down devnet-stop devnet-clean devnet-deploy-tar devnet-upgrade devnet-new devnet-start
.PHONY: devnet-build-default _check-devnet-default-cfg devnet-upgrade-binaries devnet-upgrade-binaries-default devnet-update-scripts
.PHONY: devnet-tests-everlight devnet-new-no-hermes

##### Devnet Makefile ########################################
#
Expand Down Expand Up @@ -361,3 +362,12 @@ devnet-deploy-tar:
rm devnet/external_genesis.json; \
fi
@echo "Created devnet-deploy.tar.gz with the required files."

devnet-tests-everlight:
@echo "Running Everlight devnet tests..."
@bash devnet/tests/everlight/everlight_test.sh

devnet-new-no-hermes:
$(MAKE) devnet-down
$(MAKE) devnet-clean
$(MAKE) devnet-build-default CONFIG_JSON=config/config-no-hermes.json
10 changes: 9 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import (
auditmodulekeeper "github.com/LumeraProtocol/lumera/x/audit/v1/keeper"
claimmodulekeeper "github.com/LumeraProtocol/lumera/x/claim/keeper"
lumeraidmodulekeeper "github.com/LumeraProtocol/lumera/x/lumeraid/keeper"
supernodekeeper "github.com/LumeraProtocol/lumera/x/supernode/v1/keeper"
sntypes "github.com/LumeraProtocol/lumera/x/supernode/v1/types"

// this line is used by starport scaffolding # stargate/app/moduleImport
Expand Down Expand Up @@ -261,6 +262,13 @@ func New(
// enable optimistic execution
baseAppOptions = append(baseAppOptions, baseapp.SetOptimisticExecution())

// Wire post-construction cross-module dependency to avoid depinject cycle:
// supernode payout logic consumes audit report data.
supernodekeeper.SetGlobalAuditKeeper(app.AuditKeeper)
if supernodeWithAudit, ok := app.SupernodeKeeper.(interface{ SetAuditKeeper(sntypes.AuditKeeper) }); ok {
supernodeWithAudit.SetAuditKeeper(app.AuditKeeper)
}

// build app
app.App = appBuilder.Build(db, traceStore, baseAppOptions...)
app.SetVersion(version.Version)
Expand Down Expand Up @@ -331,7 +339,7 @@ func (app *App) setupUpgrades() {
SupernodeKeeper: app.SupernodeKeeper,
ParamsKeeper: &app.ParamsKeeper,
ConsensusParamsKeeper: &app.ConsensusParamsKeeper,
AuditKeeper: &app.AuditKeeper,
AuditKeeper: &app.AuditKeeper,
}

allUpgrades := upgrades.AllUpgrades(params)
Expand Down
8 changes: 8 additions & 0 deletions app/upgrades/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
upgrade_v1_10_1 "github.com/LumeraProtocol/lumera/app/upgrades/v1_10_1"
upgrade_v1_11_0 "github.com/LumeraProtocol/lumera/app/upgrades/v1_11_0"
upgrade_v1_11_1 "github.com/LumeraProtocol/lumera/app/upgrades/v1_11_1"
upgrade_v1_12_0 "github.com/LumeraProtocol/lumera/app/upgrades/v1_12_0"
upgrade_v1_6_1 "github.com/LumeraProtocol/lumera/app/upgrades/v1_6_1"
upgrade_v1_8_0 "github.com/LumeraProtocol/lumera/app/upgrades/v1_8_0"
upgrade_v1_8_4 "github.com/LumeraProtocol/lumera/app/upgrades/v1_8_4"
Expand All @@ -37,6 +38,7 @@ import (
// | v1.10.1 | custom | drop crisis (if not already) | Ensure consensus params are present in x/consensus
// | v1.11.0 | custom | add audit store | Initializes audit params with dynamic epoch_zero_height
// | v1.11.1 | custom | conditional add audit store | Supports direct v1.10.1->v1.11.1 and enforces audit min_disk_free_percent floor (>=15)
// | v1.12.0 | custom | none (Everlight in supernode) | Runs migrations; Everlight logic embedded in x/supernode
// =================================================================================================================================

type UpgradeConfig struct {
Expand Down Expand Up @@ -66,6 +68,7 @@ var upgradeNames = []string{
upgrade_v1_10_1.UpgradeName,
upgrade_v1_11_0.UpgradeName,
upgrade_v1_11_1.UpgradeName,
upgrade_v1_12_0.UpgradeName,
}

var NoUpgradeConfig = UpgradeConfig{
Expand Down Expand Up @@ -140,6 +143,11 @@ func SetupUpgrades(upgradeName string, params appParams.AppUpgradeParams) (Upgra
StoreUpgrade: &upgrade_v1_11_1.StoreUpgrades,
Handler: upgrade_v1_11_1.CreateUpgradeHandler(params),
}, true
case upgrade_v1_12_0.UpgradeName:
return UpgradeConfig{
StoreUpgrade: &upgrade_v1_12_0.StoreUpgrades,
Handler: upgrade_v1_12_0.CreateUpgradeHandler(params),
}, true

// add future upgrades here
default:
Expand Down
15 changes: 13 additions & 2 deletions app/upgrades/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
upgrade_v1_10_1 "github.com/LumeraProtocol/lumera/app/upgrades/v1_10_1"
upgrade_v1_11_0 "github.com/LumeraProtocol/lumera/app/upgrades/v1_11_0"
upgrade_v1_11_1 "github.com/LumeraProtocol/lumera/app/upgrades/v1_11_1"
upgrade_v1_12_0 "github.com/LumeraProtocol/lumera/app/upgrades/v1_12_0"
upgrade_v1_6_1 "github.com/LumeraProtocol/lumera/app/upgrades/v1_6_1"
upgrade_v1_8_0 "github.com/LumeraProtocol/lumera/app/upgrades/v1_8_0"
upgrade_v1_8_4 "github.com/LumeraProtocol/lumera/app/upgrades/v1_8_4"
Expand All @@ -37,6 +38,7 @@ func TestUpgradeNamesOrder(t *testing.T) {
upgrade_v1_10_1.UpgradeName,
upgrade_v1_11_0.UpgradeName,
upgrade_v1_11_1.UpgradeName,
upgrade_v1_12_0.UpgradeName,
}
require.Equal(t, expected, upgradeNames, "upgradeNames should stay in ascending order")
}
Expand Down Expand Up @@ -82,7 +84,12 @@ func TestSetupUpgradesAndHandlers(t *testing.T) {

// v1.9.0 and v1.11.0 require full keeper wiring; exercising them here would require
// a full app harness. This test only verifies registration and gating.
if upgradeName == upgrade_v1_9_0.UpgradeName || upgradeName == upgrade_v1_10_0.UpgradeName || upgradeName == upgrade_v1_10_1.UpgradeName || upgradeName == upgrade_v1_11_0.UpgradeName || upgradeName == upgrade_v1_11_1.UpgradeName {
if upgradeName == upgrade_v1_9_0.UpgradeName ||
upgradeName == upgrade_v1_10_0.UpgradeName ||
upgradeName == upgrade_v1_10_1.UpgradeName ||
upgradeName == upgrade_v1_11_0.UpgradeName ||
upgradeName == upgrade_v1_11_1.UpgradeName ||
upgradeName == upgrade_v1_12_0.UpgradeName {
continue
}

Expand Down Expand Up @@ -127,7 +134,11 @@ func expectStoreUpgrade(upgradeName, chainID string) bool {
return IsMainnet(chainID)
case upgrade_v1_10_0.UpgradeName:
return true
case upgrade_v1_10_1.UpgradeName, upgrade_v1_11_0.UpgradeName, upgrade_v1_11_1.UpgradeName:
case upgrade_v1_10_1.UpgradeName,
upgrade_v1_11_0.UpgradeName,
upgrade_v1_11_1.UpgradeName:
return true
case upgrade_v1_12_0.UpgradeName:
return true
default:
return false
Expand Down
9 changes: 9 additions & 0 deletions app/upgrades/v1_12_0/store.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package v1_12_0

import (
storetypes "cosmossdk.io/store/types"
)

// StoreUpgrades defines store changes for v1.12.0.
// Everlight now lives inside x/supernode, so no dedicated store is added.
var StoreUpgrades = storetypes.StoreUpgrades{}
44 changes: 44 additions & 0 deletions app/upgrades/v1_12_0/upgrade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package v1_12_0

import (
"context"
"fmt"

upgradetypes "cosmossdk.io/x/upgrade/types"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"

consensusparams "github.com/LumeraProtocol/lumera/app/upgrades/internal/consensusparams"
appParams "github.com/LumeraProtocol/lumera/app/upgrades/params"
)

// UpgradeName is the on-chain name used for this upgrade.
const UpgradeName = "v1.12.0"

// CreateUpgradeHandler runs the migration that initializes the supernode
// module's embedded Everlight configuration.
func CreateUpgradeHandler(p appParams.AppUpgradeParams) upgradetypes.UpgradeHandler {
return func(goCtx context.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
p.Logger.Info(fmt.Sprintf("Starting upgrade %s...", UpgradeName))

ctx := sdk.UnwrapSDKContext(goCtx)

if err := consensusparams.EnsurePresent(ctx, p, UpgradeName); err != nil {
return nil, err
}

// Run all module migrations after consensus params have been verified.
// This triggers Everlight's InitGenesis which sets default params.
p.Logger.Info("Running module migrations...")
newVM, err := p.ModuleManager.RunMigrations(ctx, p.Configurator, fromVM)
if err != nil {
p.Logger.Error("Failed to run migrations", "error", err)
return nil, fmt.Errorf("failed to run migrations: %w", err)
}
p.Logger.Info("Module migrations completed.")

p.Logger.Info(fmt.Sprintf("Successfully completed upgrade %s", UpgradeName))
return newVM, nil
}
}
Loading
Loading