feat(npos): FIX-6 Stage 2b Paso A — pallet_staking Config cableado (infra dormida)
Materializa la infra NPoS DORMIDA del DC ORIGIN_CHAIN_NPOS_V1 (decisiones de fundador ratificadas). pallet_staking 43.0.0 wired como Index 14: los 31 associated types cableados contra el tren stable2509-3 (mapeo quirúrgico audit-before-claims; compiló en 2 iteraciones). Piezas (crates/origin-chain-runtime/src/staking.rs, nuevo): - OriginEraPayout: emisión por-era LINEAL que preserva EXACTAMENTE la tasa de FIX-6 Stage 1 (BlockReward 10 OGC/bloque, 70% validadores / 30% rest). NO la curva ideal-staking-rate de Polkadot (ignora total_staked/issuance a propósito). - DealWithEraRemainder (RewardRemainder): reparte el rest 2/3 treasury (og/gvtry) + 1/3 subsidy (og/subsy) = 20%/10% del total. CRÍTICO #16: mantiene og/subsy alimentado bajo NPoS (sin él, el OriginFeeAdapter de Stage 2a degradaría a pool_covered=0 y el usuario pagaría el 100%). - OnChainExecution<OnChainSeqPhragmen> como (Genesis)ElectionProvider (dormido: ForceNone no dispara elección). VoterList=UseNominatorsAndValidatorsMap + TargetList=UseValidatorsMap (Scores distintos, evitan bags-list + sus asserts). - Params ratificados: MaxValidatorSet=150 (NPoS-6) · SessionsPerEra=6 (era 24h) · BondingDuration=7 eras=7d (NPoS-8) · SlashDeferDuration=0 (sin slashes dormido). - fungible::hold (NPoS-10): Currency/OldCurrency=Balances; el RuntimeHoldReason agregado del macro absorbe HoldReason::Staking automáticamente. Estado: staking PRESENTE pero INERTE — SessionInterface/NextNewSession=() (no avanza eras), genesis force_era=ForceNone sin stakers (PoA-equivalente, cero regresión). El emission pallet Index 13 sigue siendo la fuente de emisión. NO hay doble-emisión (staking no emite mientras no avance eras). Pendiente (sesión fresca, encienden NPoS de verdad → verificación adversarial): Paso B genesis poblado (invulnerables+stakers, asserts-trampa) · Paso C SessionManager=Staking + historical (enciende EraPayout) · Paso D emission on_initialize off (kill-switch anti-doble-emisión) · Paso E tests E2E. spec_version 2→3 (nuevo pallet ⇒ metadata; TRANSACTION_VERSION=1 intacto). 21 suites workspace verde. cargo +1.88. WASM VPS-gated (UnknownOpcode 252). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
440135293e
commit
1f0122beda
5 files changed
+313
-9
No files matched your search
Generated
+69
@@ -3254,6 +3254,36 @@ dependencies = [
|
||||
"sp-crypto-hashing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "frame-election-provider-solution-type"
|
||||
version = "16.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b0b525f462fa8121c3d143ad0d876660584f160ad5baa68c57bfeeb293c6b8fb"
|
||||
dependencies = [
|
||||
"proc-macro-crate 3.5.0",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.117",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "frame-election-provider-support"
|
||||
version = "43.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8ddd171c606313e738594a9dabe2d2a911239e6a78b5419faf2a2d6b106570c"
|
||||
dependencies = [
|
||||
"frame-election-provider-solution-type",
|
||||
"frame-support",
|
||||
"frame-system",
|
||||
"parity-scale-codec",
|
||||
"scale-info",
|
||||
"sp-arithmetic",
|
||||
"sp-core",
|
||||
"sp-npos-elections",
|
||||
"sp-runtime 44.0.0",
|
||||
"sp-std",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "frame-executive"
|
||||
version = "43.0.1"
|
||||
@@ -6484,6 +6514,7 @@ dependencies = [
|
||||
name = "origin-chain-runtime"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"frame-election-provider-support",
|
||||
"frame-executive",
|
||||
"frame-metadata-hash-extension",
|
||||
"frame-support",
|
||||
@@ -6503,6 +6534,7 @@ dependencies = [
|
||||
"pallet-grandpa",
|
||||
"pallet-revive",
|
||||
"pallet-session",
|
||||
"pallet-staking",
|
||||
"pallet-sudo",
|
||||
"pallet-timestamp",
|
||||
"pallet-transaction-payment",
|
||||
@@ -6520,6 +6552,7 @@ dependencies = [
|
||||
"sp-offchain 39.0.0",
|
||||
"sp-runtime 44.0.0",
|
||||
"sp-session 41.0.0",
|
||||
"sp-staking 41.0.0",
|
||||
"sp-std",
|
||||
"sp-transaction-pool 39.0.0",
|
||||
"sp-version 42.0.0",
|
||||
@@ -6742,6 +6775,28 @@ dependencies = [
|
||||
"sp-trie",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pallet-staking"
|
||||
version = "43.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ce23099893b90f921c53ce92db08d3b9ada8ec532f3ea125e9b117236ee4808"
|
||||
dependencies = [
|
||||
"frame-benchmarking",
|
||||
"frame-election-provider-support",
|
||||
"frame-support",
|
||||
"frame-system",
|
||||
"log",
|
||||
"pallet-authorship",
|
||||
"pallet-session",
|
||||
"parity-scale-codec",
|
||||
"scale-info",
|
||||
"serde",
|
||||
"sp-application-crypto 43.0.0",
|
||||
"sp-io 43.0.0",
|
||||
"sp-runtime 44.0.0",
|
||||
"sp-staking 41.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pallet-sudo"
|
||||
version = "43.0.0"
|
||||
@@ -11179,6 +11234,20 @@ dependencies = [
|
||||
"sp-application-crypto 42.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sp-npos-elections"
|
||||
version = "39.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eb6b7ddeb995c6d57efbc66f42c70bd513f251025fbe9de8b5903a7f87a50de7"
|
||||
dependencies = [
|
||||
"parity-scale-codec",
|
||||
"scale-info",
|
||||
"serde",
|
||||
"sp-arithmetic",
|
||||
"sp-core",
|
||||
"sp-runtime 44.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sp-offchain"
|
||||
version = "38.0.0"
|
||||
|
||||
Reference in new issue
Block a user