feat(pesos): spec 20, los 17 pesos del gobierno salen de los certificados de Laurha
Ya no queda ningun smoke de Charon. weights.rs se ENSAMBLA desde los tres certificados del banco de referencia (la Pi 5) con scripts/bench/ensamblar-pesos.py: - Cada funcion cobra el maximo, coeficiente a coeficiente, de todos los certificados que midieron su mismo codigo (mismo esqueleto de lecturas, escrituras y proof que el del ultimo, que es el del codigo que corre). - Con --comprobar dice si el fichero es exactamente ese ensamblado: probado en rojo cambiando a mano un peso. - Los tres certificados quedan en scripts/bench/certificados/ (sha256 18b8fcd6, 1e15d04e y 6f5cfec1), con su perfil y su evidencia en la cabecera. Por que el maximo de todos y no solo el ultimo: «El maximo de 5 de un dia no es el de otro» (Laurha). La revision adversaria de spec 20 encontro que cobrar solo el certificado vigente de cada funcion dejaba treasury_disbursement en 136 us, cuando el certificado del 2-nov, sobre el wasm que corre, mide 155 us, y otros siete por debajo de lo medido. Con la regla, ningun peso baja respecto a spec 19; los que suben, entre el +1 % y el +33 % de ejecucion. Probado: - 365 tests verdes. - Ensayo en la rp1 sobre una cadena con el codigo vivo de spec 19. Contrafactual: con estos pesos, el E2E reprueba contra spec 19, porque la cadena cobra los viejos. Tras el upgrade a 20 pasa entero, y lo cobrado es weights.rs + extensiones. Ademas: configs.rs ya no dice «Weights INTERIM hand-derived» en los cinco pallets, que cobran pesos certificados desde spec 17. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
158060bfe4
commit
6055faff1b
7 files changed
+2420
-123
No files matched your search
@@ -8,45 +8,49 @@
|
||||
// invisible. Los numeros CANONICOS de mainnet salen del banco de referencia
|
||||
// (Pi 5, governor y aislamiento declarados), no de la maquina de quien compila.
|
||||
|
||||
// MEDIDO POR LAURHA 🌊 EN EL BANCO DE REFERENCIA, 2026-10-24 17:41-17:46. El perfil es el mismo
|
||||
// al empezar y al acabar:
|
||||
// CyberDeckRP1 · Raspberry Pi 5 · Cortex-A76 · kernel 6.18.34+rpt-rpi-2712.
|
||||
// Núcleo 3 aislado (partición cgroup «isolated» de origin-banco), governor performance a
|
||||
// 2,4 GHz, CI parada, throttled 0x0, 45-49 °C.
|
||||
// frame-omni-bencher 0.15.0 · wasm sha256 40cb5a1d…a1cf744 (spec 16, main 3cd1068).
|
||||
// steps 50 · repeat 20 · taskset -c 3 · 5 PROCESOS por pallet, y se cobra el MÁXIMO de los 5
|
||||
// (scripts/bench/max-de-n.py): procesos idénticos se separan hasta un 35 % en el base weight.
|
||||
// Evidencia en la rp1: ~/laurha-work/banco/spec16-20261024-1631 (SHA256SUMS d930c5e1…).
|
||||
// SPEC 20: LOS 17 PESOS SALEN DE CERTIFICADOS DE LAURHA 🌊 en el banco de referencia de la rp1
|
||||
// (CyberDeckRP1 · Raspberry Pi 5 · Cortex-A76). Ya no queda ningún smoke de Charon.
|
||||
//
|
||||
// ENSAMBLADO, no generado de una sola corrida:
|
||||
// python3 scripts/bench/ensamblar-pesos.py crates/origin-chain-governance/src/weights.rs \
|
||||
// scripts/bench/certificados/2026-10-24-spec16-laurha.rs \
|
||||
// scripts/bench/certificados/2026-10-29-spec18-laurha.rs \
|
||||
// scripts/bench/certificados/2026-11-02-spec19-laurha.rs
|
||||
// (con --comprobar dice si este fichero es exactamente ese ensamblado). Cada función cobra el
|
||||
// MÁXIMO, coeficiente a coeficiente, de TODOS los certificados que midieron su mismo código (el
|
||||
// mismo esqueleto de lecturas, escrituras y proof que el del certificado vigente, el último). Cada
|
||||
// bloque dice de qué certificados sale. La razón es de Laurha: «El máximo de 5 de un día no es el
|
||||
// de otro». Entre días, un mismo extrinsic se separa hasta un 22 %. Cobrar sólo el último cobraba
|
||||
// de menos lo que otro día midió más alto sobre el mismo código. Lo encontró la revisión adversaria
|
||||
// de spec 20, en treasury_disbursement: 136 µs cobrados frente a 155 µs medidos sobre el wasm vigente.
|
||||
//
|
||||
// Los certificados, con lo que registró cada uno (todos con frame-omni-bencher 0.15.0, steps 50,
|
||||
// repeat 20, 5 procesos y el máximo por coeficiente con scripts/bench/max-de-n.py):
|
||||
// - 2026-10-24, de 17:41 a 17:46, wasm de spec 16 40cb5a1d…a1cf744 (main 3cd1068). Kernel
|
||||
// 6.18.34+rpt-rpi-2712, núcleo 3 aislado (partición «isolated» de origin-banco), governor
|
||||
// performance a 2,4 GHz, CI parada, throttled 0x0, 45-49 °C, taskset -c 3.
|
||||
// Fichero sha256 18b8fcd6…; en la rp1, ~/laurha-work/banco/spec16-20261024-1631 (SHA256SUMS
|
||||
// d930c5e1…).
|
||||
// - 2026-10-29, de 08:41 a 08:42, wasm de spec 18 539d7bf4…9311eb9. Núcleo 3 aislado, governor
|
||||
// performance a 2,4 GHz, CI parada con 0 procesos de gitea-runner, nodo de la cadena vivo en
|
||||
// 0-2, throttled 0x0, 58-62 °C. Fundido sha256 1e15d04e…; ~/laurha-work/banco/
|
||||
// spec18-20261029-0841 (SHA256SUMS 90e3dff7…).
|
||||
// - 2026-11-02, de 12:24 a 12:25, wasm de spec 19 c817695a…f96b23a3 (main 158060b): el código que
|
||||
// corre. Mismo perfil que el 29-oct, 63,7-67,5 °C. Fundido sha256 6f5cfec1…;
|
||||
// ~/laurha-work/banco/spec19-20261102-1215 (SHA256SUMS 7449f247…).
|
||||
// Nota de Laurha sobre esta corrida: el máximo de endorse_emergency_proposal (84,6 µs frente a
|
||||
// 57,7-58,8 µs de los otros cuatro procesos) «es una cola, no el coste». Se cobra igual, porque el
|
||||
// banco cobra el caso malo; sobre el total cobrado es un +2 %.
|
||||
// La Pi es el hardware MÁS LENTO que puede validar la red: sus pesos son el techo honesto. El
|
||||
// TIEMPO DE EJECUCIÓN sale de 2,5 a 3,9 veces el del Mac M3 Max (~6 veces en los que verifican
|
||||
// Ed25519). Lo COBRADO sube menos, entre +4 % y +56 %, porque lecturas y escrituras de storage
|
||||
// (RocksDbWeight) no cambian y pesan más que la ejecución (revisión adversarial, 25-oct).
|
||||
//
|
||||
// SPECS 18 Y 19 (RV17): SEIS de estos pesos NO son de Laurha. Son de Charon, medidos en la misma
|
||||
// Pi porque su código cambió. Es un SMOKE DECLARADO, no un certificado: governor ondemand, núcleo
|
||||
// 3 por taskset y SIN aislar, 5 procesos LIMPIOS (ningún proceso de gitea-runner salvo el daemon
|
||||
// en ningún segundo de cada ventana, y 30 s de calma antes), steps 50, repeat 20, y el máximo de
|
||||
// los 5 (max-de-n.py). frame-omni-bencher 0.15.0.
|
||||
// - `finalize_proposal`, `finalize_override` y `treasury_disbursement`: el 2026-10-28,
|
||||
// 21:49-21:52, wasm de spec 18 `539d7bf4…9311eb9`, 48-64 °C. Evidencia en
|
||||
// ~/charon/bench-spec18/v2 de la rp1.
|
||||
// - `submit_proposal`, `submit_treasury_proposal` y `veto_proposal`: el 2026-10-29,
|
||||
// 09:15-09:19, wasm de spec 19 `c817695a…f96b23a3`. Leen los pools y el vault para el quórum.
|
||||
// El núcleo se calentó 3 s antes de cada proceso: 2,4 GHz en todas las muestras, 59-64 °C.
|
||||
// Evidencia en ~/charon/bench-spec19/v2.
|
||||
// Sin calentar, ondemand arrancaba cada proceso a 1,5-2,1 GHz y el máximo salía hasta un 10 %
|
||||
// más alto (~/charon/bench-spec19/sin-calentar, sobre un wasm anterior).
|
||||
// Se descartó una medida del 28-oct: su muestreador sólo contaba `rustc` y no veía los tests de
|
||||
// la CI. Un proceso salió 10 veces más lento.
|
||||
// Calibración: sobre los que no cambian, estos smokes dan 0,75-1,24 veces lo certificado (el ruido
|
||||
// entre procesos que midió Laurha). Esos once se quedan con lo de Laurha. Las lecturas, las
|
||||
// escrituras y el proof de los 17 coinciden con el bench del Mac sobre el mismo wasm. Laurha puede
|
||||
// certificar los seis en su banco y sustituirlos.
|
||||
|
||||
//! Weights AUTOGENERADOS para `origin_chain_governance` — NO editar a mano.
|
||||
//! Weights para `origin_chain_governance`, MEDIDOS en el banco de referencia y ENSAMBLADOS desde
|
||||
//! sus certificados con `scripts/bench/ensamblar-pesos.py` — NO editar a mano.
|
||||
//!
|
||||
//! Regenerar: `scripts/bench/regen-weights.sh` (ver ese script para el
|
||||
//! procedimiento completo y el hardware al que hay que creerle).
|
||||
//! Medir de nuevo: `scripts/bench/regen-weights.sh` sobre el banco, guardar el fundido en
|
||||
//! `scripts/bench/certificados/` y volver a ensamblar (ver la cabecera de arriba).
|
||||
//!
|
||||
//! GENERADO POR SUBSTRATE BENCHMARK CLI VERSION 51.0.0
|
||||
//! FECHA: 2026-10-24, STEPS: `50`, REPEAT: `20`
|
||||
@@ -88,7 +92,8 @@ use frame_support::{traits::Get, weights::constants::RocksDbWeight, weights::Wei
|
||||
/// Trait de weights para los extrinsics de `origin_chain_governance`.
|
||||
// MAXIMO DE N = 5 PROCESOS (scripts/bench/max-de-n.py): cada coeficiente
|
||||
// de tiempo y de proof es el maximo de los N; reads/writes iguales en los N.
|
||||
// Entradas (sha256[:12]): a8f7fab4ff78 c2b1258176a2 817d1e5288c9 62cc76cc2bd7 af28b446c93f
|
||||
// Entradas: los tres certificados de la cabecera (sha256 18b8fcd6…, 1e15d04e…, 6f5cfec1…), ensamblados
|
||||
// con scripts/bench/ensamblar-pesos.py.
|
||||
|
||||
pub trait WeightInfo {
|
||||
/// Peso de `submit_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||
@@ -152,9 +157,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `108`
|
||||
// Estimado: `11402`
|
||||
// Tiempo minimo de ejecucion: 133_445_000 picosegundos.
|
||||
Weight::from_parts(135_242_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11402))
|
||||
// Máximo por coeficiente de: 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(137_796_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11_402))
|
||||
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||
}
|
||||
@@ -182,9 +187,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `2321`
|
||||
// Estimado: `5338`
|
||||
// Tiempo minimo de ejecucion: 103_445_000 picosegundos.
|
||||
// Máximo por coeficiente de: 2026-10-24-spec16-laurha, 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(127_723_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5338))
|
||||
.saturating_add(Weight::from_parts(0, 5_338))
|
||||
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||
}
|
||||
@@ -210,9 +215,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `701`
|
||||
// Estimado: `6196`
|
||||
// Tiempo minimo de ejecucion: 143_834_000 picosegundos.
|
||||
Weight::from_parts(147_649_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
// Máximo por coeficiente de: 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(159_519_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6_196))
|
||||
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(7_u64))
|
||||
}
|
||||
@@ -232,9 +237,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `26`
|
||||
// Estimado: `3554`
|
||||
// Tiempo minimo de ejecucion: 30_759_000 picosegundos.
|
||||
Weight::from_parts(39_278_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3554))
|
||||
// Máximo por coeficiente de: 2026-10-24-spec16-laurha, 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(41_463_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_554))
|
||||
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4_u64))
|
||||
}
|
||||
@@ -254,9 +259,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `154`
|
||||
// Estimado: `3554`
|
||||
// Tiempo minimo de ejecucion: 33_907_000 picosegundos.
|
||||
Weight::from_parts(46_556_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3554))
|
||||
// Máximo por coeficiente de: 2026-10-24-spec16-laurha, 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(48_648_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_554))
|
||||
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(4_u64))
|
||||
}
|
||||
@@ -294,9 +299,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `1441`
|
||||
// Estimado: `16416`
|
||||
// Tiempo minimo de ejecucion: 263_724_000 picosegundos.
|
||||
Weight::from_parts(269_483_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 16416))
|
||||
// Máximo por coeficiente de: 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(269_796_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 16_416))
|
||||
.saturating_add(T::DbWeight::get().reads(24_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(11_u64))
|
||||
}
|
||||
@@ -314,9 +319,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `26`
|
||||
// Estimado: `3513`
|
||||
// Tiempo minimo de ejecucion: 26_852_000 picosegundos.
|
||||
Weight::from_parts(28_186_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3513))
|
||||
// Máximo por coeficiente de: 2026-10-24-spec16-laurha, 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(32_593_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_513))
|
||||
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||
}
|
||||
@@ -334,9 +339,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `99`
|
||||
// Estimado: `3513`
|
||||
// Tiempo minimo de ejecucion: 30_686_000 picosegundos.
|
||||
Weight::from_parts(34_333_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3513))
|
||||
// Máximo por coeficiente de: 2026-10-24-spec16-laurha, 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(36_093_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_513))
|
||||
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||
}
|
||||
@@ -372,9 +377,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `2469`
|
||||
// Estimado: `5338`
|
||||
// Tiempo minimo de ejecucion: 128_353_000 picosegundos.
|
||||
Weight::from_parts(131_927_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5338))
|
||||
// Máximo por coeficiente de: 2026-10-24-spec16-laurha, 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(161_114_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5_338))
|
||||
.saturating_add(T::DbWeight::get().reads(14_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||
}
|
||||
@@ -404,9 +409,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `354`
|
||||
// Estimado: `6132`
|
||||
// Tiempo minimo de ejecucion: 156_797_000 picosegundos.
|
||||
Weight::from_parts(177_131_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6132))
|
||||
// Máximo por coeficiente de: 2026-10-24-spec16-laurha, 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(196_648_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6_132))
|
||||
.saturating_add(T::DbWeight::get().reads(11_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||
}
|
||||
@@ -432,9 +437,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `615`
|
||||
// Estimado: `6196`
|
||||
// Tiempo minimo de ejecucion: 133_815_000 picosegundos.
|
||||
Weight::from_parts(144_130_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
// Máximo por coeficiente de: 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(155_055_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6_196))
|
||||
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||
}
|
||||
@@ -454,9 +459,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `102`
|
||||
// Estimado: `3593`
|
||||
// Tiempo minimo de ejecucion: 95_908_000 picosegundos.
|
||||
Weight::from_parts(99_778_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
// Máximo por coeficiente de: 2026-10-24-spec16-laurha, 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(105_983_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_593))
|
||||
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||
}
|
||||
@@ -478,9 +483,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `154`
|
||||
// Estimado: `6132`
|
||||
// Tiempo minimo de ejecucion: 55_537_000 picosegundos.
|
||||
Weight::from_parts(67_686_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6132))
|
||||
// Máximo por coeficiente de: 2026-10-24-spec16-laurha, 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(84_593_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6_132))
|
||||
.saturating_add(T::DbWeight::get().reads(8_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||
}
|
||||
@@ -504,9 +509,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `2198`
|
||||
// Estimado: `5338`
|
||||
// Tiempo minimo de ejecucion: 81_593_000 picosegundos.
|
||||
Weight::from_parts(84_315_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5338))
|
||||
// Máximo por coeficiente de: 2026-10-24-spec16-laurha, 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(112_148_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5_338))
|
||||
.saturating_add(T::DbWeight::get().reads(8_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||
}
|
||||
@@ -542,9 +547,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `2469`
|
||||
// Estimado: `5338`
|
||||
// Tiempo minimo de ejecucion: 128_686_000 picosegundos.
|
||||
// Máximo por coeficiente de: 2026-10-24-spec16-laurha, 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(153_834_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5338))
|
||||
.saturating_add(Weight::from_parts(0, 5_338))
|
||||
.saturating_add(T::DbWeight::get().reads(14_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||
}
|
||||
@@ -574,9 +579,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `723`
|
||||
// Estimado: `3722`
|
||||
// Tiempo minimo de ejecucion: 83_908_000 picosegundos.
|
||||
Weight::from_parts(86_407_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3722))
|
||||
// Máximo por coeficiente de: 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(89_463_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_722))
|
||||
.saturating_add(T::DbWeight::get().reads(11_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||
}
|
||||
@@ -604,9 +609,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Proof size en bytes:
|
||||
// Medido: `108`
|
||||
// Estimado: `11402`
|
||||
// Tiempo minimo de ejecucion: 140_537_000 picosegundos.
|
||||
Weight::from_parts(143_630_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11402))
|
||||
// Máximo por coeficiente de: 2026-11-02-spec19-laurha.
|
||||
Weight::from_parts(145_629_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11_402))
|
||||
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(7_u64))
|
||||
}
|
||||
@@ -615,104 +620,104 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Impl para mocks y tests — `RocksDbWeight` directo, sin necesitar `T`.
|
||||
impl WeightInfo for () {
|
||||
fn submit_proposal() -> Weight {
|
||||
Weight::from_parts(135_242_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11402))
|
||||
Weight::from_parts(137_796_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11_402))
|
||||
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||
}
|
||||
fn cast_vote() -> Weight {
|
||||
Weight::from_parts(127_723_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5338))
|
||||
.saturating_add(Weight::from_parts(0, 5_338))
|
||||
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||
}
|
||||
fn finalize_proposal() -> Weight {
|
||||
Weight::from_parts(147_649_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
Weight::from_parts(159_519_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6_196))
|
||||
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(7_u64))
|
||||
}
|
||||
fn add_council_member() -> Weight {
|
||||
Weight::from_parts(39_278_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3554))
|
||||
Weight::from_parts(41_463_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_554))
|
||||
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
||||
}
|
||||
fn remove_council_member() -> Weight {
|
||||
Weight::from_parts(46_556_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3554))
|
||||
Weight::from_parts(48_648_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_554))
|
||||
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
||||
}
|
||||
fn veto_proposal() -> Weight {
|
||||
Weight::from_parts(269_483_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 16416))
|
||||
Weight::from_parts(269_796_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 16_416))
|
||||
.saturating_add(RocksDbWeight::get().reads(24_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(11_u64))
|
||||
}
|
||||
fn mark_as_advisor() -> Weight {
|
||||
Weight::from_parts(28_186_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3513))
|
||||
Weight::from_parts(32_593_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_513))
|
||||
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||
}
|
||||
fn unmark_as_advisor() -> Weight {
|
||||
Weight::from_parts(34_333_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3513))
|
||||
Weight::from_parts(36_093_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_513))
|
||||
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||
}
|
||||
fn override_council_veto() -> Weight {
|
||||
Weight::from_parts(131_927_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5338))
|
||||
Weight::from_parts(161_114_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5_338))
|
||||
.saturating_add(RocksDbWeight::get().reads(14_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||
}
|
||||
fn submit_emergency_proposal() -> Weight {
|
||||
Weight::from_parts(177_131_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6132))
|
||||
Weight::from_parts(196_648_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6_132))
|
||||
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||
}
|
||||
fn treasury_disbursement() -> Weight {
|
||||
Weight::from_parts(144_130_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
Weight::from_parts(155_055_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6_196))
|
||||
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||
}
|
||||
fn treasury_deposit() -> Weight {
|
||||
Weight::from_parts(99_778_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
Weight::from_parts(105_983_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_593))
|
||||
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||
}
|
||||
fn endorse_emergency_proposal() -> Weight {
|
||||
Weight::from_parts(67_686_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6132))
|
||||
Weight::from_parts(84_593_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6_132))
|
||||
.saturating_add(RocksDbWeight::get().reads(8_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||
}
|
||||
fn unlock_vote_funds() -> Weight {
|
||||
Weight::from_parts(84_315_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5338))
|
||||
Weight::from_parts(112_148_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5_338))
|
||||
.saturating_add(RocksDbWeight::get().reads(8_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||
}
|
||||
fn uphold_council_veto() -> Weight {
|
||||
Weight::from_parts(153_834_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5338))
|
||||
.saturating_add(Weight::from_parts(0, 5_338))
|
||||
.saturating_add(RocksDbWeight::get().reads(14_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||
}
|
||||
fn finalize_override() -> Weight {
|
||||
Weight::from_parts(86_407_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3722))
|
||||
Weight::from_parts(89_463_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3_722))
|
||||
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||
}
|
||||
fn submit_treasury_proposal() -> Weight {
|
||||
Weight::from_parts(143_630_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11402))
|
||||
Weight::from_parts(145_629_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 11_402))
|
||||
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(7_u64))
|
||||
}
|
||||
|
||||
@@ -459,8 +459,8 @@ impl pallet_session::Config for Runtime {
|
||||
|
||||
impl origin_chain_provenance::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
// Weights INTERIM hand-derived DB-aware (cierra el DoS de proof_size=0 de los
|
||||
// placeholders). Regenerable vía `benchmark pallet` cuando aterrice HW/omni-bencher.
|
||||
// Pesos medidos en el banco de referencia (la Pi 5, certificados de Laurha): ver la
|
||||
// cabecera de su weights.rs.
|
||||
type WeightInfo = origin_chain_provenance::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
@@ -484,7 +484,8 @@ impl origin_chain_fees::Config for Runtime {
|
||||
/// — pool-alimentación y pool-consumo apuntan a la misma cuenta og/subsy
|
||||
/// (jamás re-declarar el literal: un typo divergiría las cuentas).
|
||||
type SubsidyPalletId = EmissionSubsidyPalletId;
|
||||
// Weights INTERIM hand-derived DB-aware (ver weights.rs). Regenerable en HW.
|
||||
// Pesos medidos en el banco de referencia (la Pi 5, certificados de Laurha): ver la
|
||||
// cabecera de su weights.rs.
|
||||
type WeightInfo = origin_chain_fees::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
@@ -503,7 +504,8 @@ impl origin_chain_fees::Config for Runtime {
|
||||
|
||||
impl origin_chain_agent_identity::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
// Weights INTERIM hand-derived DB-aware (ver weights.rs). Regenerable en HW.
|
||||
// Pesos medidos en el banco de referencia (la Pi 5, certificados de Laurha): ver la
|
||||
// cabecera de su weights.rs.
|
||||
type WeightInfo = origin_chain_agent_identity::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
@@ -633,7 +635,8 @@ impl origin_chain_governance::Config for Runtime {
|
||||
type MinOverrideQuorum = DiezPorCientoDeLoQuePuedeVotar;
|
||||
type VoteQuorum = DiezPorCientoDeLoQuePuedeVotar;
|
||||
type TreasuryPalletId = GovernanceTreasuryPalletId;
|
||||
// Weights INTERIM hand-derived DB-aware (ver weights.rs). Regenerable en HW.
|
||||
// Pesos medidos en el banco de referencia (la Pi 5) y ensamblados desde los certificados de
|
||||
// Laurha: ver la cabecera de origin_chain_governance::weights.
|
||||
type WeightInfo = origin_chain_governance::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
@@ -684,7 +687,8 @@ impl origin_chain_emission::Config for Runtime {
|
||||
// Reusa el MISMO vault de governance (og/gvtry) para el treasury.
|
||||
type TreasuryPalletId = GovernanceTreasuryPalletId;
|
||||
type SubsidyPalletId = EmissionSubsidyPalletId;
|
||||
// Weights INTERIM hand-derived DB-aware (ver weights.rs). Regenerable en HW.
|
||||
// Pesos medidos en el banco de referencia (la Pi 5, certificados de Laurha): ver la
|
||||
// cabecera de su weights.rs.
|
||||
type WeightInfo = origin_chain_emission::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
|
||||
@@ -374,6 +374,10 @@ pub const IMPL_NAME: &str = borrowed_str(&VERSION.impl_name);
|
||||
/// lógica ni ningún storage, sólo lo que cuesta cada extrinsic. Es el primer upgrade que se
|
||||
/// aplica en vivo a la testnet de la casa (rp1), por `set_code`.
|
||||
///
|
||||
/// **v20 (2026-11-02), sólo pesos:** los 17 extrinsics del gobierno cobran lo que certificó Laurha
|
||||
/// en el banco de referencia de la rp1 (ver la cabecera de `origin_chain_governance::weights`). Ya
|
||||
/// no queda ningún smoke. No cambia el código, ni el storage, ni la codificación.
|
||||
///
|
||||
/// **v19 (2026-10-29), RV17 decidido por David:** el quórum es el 10 % de lo que PUEDE VOTAR (la
|
||||
/// emisión menos las cuentas sin llave: pools, vault, bonds y revive). «Sí, del 10 % de lo que
|
||||
/// puede votar» (David, 29-oct). En mainnet pasa de ~100M a ~35,1M OGC; en la testnet de la casa
|
||||
@@ -1043,7 +1047,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
|
||||
spec_name: alloc::borrow::Cow::Borrowed("origin-chain"),
|
||||
impl_name: alloc::borrow::Cow::Borrowed("origin-chain-charon"),
|
||||
authoring_version: 1,
|
||||
spec_version: 19,
|
||||
spec_version: 20,
|
||||
impl_version: 1,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
transaction_version: 1,
|
||||
@@ -1204,7 +1208,7 @@ mod tests {
|
||||
/// mismo commit en que la version subio a 12.
|
||||
#[test]
|
||||
fn spec_version_vigente_y_transaction_version_intacta() {
|
||||
assert_eq!(RUNTIME_VERSION, 19);
|
||||
assert_eq!(RUNTIME_VERSION, 20);
|
||||
assert_eq!(TRANSACTION_VERSION, 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user