Commit graph

104 commits

Author SHA1 Message Date
Steve Degosserie
49286b128d
feat: Bump client version to v0.25.0 (#455) 2026-02-24 09:41:20 +00:00
Steve Degosserie
990df7ccce
feat: Bump client version to v0.24.0 and runtime to RT1300 (#446) 2026-02-16 11:43:35 +02:00
Facundo Farall
7ecab6f7e7
build: ⬆️ Upgrade to StorageHub 0.4.1 (#445)
Upgrades to StorageHub version
[v0.4.1](https://github.com/Moonsong-Labs/storage-hub/releases/tag/v0.4.1).
This release include new CLI options as can be seen in the release
notes. However, they come with sensible defaults, making it
non-breaking.
2026-02-14 22:54:38 +01:00
Facundo Farall
a2aec42254
build: ⬆️ Upgrade to StorageHub v0.4.0 (#437)
This PR upgrades DataHaven to StorageHub version
[0.4.0](https://github.com/Moonsong-Labs/storage-hub/releases/tag/v0.4.0).

## ⚠️ Breaking Changes ⚠️
This is a minor release, and as such, contains breaking changes detailed
in the corresponding [StorageHub
release](https://github.com/Moonsong-Labs/storage-hub/releases/tag/v0.4.0).

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
2026-02-10 10:02:35 +00:00
Steve Degosserie
7e429de111
feat: Bump client version to v0.23.0 and runtime to RT1200 (#432)
Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
2026-02-05 12:01:32 +00:00
Steve Degosserie
0623e320f6
feat(node): add MMR gadget for offchain leaf indexing (#430)
## Summary

- Add the `mmr-gadget` to the DataHaven client for proper MMR leaf
indexing in offchain storage
- Gate the gadget on `offchain_worker.indexing_enabled` to avoid running
when indexing is disabled
- Enable efficient MMR proof queries by block number via the MMR RPC

## Problem

The DataHaven client was missing the `mmr-gadget`, which prevented MMR
leaves from being correctly indexed in the offchain database. Without
it:

- MMR proofs could only be queried by block hash, not block number
- Light clients and bridge relayers could not efficiently verify
finality
- The `mmr_generateProof` RPC had degraded functionality

## Changes

| File | Change |
|------|--------|
| `operator/Cargo.toml` | Add workspace deps for `mmr-gadget`,
`sp-mmr-primitives` |
| `operator/node/Cargo.toml` | Add node deps for `mmr-gadget`,
`sp-mmr-primitives` |
| `operator/node/src/service.rs` | Add import and spawn `MmrGadget`
after BEEFY gadget |

## Test plan

- [x] Build passes: `cd operator && cargo build --release --features
fast-runtime`
- [x] Run node with debug logging: `--log mmr-gadget=debug`
- [x] Verify `mmr-gadget` task starts in logs
- [x] Test MMR RPC by block number works:
  ```bash
  curl -H "Content-Type: application/json" \
-d '{"id":1,"jsonrpc":"2.0","method":"mmr_generateProof","params":[[1],
null, null]}' \
    http://localhost:9944
  ```

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:36:54 +01:00
Gonza Montiel
786ddb39a9
fix: add missing benchmarks and weights (#302)
## Add missing weights
The aim of this PR is to complete our weights by enabling more runtime
benchmarks from the pallets used in DataHaven. I will start this effort
with Storage Hub pallets.

## What's included
- [x] `pallet_nfts`
  - [x] Added signing helper for pallet nfts
  - [x] Add pallet to benchmarks
  - [x] Run benches and generate weights
  - [x] Wire up weights to runtimes  

- [x] `pallet_session`
  - [x] Added a `pallet_session_benchmarking` crate
  - [x] Added signing helpers
  - [x] Add pallet to benchmarks
  - [x] Run benches and generate weights
  - [x] Wire up weights to runtimes  

- [x] `pallet_payment_streams`
  - [x] Add `TreasuryAccount` helper and configure properly
  - [x] Add pallet to benchmarks
  - [x] Run benches and generate weights
  - [x] Wire up weights to runtimes  
  
- [x] `pallet_storage_providers`
  - [x] Add `TreasuryAccount` helper and configure properly
  - [x] Add pallet to benchmarks
  - [x] Run benches and generate weights
  - [x] Wire up weights to runtimes  

- [x] `pallet_file_system`
  - [x] Add pallet to benchmarks and configure properly
  - [ ] Run benches and generate weights
  - [x] Wire up weights to runtimes  

- [x] `pallet_proofs_dealer`
  - [x] Add pallet to benchmarks and configure properly
  - [x] Run benches and generate weights
  - [x] Wire up weights to runtimes  


## What's not included
- `pallet_identity` - We'll enable it once we update to `2506`, that
will allow us to have a BenchmarkHelper in the config on the pallet (see
[here](ac28323e7d/operator/runtime/mainnet/src/configs/mod.rs (L632-L643)))
- `pallet_grandpa` - the upstream pallet defines
[benchmarks](bbc435c766/substrate/frame/grandpa/src/benchmarking.rs (L25))
for `check_equivocation_proof` and `note_stalled`, but the required
weights to be wired are actually `report_equivocation`,
`report_equivocation_unsigned` and `note_stalled`. That means including
`pallet_grandpa` in the benchmarks results in an inconsistent
`WeightInfo` implementation, so further understanding in the pallet's
approach to benchmarking is needed.
- `pallet_file_system` -> Run benches and generate weights. Weights will
fail because of a hardcoded `AccountId32` on the
[benchmarks](57d2a195d5/pallets/file-system/src/benchmark_proofs.rs (L69-L71)).
I'll create a PR for SH soon.

These two are left for a follow up PR.
2026-02-03 17:12:11 +01:00
Steve Degosserie
a97f1a0ae2
feat: Bump client version to v0.22.0 and runtime to RT1100 (#427) 2026-02-02 17:33:23 +01:00
Steve Degosserie
ce24450b70
feat: Add pallet-proxy-genesis-companion from Moonbeam (#419)
## Summary

- Import `pallet-proxy-genesis-companion` from Moonbeam to enable proxy
account configuration at genesis time
- Configure the pallet in all runtimes (mainnet, stagenet, testnet) with
pallet index 106
- Add `Serialize`/`Deserialize` derives to `ProxyType` enum to satisfy
`MaybeSerializeDeserialize` bounds
- Include mock runtime and unit tests adapted for polkadot-stable2412-6

This pallet extends `pallet-proxy` with genesis configuration support,
allowing proxy relationships to be established at chain genesis rather
than requiring extrinsic calls after launch.

### Key adaptations from Moonbeam

The pallet was modified to work with the DataHaven SDK version
(polkadot-stable2412-6):
- Removed `BlockNumberProvider` associated type constraint (not present
in this version of pallet-proxy)
- Uses `frame_system::pallet_prelude::BlockNumberFor<T>` directly for
delay parameter
- Uses `MaybeSerializeDeserialize` trait bound for `ProxyType`

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
Co-authored-by: Ahmad Kaouk <ahmadkaouk.93@gmail.com>
2026-01-30 12:16:28 +01:00
Steve Degosserie
5f87493080
feat: Bump client version to v0.21.0 (#424) 2026-01-29 22:32:57 +01:00
Michael Assaf
2f3d669b42
build: ⬆️ Upgrade to SH v0.3.5 (#423)
Upgrades StorageHub dependencies from v0.3.3 to v0.3.5. This requires a
client upgrade.

## ⚠️ Breaking Changes ⚠️
  
Fisherman CLI options have been added to support specifying filtering
and ordering strategies for pending file deletions with reasonable
defaults:
  
- `--fisherman-filtering`: The filtering strategy [**`none` (default)**,
`ttl`]
- `--fisherman-ordering`: The ordering strategy [**`chronological`
(default)**, `randomized`]
- `--fisherman-ttl-threshold-seconds`: TTL for a file to be ignored for
deletion in seconds
  
MSP and BSP CLI options have been added to support specifying a specific
batch response and confirm size for MSP and BSP nodes with reasonable
defaults.
  
- `--bsp-confirm-file-batch-size`: How many storage requests to respond
to (confirming) in a single extrinsic call **(default: 20)**
- `--msp-respond-storage-batch-size`: How many storage requests to
respond to (accepting or rejecting) in a single extrinsic call
**(default: 20)**
2026-01-29 20:09:56 +01:00
Facundo Farall
7f1bb4a671
build: ⬆️ Upgrade to SH v0.3.3 (#410)
Upgrades to StorageHub version v0.3.3. This upgrade requires both a
runtime and client upgrade.

---------

Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
2026-01-23 14:28:24 +01:00
Steve Degosserie
e0b066dc09
feat: Bump client version to v0.20.0 & runtime to 1000 (#411) 2026-01-23 12:49:19 +02:00
Steve Degosserie
41141124e7
feat: Upgrade to StorageHub v0.3.2 (#405)
Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
2026-01-20 17:47:36 +02:00
Facundo Farall
15e536780d
build: ⬆️ Upgrade to SH release v0.3.1 (#393)
This PR upgrades the StorageHub version to
[v0.3.1](https://github.com/Moonsong-Labs/storage-hub/releases/tag/v0.3.1).
The changes applied are the ones suggested in the corresponding release
notes, which in short are:
- Adding the `get_number_of_active_users_of_provider` runtime API to the
`PaymentStreams` pallet runtime APIs.
- Supporting `--max-open-forests` CLI param (has defaults).
- Supporting Prometheus telemetry.

IMPORTANT: This upgrade requires a Runtime upgrade as well as a Client
upgrade.

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
2026-01-14 13:10:53 +01:00
Steve Degosserie
916261ee8b
feat: Bump client version to v0.13.0 (#388) 2026-01-12 14:40:01 +01:00
Ahmad Kaouk
9be1acc97e
refactor: cleanup old rewards model (#383)
## Summary

This PR removes the old merkle root-based rewards model and completes
the migration to EigenLayer Rewards V2 distribution. The old model
required operators to claim rewards by providing merkle proofs, while
the new model uses `submitRewards` to send rewards directly to
EigenLayer's `RewardsCoordinator`.

### Key Changes

- **Smart Contracts**: Removed `RewardsRegistry`,
`RewardsRegistryStorage`, `IRewardsRegistry`, and `SortedMerkleProof`
contracts along with all merkle claim functions from
`ServiceManagerBase`
- **Substrate Pallets**: Removed merkle proof generation from
`external-validators-rewards` pallet and deleted the entire
`runtime-api` crate (no longer needed)
- **Test Framework**: Removed all RewardsRegistry-related code from
deployment scripts, CLI handlers, and TypeScript bindings
- **Runtimes**: Cleaned up all three runtimes (testnet, stagenet,
mainnet) to remove runtime API implementations and unused imports

### Files Removed

**Contracts:**
- `contracts/src/middleware/RewardsRegistry.sol`
- `contracts/src/middleware/RewardsRegistryStorage.sol`
- `contracts/src/interfaces/IRewardsRegistry.sol`
- `contracts/src/libraries/SortedMerkleProof.sol`
- `contracts/test/RewardsRegistry.t.sol`
- `contracts/test/ServiceManagerRewardsRegistry.t.sol`

**Substrate:**
- `operator/pallets/external-validators-rewards/runtime-api/` (entire
crate)

**Test Framework:**
- `test/suites/rewards-message.test.ts`

### Files Modified

**Contracts:**
- `ServiceManagerBase.sol` - Removed merkle claim functions
- `ServiceManagerBaseStorage.sol` - Removed
`operatorSetToRewardsRegistry` mapping
- `IServiceManager.sol` - Removed interface members

**Substrate:**
- `external-validators-rewards` pallet - Removed merkle proof
generation, simplified `EraRewardsUtils` struct
- All runtime configs - Removed `ExternalValidatorsRewardsApi`
implementations

**Test Framework:**
- Updated deployment scripts, CLI handlers, relayer configs, and
TypeScript bindings

### Stats

```
50 files changed, 966 insertions(+), 4453 deletions(-)
```

## Test plan

- [x] All Rust tests pass (`cargo test`)
- [x] All contract tests pass (`forge test`)
- [x] TypeScript type checking passes (`bun typecheck`)
- [x] Contracts build successfully (`forge build`)
- [x] Operator builds successfully (`cargo build --release --features
fast-runtime`)
- [ ] E2E tests pass (`bun test:e2e`)
2026-01-09 15:25:49 +01:00
Facundo Farall
21fa0af8df
feat: ⬆️ Upgrade to StorageHub version 0.3.0 (#381)
Upgrade to StorageHub version 0.3.0. This is a minor release, including
breaking changes.

## ⚠️ Breaking Changes ⚠️
The changes applied in this PR are according to the suggested changes in
StorageHub's [v0.3.0
release](https://github.com/Moonsong-Labs/storage-hub/releases/tag/v0.3.0)

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
2026-01-07 20:34:03 +01:00
Steve Degosserie
9bca5c467b
fix: Use block authorship as liveness indicator for validator rewards (#367)
## Summary

Use block authorship as direct proof of liveness for the 30% liveness
component of validator rewards. Validators who author at least one block
in a session are considered online and receive the full liveness bonus.

## Problem

The rewards pallet was checking validator liveness via ImOnline
**after** the session had rotated - at which point ImOnline had already
cleared its `AuthoredBlocks` storage. This caused all validators to
appear offline, resulting in only ~70% of expected rewards being
allocated (missing the 30% liveness bonus).

## Solution

Use **block authorship as the proxy for liveness**:

- A validator who authored at least one block is definitively online
- Liveness is determined directly in `award_session_performance_points`
via `blocks_authored > 0`
- No dependency on external liveness checks (ImOnline)

### Rewards Formula

- **60%** Block authorship (proportional to blocks produced)
- **30%** Liveness (full bonus if authored ≥1 block, zero otherwise)
- **10%** Base reward (for being in the validator set)

### Files Changed

- `pallets/external-validators-rewards/src/lib.rs` - Core logic changes
- `pallets/external-validators-rewards/src/mock.rs` - Test mock updates
- `pallets/external-validators-rewards/src/tests.rs` - Test updates
- `runtime/{mainnet,testnet,stagenet}/src/configs/mod.rs` - Config
updates

## Testing

- All 76 pallet tests pass
- Local testing should show correct points per session (e.g., 3200
points for 2 validators with 10 blocks)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
2026-01-07 13:41:40 +00:00
undercover-cactus
a8d811fde8
feat: add feature to build binary with postgres bundled (#346)
## Summary

Re-add the static build feature option to bundle postgres dependency
into the binary. It simplify the installation because now to run the
node the operator doesn't need to have postgres dependencies installed
on its system.

## What changed ?

* Added a `static` feature that can be activated to add the extra
dependencies during the build.
* A task that run every time a dependency has been modified so we can
make sure the build with the feature is still working correctly. (we are
assuming simple change in the code won't have an impact on it because
postgres is being used in diesel which is not a direct dependecy to
datahaven).
2026-01-06 13:13:25 +00:00
Steve Degosserie
ae03649a4f
feat: Bump client version to v0.12.0 (#378) 2026-01-05 14:38:42 +01:00
Steve Degosserie
d22d0d5dcb
feat: Bump client version to v0.11.0 (#376) 2026-01-03 23:03:39 +01:00
Facundo Farall
e01237fe31
build: ⬆️ Upgrade SH version to 0.2.9 (#374)
Upgrades to StorageHub version 0.2.9. This is a patch release, no
breaking changes, which fixes a bug where a misuse of a runtime API was
causing the MSP to lag behind in block processing.
2026-01-02 15:25:16 +01:00
Steve Degosserie
c401278ea9
feat: Bump client version to v0.10.0 (#371) 2025-12-29 17:50:32 +01:00
Facundo Farall
908137510c
build: ⬆️ Upgrade to StorageHub version 0.2.8 (#370)
Upgrade to StorageHub release version v0.2.8. This is just a patch release with some non-breaking bug fixes and improvements to logs.
2025-12-29 17:01:10 +01:00
Facundo Farall
d5e64d59e8
build: ⬆️ Upgrade to StorageHub version 0.2.6 (#357)
Upgrade to StorageHub release v0.2.6

No breaking changes, just a patch release

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
2025-12-16 11:22:33 +01:00
Steve Degosserie
ef3ddaaf69
build: 🔨 Optimize node dependencies by feature-gating benchmarking (#341)
## Summary

- Feature-gate `frame-benchmarking-cli` behind `runtime-benchmarks`
feature, making it an optional dependency
- Remove unused `cumulus-client-service` workspace dependency
- Remove unused `storage-hub-runtime` workspace dependency
- Add `#[cfg(feature = "runtime-benchmarks")]` guards to
benchmark-related code

## Motivation

The `frame-benchmarking-cli` crate pulls in
`cumulus-client-parachain-inherent` and other cumulus dependencies
transitively. Since DataHaven is a solochain (not a parachain), these
dependencies are unnecessary for regular builds.

By making the benchmarking CLI optional and only compiling it when the
`runtime-benchmarks` feature is enabled, we reduce:
- Compile time for regular development builds
- Final binary size (when not benchmarking)
- Dependency tree complexity

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-09 12:26:05 +01:00
Facundo Farall
0d5f294097
build: ⬆️ Upgrade to StorageHub v0.2.5 (#347)
Upgrades to StorageHub patch release v0.2.5
2025-12-09 11:30:21 +01:00
Tobi Demeco
37f7fe9b3b
build: ⬆️ Upgrade to SH v0.2.4 (#342)
Upgrade StorageHub to v0.2.4 which includes a fixes for the fisherman
and indexer flows plus a **indexer DB migration.**
2025-12-07 22:26:52 +01:00
Ahmad Kaouk
207f2ff86a
chore: remove redundant cargo config file (#324)
## Summary

- Remove .cargo/config.toml that was unintentionally overriding release
and **production** profile settings
  - Fix outdated comment referencing Moonbeam instead of Datahaven

  ## Details

- The `operator/.cargo/config.toml` file was overriding the release
profile configuration defined in `Cargo.toml`. Removing it ensures the
intended `Cargo.toml` settings are used.
- The protocol = "sparse" setting for crates.io is no longer needed as
it has been the default since Cargo 1.70 (Rust 1.70.0).

## Important

This override also affected the production profile . Since
`[profile.production]` inherits from release, the `opt-level = 2` from
`config.toml` propagated to production builds.

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
2025-12-05 11:31:19 +01:00
Tobi Demeco
5f2b366031
build: ⬆️ Upgrade to SH v0.2.3 (#340)
Upgrade StorageHub to v0.2.3 which includes some fixes for the indexer
plus minor changes to the runtime (which required a DataHaven metadata
update).
2025-12-04 20:46:40 +01:00
Facundo Farall
1ce068eebe
build: ⬆️ Upgrade to SH v0.2.2 (#336)
Upgrades to StorageHub version 0.2.2, which includes a fix in the
Indexer handling of files in the database. No breaking changes.
2025-12-03 20:53:39 +01:00
Steve Degosserie
377e7372b9
feat: Bump client version to v0.9.0 & Runtime version to RT900 (#333) 2025-12-03 14:55:59 +01:00
Facundo Farall
c1202e5d51
build: ⬆️ Upgrade to SH release 0.2.1 (#331) 2025-12-02 21:38:59 +01:00
Steve Degosserie
51ffcae5f0
Revert "feat: statically build binary (#292)" (#330)
This reverts commit f84b6debb7.
2025-12-02 15:42:43 +01:00
Gonza Montiel
82c581d495
feat: Add datahaven native transfer precompile (#309)
## DataHaven Native Transfer Precompile

Implements EVM precompile at address
`0x00000000000000000000000000000007F5` (2073) to expose
`pallet-datahaven-native-transfer` functionality to the EVM layer.

### Features
- **Transfer to Ethereum**: Locks native tokens and sends them via
Snowbridge to Ethereum addresses
- **Pause/Unpause**: Admin controls to halt/resume transfers
- **View Functions**: Query paused state, total locked balance, and
sovereign account address

### Implementation
- Precompile using `#[precompile_utils::precompile]` macro with proper
gas accounting
- 15+ test cases covering success/failure scenarios
- Solidity interface with NatSpec documentation for contract integration

Enables seamless cross-chain transfers of DataHaven native tokens to
Ethereum L1.

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
2025-12-02 13:57:40 +01:00
Facundo Farall
4d5716fdcb
build(operator): ⬆️ Upgrade to storage-hub 0.2.0 (#327)
## ⚠️ Breaking Changes ⚠️

Upgrades to SH version 0.2.0. Breaking changes for this version are
outlined in the corresponding
[release](https://github.com/Moonsong-Labs/storage-hub/releases/tag/v0.2.0).

Particularly, in this PR, the following breaking changes are implemented
for DH node operators:

### Breaking CLI changes vs `main`

- **Fisherman vs provider role**  
- `--fisherman` now has `conflicts_with = "provider"`
(`FishermanConfigurations::fisherman`).
- Any existing scripts that started a node with both `--provider` and
`--fisherman` will now fail clap validation.

- **Removed / replaced fisherman tuning flags**  
- The following flags no longer exist and will cause errors if still
used:
- `--fisherman-incomplete-sync-max` (field
`fisherman_incomplete_sync_max`)
- `--fisherman-incomplete-sync-page-size` (field
`fisherman_incomplete_sync_page_size`)
- `--fisherman-sync-mode-min-blocks-behind` (field
`fisherman_sync_mode_min_blocks_behind`)
  - They are replaced by:  
- `--fisherman-batch-interval-seconds`
(`fisherman_batch_interval_seconds`, default `60`)
- `--fisherman-batch-deletion-limit` (`fisherman_batch_deletion_limit`,
default `1000`)

- **MSP DB wiring no longer piggybacks on the indexer DB**  
- Previously, enabling the indexer (`IndexerConfigurations`) also wired
its DB pool into the MSP move‑bucket path via
`with_indexer_db_pool(maybe_indexer_db_pool)`.
- Now, MSP DB access is **only** configured if you pass the new
`--msp-database-url` provider flag; the indexer’s `--indexer` /
`--indexer-database-url` no longer implicitly provide DB access to MSP
logic. This will change behaviour for MSP nodes that relied on just the
indexer flags.

### New / additive CLI flags (non‑breaking but behaviourally relevant)

- **Provider flags**  
- `--pending-db-url` (`pending_db_url`, env `SH_PENDING_DB_URL`) for
persisting pending extrinsics.
- `--internal-buffer-size` (`internal_buffer_size`, default `1024`) for
DB chunk batching during file transfer.

- **Reordered but unchanged**  
- `--msp-distribute-files` still exists (bool flag), just moved within
`ProviderConfigurations`; name and type are unchanged, but now also
explicitly toggles `enable_msp_distribute_files` only when
`provider_type == msp`.
2025-12-02 11:55:31 +01:00
undercover-cactus
f84b6debb7
feat: statically build binary (#292)
Co-authored-by: Gonza Montiel <gonzamontiel@users.noreply.github.com>
2025-11-28 13:38:05 +00:00
Steve Degosserie
32480f1bbc
feat: Bump client version to v0.8.0 & Runtime version to RT800 (#312) 2025-11-19 18:30:02 +00:00
Facundo Farall
ae9eef7307
build: ⬆️ Upgrade to StorageHub release 0.1.4 (#298)
Upgrades to StorageHub release
[v0.1.4](https://github.com/Moonsong-Labs/storage-hub/releases/tag/v0.1.4).

## ⚠️ Breaking Changes ⚠️
- A DB migration for the indexer DB. Should be auto-applied by the
indexer node on startup, if this is not disabled by the env var
`SH_INDEXER_DB_AUTO_MIGRATE`. By default, it applies them.
- A new runtime API (`shp_tx_implicits_runtime_api::TxImplicitsApi`)
needed for StorageHub's Blockchain Service to build transactions using
the runtime spec version from the currently run runtime.

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
2025-11-16 16:44:17 +01:00
Steve Degosserie
4c8384499f
feat: Bump client version to v0.7.0 & Runtime version to RT700 (#299) 2025-11-16 11:43:11 +01:00
Facundo Farall
0d2333ed02
build: ⬆️ Upgrade to SH release 0.1.3 (#294)
Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
2025-11-10 21:58:40 +01:00
Facundo Farall
ff5cd8dc59
build: ⬆️ Upgrade to SH v0.1.2 (#289) 2025-11-07 21:34:43 +01:00
Steve Degosserie
c7d73af4ca
feat: Bump client version to v0.6.0 & runtime version to RT600 (#276) 2025-11-04 12:51:23 +02:00
Steve Degosserie
c09ff91a66
feat: Bump client version to v0.5.0 & runtime version to RT500 (#274) 2025-11-03 16:35:22 +02:00
Facundo Farall
1fd0abccd7
build: ⬆️ Upgrade to SH v0.1.1 (#273)
Upgrade to SH release
[v0.1.1](https://github.com/Moonsong-Labs/storage-hub/releases/tag/v0.1.1)

---------

Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
Co-authored-by: Ahmad Kaouk <ahmadkaouk.93@gmail.com>
Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
2025-11-03 15:49:30 +02:00
Steve Degosserie
10a7805648
feat: Add CI license check (#269)
## Summary

- Adds automated license compliance checking via GitHub Actions CI
workflow
- Implements a license verification script that validates all Rust
dependencies against approved licenses, authors, and packages
- Standardizes author metadata across Cargo manifests to "Moonsong Labs"

## Changes

**CI Workflow** (`.github/workflows/task-check-licenses.yml`)
- Triggers on pull requests and manual dispatch
- Installs Rust 1.88.0 toolchain and `cargo-license` tool
- Executes license verification script to enforce compliance

**License Verification Script** (`operator/scripts/verify-licenses.sh`)
- Uses `cargo-license` to extract dependency license information
- Maintains three allowlists:
- **Licenses**: Apache-2.0, MIT, BSD variants, GPL-3.0, MPL-2.0, and
compatible combinations
- **Authors**: PureStake, Parity Technologies, Moonsong Labs, Frontier
developers, StorageHub Team
  - **Package Names**: Known safe packages like ring
- Fails the build if any dependency has unapproved license/author/name
combination

**Cargo Manifest Updates**
- `operator/Cargo.toml`: Standardized workspace author to "Moonsong
Labs"
- `operator/precompiles/precompile-registry/Cargo.toml`: Uses workspace
author field
- `operator/runtime/common/Cargo.toml`: Added workspace author field

## Benefits

- **Legal Compliance**: Ensures all dependencies use OSI-approved or
compatible licenses
- **Supply Chain Security**: Validates dependencies come from trusted
sources
- **Automated Enforcement**: Catches licensing issues during PR review
rather than at release time
- **Transparency**: Provides clear audit trail of approved licenses and
authors
2025-11-02 23:32:59 +02:00
Gonza Montiel
96c4408682
fix: add missing weights (#271)
### Add missing weights for BABE, GRANDPA, and Randomness

#### Summary
Adds generated weights and wires them into the runtime for the BABE,
GRANDPA, and Randomness pallets to replace defaults and ensure accurate
execution costs across networks.

#### What’s changed
- **New weights added** for `pallet_grandpa`, `pallet_babe` and
`pallet_randomness`
- **Runtime configs updated to use new weights**
  - `operator/runtime/mainnet/src/configs/mod.rs`
  - `operator/runtime/stagenet/src/configs/mod.rs`
  - `operator/runtime/testnet/src/configs/mod.rs`
 
 #### For follow-up PRS
- fix `pallet_identity` failure at running benchmarks
- fix `pallet_collective` benchmarking missmatch (related to
https://github.com/paritytech/polkadot-sdk/pull/6435)
- add `pallet_session_benchmarking` without including `pallet_staking`
(or some workaround)
- add StorageHub weights to our benchmarked pallets (`pallet_nfts`,
`pallet_storage_providers`, `pallet_payment_streams`,
`pallet_proofs_dealer`, `pallet_file_system`, `pallet_bucket_nfts`, etc)
2025-11-02 22:50:55 +02:00
Steve Degosserie
e860c503c8
feat: Bump client version to v0.4.0 & runtime version to RT400 (#268) 2025-10-30 18:02:25 +02:00
undercover-cactus
f0896907ae
feat: add slashing support (#242)
## 🔨 Add Slashing Support for Runtime

This PR introduces the slashing functionality for the DataHaven runtime,
enabling punitive measures against misbehaving validators.


### Features
- Deferred slashing with configurable veto periods
- Cross-chain slashing message delivery trough Snowbridge
- Governance controls for slashing parameters and emergency cancellation

We introduced the `external-validator-slashes` pallet, which allows to
slash validators that misbehave. The slashing is triggered when an
offence is reported via the offence pallet (which is already
implemented). The message is sent through Snowbrige's outbound queue and
the real slashing happens in the contracts side, which will come in a
follow up PR.

There is a configurable window of time between the time the validator is
being reported, and the time the slash is triggered. This allows that in
case of an error we are still able to cancel the slashing, using a sudo
account.

For convenience, we also have extrinsics for corner cases:

- **`force_inject_slash`**: Root-only function to manually inject
slashes for specific validators with custom percentages. Useful for
emergency situations or governance-directed slashing outside normal
offence detection
- **`cancel_deferred_slash`**: Allows governance to cancel pending
slashes during the defer period by specifying era and slash indices.
Provides safety mechanism against false positives or malicious slash
reports
- **`set_slashing_mode`**: Configurable slashing behavior with three
modes - `Enabled` (normal operation), `LogOnly` (track offences without
applying slashes), and `Disabled` (completely halt slashing). Critical
for emergency response and testing

---------

Co-authored-by: Gonza Montiel <gon.montiel@gmail.com>
Co-authored-by: Gonza Montiel <gonzamontiel@users.noreply.github.com>
2025-10-29 10:43:55 +00:00