mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-23 17:28:23 +00:00
## Summary - guard `DataHavenServiceManager.submitRewards` by `(startTimestamp, duration, token)` so each reward window can only be submitted once per token - expose the replay-guard state and error in the interface, add Foundry coverage, wire the missing runtime `std` features, and regenerate the Wagmi/storage/state-diff artifacts - fix the local slash E2E path by aligning the `anvil` Snowbridge `messageOrigin` with `stagenet-local`, refreshing the tracked anvil deployment metadata, and waiting for `ServiceManager.SlashingComplete` ## Testing - `cargo fmt --all -- --check` - `forge test --match-contract RewardsSubmitterTest` - `forge test --match-contract StorageLayoutTest -vvv` - `./scripts/check-storage-layout.sh` - `./scripts/check-storage-layout-negative.sh` - `bun ./scripts/check-generated-state.ts` - `bun generate:wagmi` - `bun test ./e2e/suites/slash.test.ts --timeout 1200000 --test-name-pattern "verify we have the agent origin set|Activate slashing|use sudo to slash operator"` ## Notes - Slash E2E verification reran the previously failing sudo slash path; the long liveness scenario was not rerun end to end.
88 lines
2.7 KiB
TOML
88 lines
2.7 KiB
TOML
[package]
|
|
authors = { workspace = true }
|
|
description = "Common code used through the DataHaven network"
|
|
edition = { workspace = true }
|
|
name = "datahaven-runtime-common"
|
|
version = { workspace = true }
|
|
|
|
[dependencies]
|
|
alloy-core = { workspace = true, features = ["sol-types"] }
|
|
codec = { workspace = true }
|
|
fp-account = { workspace = true, features = ["serde"] }
|
|
frame-support = { workspace = true }
|
|
frame-system = { workspace = true }
|
|
log = { workspace = true }
|
|
pallet-authorship = { workspace = true }
|
|
pallet-balances = { workspace = true }
|
|
pallet-external-validators-rewards = { workspace = true }
|
|
pallet-timestamp = { workspace = true }
|
|
pallet-external-validator-slashes = { workspace = true }
|
|
pallet-evm = { workspace = true }
|
|
pallet-evm-chain-id = { workspace = true }
|
|
pallet-evm-precompile-proxy = { workspace = true }
|
|
pallet-migrations = { workspace = true }
|
|
pallet-safe-mode = { workspace = true }
|
|
pallet-tx-pause = { workspace = true }
|
|
pallet-treasury = { workspace = true }
|
|
polkadot-primitives = { workspace = true }
|
|
polkadot-runtime-common = { workspace = true }
|
|
precompile-utils = { workspace = true }
|
|
scale-info = { workspace = true }
|
|
snowbridge-outbound-queue-primitives = { workspace = true }
|
|
sp-core = { workspace = true, features = ["serde"] }
|
|
sp-io = { workspace = true }
|
|
sp-runtime = { workspace = true, features = ["serde"] }
|
|
xcm = { workspace = true }
|
|
|
|
[features]
|
|
default = ["std"]
|
|
std = [
|
|
"alloy-core/std",
|
|
"codec/std",
|
|
"frame-support/std",
|
|
"log/std",
|
|
"pallet-authorship/std",
|
|
"pallet-balances/std",
|
|
"pallet-external-validator-slashes/std",
|
|
"pallet-external-validators-rewards/std",
|
|
"pallet-timestamp/std",
|
|
"pallet-evm/std",
|
|
"pallet-evm-chain-id/std",
|
|
"pallet-evm-precompile-proxy/std",
|
|
"pallet-migrations/std",
|
|
"pallet-safe-mode/std",
|
|
"pallet-tx-pause/std",
|
|
"pallet-treasury/std",
|
|
"polkadot-primitives/std",
|
|
"polkadot-runtime-common/std",
|
|
"precompile-utils/std",
|
|
"scale-info/std",
|
|
"snowbridge-outbound-queue-primitives/std",
|
|
"sp-core/std",
|
|
"sp-io/std",
|
|
"sp-runtime/std",
|
|
"xcm/std",
|
|
]
|
|
|
|
runtime-benchmarks = [
|
|
"frame-support/runtime-benchmarks",
|
|
"pallet-migrations/runtime-benchmarks",
|
|
"pallet-safe-mode/runtime-benchmarks",
|
|
"pallet-tx-pause/runtime-benchmarks",
|
|
"polkadot-primitives/runtime-benchmarks",
|
|
"polkadot-runtime-common/runtime-benchmarks",
|
|
"sp-runtime/runtime-benchmarks",
|
|
]
|
|
|
|
try-runtime = [
|
|
"frame-support/try-runtime",
|
|
"pallet-migrations/try-runtime",
|
|
"pallet-safe-mode/try-runtime",
|
|
"pallet-tx-pause/try-runtime",
|
|
"pallet-timestamp/try-runtime",
|
|
"polkadot-runtime-common/try-runtime",
|
|
"sp-runtime/try-runtime",
|
|
]
|
|
|
|
# Set timing constants (e.g. session period) to faster versions to speed up testing.
|
|
fast-runtime = []
|