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
|
// invisible. Los numeros CANONICOS de mainnet salen del banco de referencia
|
||||||
// (Pi 5, governor y aislamiento declarados), no de la maquina de quien compila.
|
// (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
|
// SPEC 20: LOS 17 PESOS SALEN DE CERTIFICADOS DE LAURHA 🌊 en el banco de referencia de la rp1
|
||||||
// al empezar y al acabar:
|
// (CyberDeckRP1 · Raspberry Pi 5 · Cortex-A76). Ya no queda ningún smoke de Charon.
|
||||||
// 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
|
// ENSAMBLADO, no generado de una sola corrida:
|
||||||
// 2,4 GHz, CI parada, throttled 0x0, 45-49 °C.
|
// python3 scripts/bench/ensamblar-pesos.py crates/origin-chain-governance/src/weights.rs \
|
||||||
// frame-omni-bencher 0.15.0 · wasm sha256 40cb5a1d…a1cf744 (spec 16, main 3cd1068).
|
// scripts/bench/certificados/2026-10-24-spec16-laurha.rs \
|
||||||
// steps 50 · repeat 20 · taskset -c 3 · 5 PROCESOS por pallet, y se cobra el MÁXIMO de los 5
|
// scripts/bench/certificados/2026-10-29-spec18-laurha.rs \
|
||||||
// (scripts/bench/max-de-n.py): procesos idénticos se separan hasta un 35 % en el base weight.
|
// scripts/bench/certificados/2026-11-02-spec19-laurha.rs
|
||||||
// Evidencia en la rp1: ~/laurha-work/banco/spec16-20261024-1631 (SHA256SUMS d930c5e1…).
|
// (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
|
// 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
|
// 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
|
// 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).
|
// (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
|
//! Medir de nuevo: `scripts/bench/regen-weights.sh` sobre el banco, guardar el fundido en
|
||||||
//! procedimiento completo y el hardware al que hay que creerle).
|
//! `scripts/bench/certificados/` y volver a ensamblar (ver la cabecera de arriba).
|
||||||
//!
|
//!
|
||||||
//! GENERADO POR SUBSTRATE BENCHMARK CLI VERSION 51.0.0
|
//! GENERADO POR SUBSTRATE BENCHMARK CLI VERSION 51.0.0
|
||||||
//! FECHA: 2026-10-24, STEPS: `50`, REPEAT: `20`
|
//! 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`.
|
/// Trait de weights para los extrinsics de `origin_chain_governance`.
|
||||||
// MAXIMO DE N = 5 PROCESOS (scripts/bench/max-de-n.py): cada coeficiente
|
// 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.
|
// 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 {
|
pub trait WeightInfo {
|
||||||
/// Peso de `submit_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
/// 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:
|
// Proof size en bytes:
|
||||||
// Medido: `108`
|
// Medido: `108`
|
||||||
// Estimado: `11402`
|
// Estimado: `11402`
|
||||||
// Tiempo minimo de ejecucion: 133_445_000 picosegundos.
|
// Máximo por coeficiente de: 2026-11-02-spec19-laurha.
|
||||||
Weight::from_parts(135_242_000, 0)
|
Weight::from_parts(137_796_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 11402))
|
.saturating_add(Weight::from_parts(0, 11_402))
|
||||||
.saturating_add(T::DbWeight::get().reads(10_u64))
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(6_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:
|
// Proof size en bytes:
|
||||||
// Medido: `2321`
|
// Medido: `2321`
|
||||||
// Estimado: `5338`
|
// 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)
|
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().reads(10_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(6_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:
|
// Proof size en bytes:
|
||||||
// Medido: `701`
|
// Medido: `701`
|
||||||
// Estimado: `6196`
|
// Estimado: `6196`
|
||||||
// Tiempo minimo de ejecucion: 143_834_000 picosegundos.
|
// Máximo por coeficiente de: 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||||
Weight::from_parts(147_649_000, 0)
|
Weight::from_parts(159_519_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 6196))
|
.saturating_add(Weight::from_parts(0, 6_196))
|
||||||
.saturating_add(T::DbWeight::get().reads(10_u64))
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(7_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:
|
// Proof size en bytes:
|
||||||
// Medido: `26`
|
// Medido: `26`
|
||||||
// Estimado: `3554`
|
// Estimado: `3554`
|
||||||
// Tiempo minimo de ejecucion: 30_759_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(39_278_000, 0)
|
Weight::from_parts(41_463_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3554))
|
.saturating_add(Weight::from_parts(0, 3_554))
|
||||||
.saturating_add(T::DbWeight::get().reads(6_u64))
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(4_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:
|
// Proof size en bytes:
|
||||||
// Medido: `154`
|
// Medido: `154`
|
||||||
// Estimado: `3554`
|
// Estimado: `3554`
|
||||||
// Tiempo minimo de ejecucion: 33_907_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(46_556_000, 0)
|
Weight::from_parts(48_648_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3554))
|
.saturating_add(Weight::from_parts(0, 3_554))
|
||||||
.saturating_add(T::DbWeight::get().reads(6_u64))
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(4_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:
|
// Proof size en bytes:
|
||||||
// Medido: `1441`
|
// Medido: `1441`
|
||||||
// Estimado: `16416`
|
// Estimado: `16416`
|
||||||
// Tiempo minimo de ejecucion: 263_724_000 picosegundos.
|
// Máximo por coeficiente de: 2026-11-02-spec19-laurha.
|
||||||
Weight::from_parts(269_483_000, 0)
|
Weight::from_parts(269_796_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 16416))
|
.saturating_add(Weight::from_parts(0, 16_416))
|
||||||
.saturating_add(T::DbWeight::get().reads(24_u64))
|
.saturating_add(T::DbWeight::get().reads(24_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(11_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:
|
// Proof size en bytes:
|
||||||
// Medido: `26`
|
// Medido: `26`
|
||||||
// Estimado: `3513`
|
// Estimado: `3513`
|
||||||
// Tiempo minimo de ejecucion: 26_852_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(28_186_000, 0)
|
Weight::from_parts(32_593_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3513))
|
.saturating_add(Weight::from_parts(0, 3_513))
|
||||||
.saturating_add(T::DbWeight::get().reads(5_u64))
|
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(3_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:
|
// Proof size en bytes:
|
||||||
// Medido: `99`
|
// Medido: `99`
|
||||||
// Estimado: `3513`
|
// Estimado: `3513`
|
||||||
// Tiempo minimo de ejecucion: 30_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(34_333_000, 0)
|
Weight::from_parts(36_093_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3513))
|
.saturating_add(Weight::from_parts(0, 3_513))
|
||||||
.saturating_add(T::DbWeight::get().reads(5_u64))
|
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(3_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:
|
// Proof size en bytes:
|
||||||
// Medido: `2469`
|
// Medido: `2469`
|
||||||
// Estimado: `5338`
|
// Estimado: `5338`
|
||||||
// Tiempo minimo de ejecucion: 128_353_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(131_927_000, 0)
|
Weight::from_parts(161_114_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().reads(14_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(6_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:
|
// Proof size en bytes:
|
||||||
// Medido: `354`
|
// Medido: `354`
|
||||||
// Estimado: `6132`
|
// Estimado: `6132`
|
||||||
// Tiempo minimo de ejecucion: 156_797_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(177_131_000, 0)
|
Weight::from_parts(196_648_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 6132))
|
.saturating_add(Weight::from_parts(0, 6_132))
|
||||||
.saturating_add(T::DbWeight::get().reads(11_u64))
|
.saturating_add(T::DbWeight::get().reads(11_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(6_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:
|
// Proof size en bytes:
|
||||||
// Medido: `615`
|
// Medido: `615`
|
||||||
// Estimado: `6196`
|
// Estimado: `6196`
|
||||||
// Tiempo minimo de ejecucion: 133_815_000 picosegundos.
|
// Máximo por coeficiente de: 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||||
Weight::from_parts(144_130_000, 0)
|
Weight::from_parts(155_055_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 6196))
|
.saturating_add(Weight::from_parts(0, 6_196))
|
||||||
.saturating_add(T::DbWeight::get().reads(10_u64))
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(5_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:
|
// Proof size en bytes:
|
||||||
// Medido: `102`
|
// Medido: `102`
|
||||||
// Estimado: `3593`
|
// Estimado: `3593`
|
||||||
// Tiempo minimo de ejecucion: 95_908_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(99_778_000, 0)
|
Weight::from_parts(105_983_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3593))
|
.saturating_add(Weight::from_parts(0, 3_593))
|
||||||
.saturating_add(T::DbWeight::get().reads(6_u64))
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(3_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:
|
// Proof size en bytes:
|
||||||
// Medido: `154`
|
// Medido: `154`
|
||||||
// Estimado: `6132`
|
// Estimado: `6132`
|
||||||
// Tiempo minimo de ejecucion: 55_537_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(67_686_000, 0)
|
Weight::from_parts(84_593_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 6132))
|
.saturating_add(Weight::from_parts(0, 6_132))
|
||||||
.saturating_add(T::DbWeight::get().reads(8_u64))
|
.saturating_add(T::DbWeight::get().reads(8_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(3_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:
|
// Proof size en bytes:
|
||||||
// Medido: `2198`
|
// Medido: `2198`
|
||||||
// Estimado: `5338`
|
// Estimado: `5338`
|
||||||
// Tiempo minimo de ejecucion: 81_593_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(84_315_000, 0)
|
Weight::from_parts(112_148_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 5338))
|
.saturating_add(Weight::from_parts(0, 5_338))
|
||||||
.saturating_add(T::DbWeight::get().reads(8_u64))
|
.saturating_add(T::DbWeight::get().reads(8_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(5_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:
|
// Proof size en bytes:
|
||||||
// Medido: `2469`
|
// Medido: `2469`
|
||||||
// Estimado: `5338`
|
// 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)
|
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().reads(14_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(6_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:
|
// Proof size en bytes:
|
||||||
// Medido: `723`
|
// Medido: `723`
|
||||||
// Estimado: `3722`
|
// Estimado: `3722`
|
||||||
// Tiempo minimo de ejecucion: 83_908_000 picosegundos.
|
// Máximo por coeficiente de: 2026-10-29-spec18-laurha, 2026-11-02-spec19-laurha.
|
||||||
Weight::from_parts(86_407_000, 0)
|
Weight::from_parts(89_463_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3722))
|
.saturating_add(Weight::from_parts(0, 3_722))
|
||||||
.saturating_add(T::DbWeight::get().reads(11_u64))
|
.saturating_add(T::DbWeight::get().reads(11_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(6_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:
|
// Proof size en bytes:
|
||||||
// Medido: `108`
|
// Medido: `108`
|
||||||
// Estimado: `11402`
|
// Estimado: `11402`
|
||||||
// Tiempo minimo de ejecucion: 140_537_000 picosegundos.
|
// Máximo por coeficiente de: 2026-11-02-spec19-laurha.
|
||||||
Weight::from_parts(143_630_000, 0)
|
Weight::from_parts(145_629_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 11402))
|
.saturating_add(Weight::from_parts(0, 11_402))
|
||||||
.saturating_add(T::DbWeight::get().reads(10_u64))
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
.saturating_add(T::DbWeight::get().writes(7_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 para mocks y tests — `RocksDbWeight` directo, sin necesitar `T`.
|
||||||
impl WeightInfo for () {
|
impl WeightInfo for () {
|
||||||
fn submit_proposal() -> Weight {
|
fn submit_proposal() -> Weight {
|
||||||
Weight::from_parts(135_242_000, 0)
|
Weight::from_parts(137_796_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 11402))
|
.saturating_add(Weight::from_parts(0, 11_402))
|
||||||
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
}
|
}
|
||||||
fn cast_vote() -> Weight {
|
fn cast_vote() -> Weight {
|
||||||
Weight::from_parts(127_723_000, 0)
|
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().reads(10_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
}
|
}
|
||||||
fn finalize_proposal() -> Weight {
|
fn finalize_proposal() -> Weight {
|
||||||
Weight::from_parts(147_649_000, 0)
|
Weight::from_parts(159_519_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 6196))
|
.saturating_add(Weight::from_parts(0, 6_196))
|
||||||
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(7_u64))
|
.saturating_add(RocksDbWeight::get().writes(7_u64))
|
||||||
}
|
}
|
||||||
fn add_council_member() -> Weight {
|
fn add_council_member() -> Weight {
|
||||||
Weight::from_parts(39_278_000, 0)
|
Weight::from_parts(41_463_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3554))
|
.saturating_add(Weight::from_parts(0, 3_554))
|
||||||
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
||||||
}
|
}
|
||||||
fn remove_council_member() -> Weight {
|
fn remove_council_member() -> Weight {
|
||||||
Weight::from_parts(46_556_000, 0)
|
Weight::from_parts(48_648_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3554))
|
.saturating_add(Weight::from_parts(0, 3_554))
|
||||||
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
||||||
}
|
}
|
||||||
fn veto_proposal() -> Weight {
|
fn veto_proposal() -> Weight {
|
||||||
Weight::from_parts(269_483_000, 0)
|
Weight::from_parts(269_796_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 16416))
|
.saturating_add(Weight::from_parts(0, 16_416))
|
||||||
.saturating_add(RocksDbWeight::get().reads(24_u64))
|
.saturating_add(RocksDbWeight::get().reads(24_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(11_u64))
|
.saturating_add(RocksDbWeight::get().writes(11_u64))
|
||||||
}
|
}
|
||||||
fn mark_as_advisor() -> Weight {
|
fn mark_as_advisor() -> Weight {
|
||||||
Weight::from_parts(28_186_000, 0)
|
Weight::from_parts(32_593_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3513))
|
.saturating_add(Weight::from_parts(0, 3_513))
|
||||||
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
}
|
}
|
||||||
fn unmark_as_advisor() -> Weight {
|
fn unmark_as_advisor() -> Weight {
|
||||||
Weight::from_parts(34_333_000, 0)
|
Weight::from_parts(36_093_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3513))
|
.saturating_add(Weight::from_parts(0, 3_513))
|
||||||
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
}
|
}
|
||||||
fn override_council_veto() -> Weight {
|
fn override_council_veto() -> Weight {
|
||||||
Weight::from_parts(131_927_000, 0)
|
Weight::from_parts(161_114_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().reads(14_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
}
|
}
|
||||||
fn submit_emergency_proposal() -> Weight {
|
fn submit_emergency_proposal() -> Weight {
|
||||||
Weight::from_parts(177_131_000, 0)
|
Weight::from_parts(196_648_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 6132))
|
.saturating_add(Weight::from_parts(0, 6_132))
|
||||||
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
}
|
}
|
||||||
fn treasury_disbursement() -> Weight {
|
fn treasury_disbursement() -> Weight {
|
||||||
Weight::from_parts(144_130_000, 0)
|
Weight::from_parts(155_055_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 6196))
|
.saturating_add(Weight::from_parts(0, 6_196))
|
||||||
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||||
}
|
}
|
||||||
fn treasury_deposit() -> Weight {
|
fn treasury_deposit() -> Weight {
|
||||||
Weight::from_parts(99_778_000, 0)
|
Weight::from_parts(105_983_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3593))
|
.saturating_add(Weight::from_parts(0, 3_593))
|
||||||
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
}
|
}
|
||||||
fn endorse_emergency_proposal() -> Weight {
|
fn endorse_emergency_proposal() -> Weight {
|
||||||
Weight::from_parts(67_686_000, 0)
|
Weight::from_parts(84_593_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 6132))
|
.saturating_add(Weight::from_parts(0, 6_132))
|
||||||
.saturating_add(RocksDbWeight::get().reads(8_u64))
|
.saturating_add(RocksDbWeight::get().reads(8_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
}
|
}
|
||||||
fn unlock_vote_funds() -> Weight {
|
fn unlock_vote_funds() -> Weight {
|
||||||
Weight::from_parts(84_315_000, 0)
|
Weight::from_parts(112_148_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 5338))
|
.saturating_add(Weight::from_parts(0, 5_338))
|
||||||
.saturating_add(RocksDbWeight::get().reads(8_u64))
|
.saturating_add(RocksDbWeight::get().reads(8_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||||
}
|
}
|
||||||
fn uphold_council_veto() -> Weight {
|
fn uphold_council_veto() -> Weight {
|
||||||
Weight::from_parts(153_834_000, 0)
|
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().reads(14_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
}
|
}
|
||||||
fn finalize_override() -> Weight {
|
fn finalize_override() -> Weight {
|
||||||
Weight::from_parts(86_407_000, 0)
|
Weight::from_parts(89_463_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 3722))
|
.saturating_add(Weight::from_parts(0, 3_722))
|
||||||
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
}
|
}
|
||||||
fn submit_treasury_proposal() -> Weight {
|
fn submit_treasury_proposal() -> Weight {
|
||||||
Weight::from_parts(143_630_000, 0)
|
Weight::from_parts(145_629_000, 0)
|
||||||
.saturating_add(Weight::from_parts(0, 11402))
|
.saturating_add(Weight::from_parts(0, 11_402))
|
||||||
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
.saturating_add(RocksDbWeight::get().writes(7_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 {
|
impl origin_chain_provenance::Config for Runtime {
|
||||||
type RuntimeEvent = RuntimeEvent;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
// Weights INTERIM hand-derived DB-aware (cierra el DoS de proof_size=0 de los
|
// Pesos medidos en el banco de referencia (la Pi 5, certificados de Laurha): ver la
|
||||||
// placeholders). Regenerable vía `benchmark pallet` cuando aterrice HW/omni-bencher.
|
// cabecera de su weights.rs.
|
||||||
type WeightInfo = origin_chain_provenance::weights::SubstrateWeight<Runtime>;
|
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
|
/// — 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).
|
/// (jamás re-declarar el literal: un typo divergiría las cuentas).
|
||||||
type SubsidyPalletId = EmissionSubsidyPalletId;
|
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>;
|
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 {
|
impl origin_chain_agent_identity::Config for Runtime {
|
||||||
type RuntimeEvent = RuntimeEvent;
|
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>;
|
type WeightInfo = origin_chain_agent_identity::weights::SubstrateWeight<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -633,7 +635,8 @@ impl origin_chain_governance::Config for Runtime {
|
|||||||
type MinOverrideQuorum = DiezPorCientoDeLoQuePuedeVotar;
|
type MinOverrideQuorum = DiezPorCientoDeLoQuePuedeVotar;
|
||||||
type VoteQuorum = DiezPorCientoDeLoQuePuedeVotar;
|
type VoteQuorum = DiezPorCientoDeLoQuePuedeVotar;
|
||||||
type TreasuryPalletId = GovernanceTreasuryPalletId;
|
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>;
|
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.
|
// Reusa el MISMO vault de governance (og/gvtry) para el treasury.
|
||||||
type TreasuryPalletId = GovernanceTreasuryPalletId;
|
type TreasuryPalletId = GovernanceTreasuryPalletId;
|
||||||
type SubsidyPalletId = EmissionSubsidyPalletId;
|
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>;
|
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
|
/// 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`.
|
/// 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
|
/// **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
|
/// 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
|
/// 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"),
|
spec_name: alloc::borrow::Cow::Borrowed("origin-chain"),
|
||||||
impl_name: alloc::borrow::Cow::Borrowed("origin-chain-charon"),
|
impl_name: alloc::borrow::Cow::Borrowed("origin-chain-charon"),
|
||||||
authoring_version: 1,
|
authoring_version: 1,
|
||||||
spec_version: 19,
|
spec_version: 20,
|
||||||
impl_version: 1,
|
impl_version: 1,
|
||||||
apis: RUNTIME_API_VERSIONS,
|
apis: RUNTIME_API_VERSIONS,
|
||||||
transaction_version: 1,
|
transaction_version: 1,
|
||||||
@@ -1204,7 +1208,7 @@ mod tests {
|
|||||||
/// mismo commit en que la version subio a 12.
|
/// mismo commit en que la version subio a 12.
|
||||||
#[test]
|
#[test]
|
||||||
fn spec_version_vigente_y_transaction_version_intacta() {
|
fn spec_version_vigente_y_transaction_version_intacta() {
|
||||||
assert_eq!(RUNTIME_VERSION, 19);
|
assert_eq!(RUNTIME_VERSION, 20);
|
||||||
assert_eq!(TRANSACTION_VERSION, 1);
|
assert_eq!(TRANSACTION_VERSION, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,707 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
// Origin Chain — Pilar 4 · Charon
|
||||||
|
//
|
||||||
|
// ATENCION AL LEER ESTOS NUMEROS: un weight es una LATENCIA, y una latencia sin
|
||||||
|
// el hardware y el perfil de potencia que la produjeron no se puede reproducir.
|
||||||
|
// La cabecera dice HOSTNAME y CPU: creele a eso y a nada mas. Un weight medido
|
||||||
|
// en un portatil y cobrado en un Pi 5 es mispricing estructural, solo que
|
||||||
|
// 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…).
|
||||||
|
// 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).
|
||||||
|
|
||||||
|
//! Weights AUTOGENERADOS para `origin_chain_governance` — 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).
|
||||||
|
//!
|
||||||
|
//! GENERADO POR SUBSTRATE BENCHMARK CLI VERSION 51.0.0
|
||||||
|
//! FECHA: 2026-10-24, STEPS: `50`, REPEAT: `20`
|
||||||
|
//! HOSTNAME: `CyberDeckRP1`, CPU: `<UNKNOWN>`
|
||||||
|
//! WASM-EXECUTION: `Compiled`, DB CACHE: 1024
|
||||||
|
|
||||||
|
// Comando ejecutado:
|
||||||
|
// /home/davidherran/.cargo/bin/frame-omni-bencher
|
||||||
|
// v1
|
||||||
|
// benchmark
|
||||||
|
// pallet
|
||||||
|
// --runtime
|
||||||
|
// /home/davidherran/charon/bench/origin_chain_runtime_spec16_3cd1068_bench.compact.compressed.wasm
|
||||||
|
// --genesis-builder-preset
|
||||||
|
// development
|
||||||
|
// --pallet
|
||||||
|
// origin_chain_governance
|
||||||
|
// --extrinsic
|
||||||
|
//
|
||||||
|
// --steps
|
||||||
|
// 50
|
||||||
|
// --repeat
|
||||||
|
// 20
|
||||||
|
// --template
|
||||||
|
// /home/davidherran/charon/bench/origin-weights-template.hbs
|
||||||
|
// --header
|
||||||
|
// /home/davidherran/charon/bench/HEADER.txt
|
||||||
|
// --output
|
||||||
|
// /home/davidherran/laurha-work/banco/spec16-20261024-1631/r1/origin_chain_governance.rs
|
||||||
|
|
||||||
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||||
|
#![allow(unused_parens)]
|
||||||
|
#![allow(unused_imports)]
|
||||||
|
#![allow(missing_docs)]
|
||||||
|
|
||||||
|
use core::marker::PhantomData;
|
||||||
|
use frame_support::{traits::Get, weights::constants::RocksDbWeight, weights::Weight};
|
||||||
|
|
||||||
|
/// 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
|
||||||
|
|
||||||
|
pub trait WeightInfo {
|
||||||
|
/// Peso de `submit_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn submit_proposal() -> Weight;
|
||||||
|
/// Peso de `cast_vote` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn cast_vote() -> Weight;
|
||||||
|
/// Peso de `finalize_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn finalize_proposal() -> Weight;
|
||||||
|
/// Peso de `add_council_member` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn add_council_member() -> Weight;
|
||||||
|
/// Peso de `remove_council_member` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn remove_council_member() -> Weight;
|
||||||
|
/// Peso de `veto_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn veto_proposal() -> Weight;
|
||||||
|
/// Peso de `mark_as_advisor` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn mark_as_advisor() -> Weight;
|
||||||
|
/// Peso de `unmark_as_advisor` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn unmark_as_advisor() -> Weight;
|
||||||
|
/// Peso de `override_council_veto` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn override_council_veto() -> Weight;
|
||||||
|
/// Peso de `submit_emergency_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn submit_emergency_proposal() -> Weight;
|
||||||
|
/// Peso de `treasury_disbursement` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn treasury_disbursement() -> Weight;
|
||||||
|
/// Peso de `treasury_deposit` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn treasury_deposit() -> Weight;
|
||||||
|
/// Peso de `endorse_emergency_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn endorse_emergency_proposal() -> Weight;
|
||||||
|
/// Peso de `unlock_vote_funds` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn unlock_vote_funds() -> Weight;
|
||||||
|
/// Peso de `uphold_council_veto` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn uphold_council_veto() -> Weight;
|
||||||
|
/// Peso de `finalize_override` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn finalize_override() -> Weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Weights parametrizados por el `DbWeight` real del runtime.
|
||||||
|
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||||
|
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
fn submit_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `108`
|
||||||
|
// Estimado: `3722`
|
||||||
|
// Tiempo minimo de ejecucion: 116_074_000 picosegundos.
|
||||||
|
Weight::from_parts(122_075_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(7_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Votes` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Votes` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn cast_vote() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `2321`
|
||||||
|
// Estimado: `5338`
|
||||||
|
// Tiempo minimo de ejecucion: 103_445_000 picosegundos.
|
||||||
|
Weight::from_parts(127_723_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:2 w:2)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn finalize_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `615`
|
||||||
|
// Estimado: `6196`
|
||||||
|
// Tiempo minimo de ejecucion: 132_890_000 picosegundos.
|
||||||
|
Weight::from_parts(146_594_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(9_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn add_council_member() -> Weight {
|
||||||
|
// 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))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(4_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn remove_council_member() -> Weight {
|
||||||
|
// 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))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(4_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:5 w:0)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoVotes` (r:6 w:1)
|
||||||
|
/// Proof: `Governance::VetoVotes` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:2 w:2)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideQuorum` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::OverrideQuorum` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoCount` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::VetoCount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||||
|
fn veto_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `1441`
|
||||||
|
// Estimado: `16416`
|
||||||
|
// Tiempo minimo de ejecucion: 250_076_000 picosegundos.
|
||||||
|
Weight::from_parts(266_779_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 16416))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(21_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(11_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn mark_as_advisor() -> Weight {
|
||||||
|
// 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))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn unmark_as_advisor() -> Weight {
|
||||||
|
// 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))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideVotes` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::UpholdVotes` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::UpholdVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::OverrideStakeTotal` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
fn override_council_veto() -> Weight {
|
||||||
|
// 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))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(14_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::EmergencyEndorsements` (r:2 w:1)
|
||||||
|
/// Proof: `Governance::EmergencyEndorsements` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
fn submit_emergency_proposal() -> Weight {
|
||||||
|
// 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))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(11_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Disbursed` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Disbursed` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:2 w:2)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn treasury_disbursement() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `495`
|
||||||
|
// Estimado: `6196`
|
||||||
|
// Tiempo minimo de ejecucion: 126_964_000 picosegundos.
|
||||||
|
Weight::from_parts(138_038_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(9_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn treasury_deposit() -> Weight {
|
||||||
|
// 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))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::EmergencyEndorsements` (r:2 w:1)
|
||||||
|
/// Proof: `Governance::EmergencyEndorsements` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn endorse_emergency_proposal() -> Weight {
|
||||||
|
// 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))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(8_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn unlock_vote_funds() -> Weight {
|
||||||
|
// 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))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(8_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideVotes` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::UpholdVotes` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::UpholdVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::UpholdStakeTotal` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::UpholdStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
fn uphold_council_veto() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `2469`
|
||||||
|
// Estimado: `5338`
|
||||||
|
// Tiempo minimo de ejecucion: 128_686_000 picosegundos.
|
||||||
|
Weight::from_parts(153_834_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(14_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideStakeTotal` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::UpholdStakeTotal` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::UpholdStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideQuorum` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideQuorum` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn finalize_override() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `637`
|
||||||
|
// Estimado: `3722`
|
||||||
|
// Tiempo minimo de ejecucion: 73_297_000 picosegundos.
|
||||||
|
Weight::from_parts(78_037_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Impl para mocks y tests — `RocksDbWeight` directo, sin necesitar `T`.
|
||||||
|
impl WeightInfo for () {
|
||||||
|
fn submit_proposal() -> Weight {
|
||||||
|
Weight::from_parts(122_075_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(7_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
fn cast_vote() -> Weight {
|
||||||
|
Weight::from_parts(127_723_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn finalize_proposal() -> Weight {
|
||||||
|
Weight::from_parts(146_594_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(9_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn add_council_member() -> Weight {
|
||||||
|
Weight::from_parts(39_278_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3554))
|
||||||
|
.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))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
||||||
|
}
|
||||||
|
fn veto_proposal() -> Weight {
|
||||||
|
Weight::from_parts(266_779_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 16416))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(21_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))
|
||||||
|
.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))
|
||||||
|
.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))
|
||||||
|
.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))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn treasury_disbursement() -> Weight {
|
||||||
|
Weight::from_parts(138_038_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(9_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))
|
||||||
|
.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))
|
||||||
|
.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))
|
||||||
|
.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(RocksDbWeight::get().reads(14_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn finalize_override() -> Weight {
|
||||||
|
Weight::from_parts(78_037_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod guard {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
/// NINGUN EXTRINSIC PUEDE DECLARAR `proof_size = 0`.
|
||||||
|
///
|
||||||
|
/// El `proof_size` es lo que el block-builder usa para no pasarse del limite
|
||||||
|
/// de PoV. Un cero no dice «este extrinsic no toca storage»: dice «miento
|
||||||
|
/// sobre lo que va a ocupar la prueba», y con eso entra en un bloque mucho
|
||||||
|
/// mas de lo que cabe.
|
||||||
|
///
|
||||||
|
/// El test nace de un error propio y de la peor clase: la cabecera de los
|
||||||
|
/// weights interinos afirmaba que `T::DbWeight` «puebla tanto ref_time como
|
||||||
|
/// proof_size … cerrando el hueco». Es falso y se comprueba en la fuente —
|
||||||
|
/// `sp_weights::RuntimeDbWeight` solo tiene los campos `read` y `write`, y
|
||||||
|
/// `reads(r)` devuelve `Weight::from_parts(read * r, 0)`. Los interinos
|
||||||
|
/// arreglaron reads/writes y dejaron el proof_size donde estaba: en 0. La
|
||||||
|
/// afirmacion de haberlo cerrado sobrevivio mas de un mes sin que ninguna
|
||||||
|
/// lectura la desmintiera; la desmintio una medicion.
|
||||||
|
///
|
||||||
|
/// Esta lista la GENERA la plantilla a partir de los benchmarks reales, asi
|
||||||
|
/// que no puede quedarse corta cuando se anada un extrinsic nuevo.
|
||||||
|
#[test]
|
||||||
|
fn ningun_weight_declara_proof_size_cero() {
|
||||||
|
let casos: &[(&str, Weight)] = &[
|
||||||
|
("submit_proposal", <() as WeightInfo>::submit_proposal()),
|
||||||
|
("cast_vote", <() as WeightInfo>::cast_vote()),
|
||||||
|
("finalize_proposal", <() as WeightInfo>::finalize_proposal()),
|
||||||
|
("add_council_member", <() as WeightInfo>::add_council_member()),
|
||||||
|
("remove_council_member", <() as WeightInfo>::remove_council_member()),
|
||||||
|
("veto_proposal", <() as WeightInfo>::veto_proposal()),
|
||||||
|
("mark_as_advisor", <() as WeightInfo>::mark_as_advisor()),
|
||||||
|
("unmark_as_advisor", <() as WeightInfo>::unmark_as_advisor()),
|
||||||
|
("override_council_veto", <() as WeightInfo>::override_council_veto()),
|
||||||
|
("submit_emergency_proposal", <() as WeightInfo>::submit_emergency_proposal()),
|
||||||
|
("treasury_disbursement", <() as WeightInfo>::treasury_disbursement()),
|
||||||
|
("treasury_deposit", <() as WeightInfo>::treasury_deposit()),
|
||||||
|
("endorse_emergency_proposal", <() as WeightInfo>::endorse_emergency_proposal()),
|
||||||
|
("unlock_vote_funds", <() as WeightInfo>::unlock_vote_funds()),
|
||||||
|
("uphold_council_veto", <() as WeightInfo>::uphold_council_veto()),
|
||||||
|
("finalize_override", <() as WeightInfo>::finalize_override()),
|
||||||
|
];
|
||||||
|
for (nombre, w) in casos {
|
||||||
|
assert!(
|
||||||
|
w.proof_size() > 0,
|
||||||
|
"`{nombre}` declara proof_size = 0: miente al block-builder sobre el peso PoV"
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
w.ref_time() > 0,
|
||||||
|
"`{nombre}` declara ref_time = 0: el extrinsic saldria gratis"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,740 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
// Origin Chain — Pilar 4 · Charon
|
||||||
|
//
|
||||||
|
// ATENCION AL LEER ESTOS NUMEROS: un weight es una LATENCIA, y una latencia sin
|
||||||
|
// el hardware y el perfil de potencia que la produjeron no se puede reproducir.
|
||||||
|
// La cabecera dice HOSTNAME y CPU: creele a eso y a nada mas. Un weight medido
|
||||||
|
// en un portatil y cobrado en un Pi 5 es mispricing estructural, solo que
|
||||||
|
// invisible. Los numeros CANONICOS de mainnet salen del banco de referencia
|
||||||
|
// (Pi 5, governor y aislamiento declarados), no de la maquina de quien compila.
|
||||||
|
|
||||||
|
//! Weights AUTOGENERADOS para `origin_chain_governance` — 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).
|
||||||
|
//!
|
||||||
|
//! GENERADO POR SUBSTRATE BENCHMARK CLI VERSION 51.0.0
|
||||||
|
//! FECHA: 2026-10-29, STEPS: `50`, REPEAT: `20`
|
||||||
|
//! HOSTNAME: `CyberDeckRP1`, CPU: `<UNKNOWN>`
|
||||||
|
//! WASM-EXECUTION: `Compiled`, DB CACHE: 1024
|
||||||
|
|
||||||
|
// Comando ejecutado:
|
||||||
|
// /home/davidherran/.cargo/bin/frame-omni-bencher
|
||||||
|
// v1
|
||||||
|
// benchmark
|
||||||
|
// pallet
|
||||||
|
// --runtime
|
||||||
|
// /home/davidherran/charon/bench-spec18/v2/origin_chain_runtime_spec18_rv17v2_bench.compact.compressed.wasm
|
||||||
|
// --genesis-builder-preset
|
||||||
|
// development
|
||||||
|
// --pallet
|
||||||
|
// origin_chain_governance
|
||||||
|
// --extrinsic
|
||||||
|
//
|
||||||
|
// --steps
|
||||||
|
// 50
|
||||||
|
// --repeat
|
||||||
|
// 20
|
||||||
|
// --template
|
||||||
|
// /home/davidherran/charon/bench-spec18/origin-weights-template.hbs
|
||||||
|
// --header
|
||||||
|
// /home/davidherran/charon/bench-spec18/HEADER.txt
|
||||||
|
// --output
|
||||||
|
// /home/davidherran/laurha-work/banco/spec18-20261029-0841/r1/origin_chain_governance.rs
|
||||||
|
|
||||||
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||||
|
#![allow(unused_parens)]
|
||||||
|
#![allow(unused_imports)]
|
||||||
|
#![allow(missing_docs)]
|
||||||
|
|
||||||
|
use core::marker::PhantomData;
|
||||||
|
use frame_support::{traits::Get, weights::constants::RocksDbWeight, weights::Weight};
|
||||||
|
|
||||||
|
/// 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]): bbc794133ab2 f96440f10774 b4e827253b2f afcc7af88dd0 3bf5392b546a
|
||||||
|
|
||||||
|
pub trait WeightInfo {
|
||||||
|
/// Peso de `submit_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn submit_proposal() -> Weight;
|
||||||
|
/// Peso de `submit_treasury_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn submit_treasury_proposal() -> Weight;
|
||||||
|
/// Peso de `cast_vote` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn cast_vote() -> Weight;
|
||||||
|
/// Peso de `finalize_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn finalize_proposal() -> Weight;
|
||||||
|
/// Peso de `add_council_member` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn add_council_member() -> Weight;
|
||||||
|
/// Peso de `remove_council_member` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn remove_council_member() -> Weight;
|
||||||
|
/// Peso de `veto_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn veto_proposal() -> Weight;
|
||||||
|
/// Peso de `mark_as_advisor` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn mark_as_advisor() -> Weight;
|
||||||
|
/// Peso de `unmark_as_advisor` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn unmark_as_advisor() -> Weight;
|
||||||
|
/// Peso de `override_council_veto` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn override_council_veto() -> Weight;
|
||||||
|
/// Peso de `submit_emergency_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn submit_emergency_proposal() -> Weight;
|
||||||
|
/// Peso de `treasury_disbursement` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn treasury_disbursement() -> Weight;
|
||||||
|
/// Peso de `treasury_deposit` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn treasury_deposit() -> Weight;
|
||||||
|
/// Peso de `endorse_emergency_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn endorse_emergency_proposal() -> Weight;
|
||||||
|
/// Peso de `unlock_vote_funds` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn unlock_vote_funds() -> Weight;
|
||||||
|
/// Peso de `uphold_council_veto` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn uphold_council_veto() -> Weight;
|
||||||
|
/// Peso de `finalize_override` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn finalize_override() -> Weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Weights parametrizados por el `DbWeight` real del runtime.
|
||||||
|
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||||
|
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::VoteQuorumOf` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::VoteQuorumOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
fn submit_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `108`
|
||||||
|
// Estimado: `3722`
|
||||||
|
// Tiempo minimo de ejecucion: 120_613_000 picosegundos.
|
||||||
|
Weight::from_parts(122_817_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(7_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::VoteQuorumOf` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::VoteQuorumOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::TreasuryActions` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::TreasuryActions` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
fn submit_treasury_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `108`
|
||||||
|
// Estimado: `3722`
|
||||||
|
// Tiempo minimo de ejecucion: 128_076_000 picosegundos.
|
||||||
|
Weight::from_parts(130_428_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(7_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(7_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Votes` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Votes` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn cast_vote() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `2321`
|
||||||
|
// Estimado: `5338`
|
||||||
|
// Tiempo minimo de ejecucion: 103_483_000 picosegundos.
|
||||||
|
Weight::from_parts(116_428_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteQuorumOf` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteQuorumOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:2 w:2)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn finalize_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `701`
|
||||||
|
// Estimado: `6196`
|
||||||
|
// Tiempo minimo de ejecucion: 144_724_000 picosegundos.
|
||||||
|
Weight::from_parts(154_595_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(7_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn add_council_member() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `26`
|
||||||
|
// Estimado: `3554`
|
||||||
|
// Tiempo minimo de ejecucion: 30_778_000 picosegundos.
|
||||||
|
Weight::from_parts(35_223_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3554))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(4_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn remove_council_member() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `154`
|
||||||
|
// Estimado: `3554`
|
||||||
|
// Tiempo minimo de ejecucion: 33_982_000 picosegundos.
|
||||||
|
Weight::from_parts(38_575_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3554))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(4_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:5 w:0)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoVotes` (r:6 w:1)
|
||||||
|
/// Proof: `Governance::VetoVotes` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:2 w:2)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideQuorum` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::OverrideQuorum` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoCount` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::VetoCount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||||
|
fn veto_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `1441`
|
||||||
|
// Estimado: `16416`
|
||||||
|
// Tiempo minimo de ejecucion: 250_911_000 picosegundos.
|
||||||
|
Weight::from_parts(260_227_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 16416))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(21_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(11_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn mark_as_advisor() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `26`
|
||||||
|
// Estimado: `3513`
|
||||||
|
// Tiempo minimo de ejecucion: 26_815_000 picosegundos.
|
||||||
|
Weight::from_parts(32_593_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3513))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn unmark_as_advisor() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `99`
|
||||||
|
// Estimado: `3513`
|
||||||
|
// Tiempo minimo de ejecucion: 30_611_000 picosegundos.
|
||||||
|
Weight::from_parts(36_093_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3513))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideVotes` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::UpholdVotes` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::UpholdVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::OverrideStakeTotal` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
fn override_council_veto() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `2469`
|
||||||
|
// Estimado: `5338`
|
||||||
|
// Tiempo minimo de ejecucion: 129_428_000 picosegundos.
|
||||||
|
Weight::from_parts(161_114_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(14_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::EmergencyEndorsements` (r:2 w:1)
|
||||||
|
/// Proof: `Governance::EmergencyEndorsements` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
fn submit_emergency_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `354`
|
||||||
|
// Estimado: `6132`
|
||||||
|
// Tiempo minimo de ejecucion: 156_633_000 picosegundos.
|
||||||
|
Weight::from_parts(162_558_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6132))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(11_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Disbursed` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Disbursed` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::TreasuryActions` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::TreasuryActions` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:2 w:2)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn treasury_disbursement() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `615`
|
||||||
|
// Estimado: `6196`
|
||||||
|
// Tiempo minimo de ejecucion: 133_613_000 picosegundos.
|
||||||
|
Weight::from_parts(136_095_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn treasury_deposit() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `102`
|
||||||
|
// Estimado: `3593`
|
||||||
|
// Tiempo minimo de ejecucion: 96_483_000 picosegundos.
|
||||||
|
Weight::from_parts(105_983_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3593))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::EmergencyEndorsements` (r:2 w:1)
|
||||||
|
/// Proof: `Governance::EmergencyEndorsements` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn endorse_emergency_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `154`
|
||||||
|
// Estimado: `6132`
|
||||||
|
// Tiempo minimo de ejecucion: 56_057_000 picosegundos.
|
||||||
|
Weight::from_parts(71_798_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6132))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(8_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn unlock_vote_funds() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `2198`
|
||||||
|
// Estimado: `5338`
|
||||||
|
// Tiempo minimo de ejecucion: 82_261_000 picosegundos.
|
||||||
|
Weight::from_parts(95_891_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(8_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideVotes` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::UpholdVotes` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::UpholdVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::UpholdStakeTotal` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::UpholdStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
fn uphold_council_veto() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `2469`
|
||||||
|
// Estimado: `5338`
|
||||||
|
// Tiempo minimo de ejecucion: 128_410_000 picosegundos.
|
||||||
|
Weight::from_parts(131_706_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(14_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideStakeTotal` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::UpholdStakeTotal` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::UpholdStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideQuorum` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideQuorum` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteQuorumOf` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteQuorumOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn finalize_override() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `723`
|
||||||
|
// Estimado: `3722`
|
||||||
|
// Tiempo minimo de ejecucion: 84_279_000 picosegundos.
|
||||||
|
Weight::from_parts(88_261_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(11_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Impl para mocks y tests — `RocksDbWeight` directo, sin necesitar `T`.
|
||||||
|
impl WeightInfo for () {
|
||||||
|
fn submit_proposal() -> Weight {
|
||||||
|
Weight::from_parts(122_817_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(7_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn submit_treasury_proposal() -> Weight {
|
||||||
|
Weight::from_parts(130_428_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(7_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(7_u64))
|
||||||
|
}
|
||||||
|
fn cast_vote() -> Weight {
|
||||||
|
Weight::from_parts(116_428_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn finalize_proposal() -> Weight {
|
||||||
|
Weight::from_parts(154_595_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(7_u64))
|
||||||
|
}
|
||||||
|
fn add_council_member() -> Weight {
|
||||||
|
Weight::from_parts(35_223_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3554))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
||||||
|
}
|
||||||
|
fn remove_council_member() -> Weight {
|
||||||
|
Weight::from_parts(38_575_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3554))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
||||||
|
}
|
||||||
|
fn veto_proposal() -> Weight {
|
||||||
|
Weight::from_parts(260_227_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 16416))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(21_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(11_u64))
|
||||||
|
}
|
||||||
|
fn mark_as_advisor() -> Weight {
|
||||||
|
Weight::from_parts(32_593_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3513))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
fn unmark_as_advisor() -> Weight {
|
||||||
|
Weight::from_parts(36_093_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3513))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
fn override_council_veto() -> Weight {
|
||||||
|
Weight::from_parts(161_114_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(14_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn submit_emergency_proposal() -> Weight {
|
||||||
|
Weight::from_parts(162_558_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6132))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn treasury_disbursement() -> Weight {
|
||||||
|
Weight::from_parts(136_095_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
fn treasury_deposit() -> Weight {
|
||||||
|
Weight::from_parts(105_983_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3593))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
fn endorse_emergency_proposal() -> Weight {
|
||||||
|
Weight::from_parts(71_798_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6132))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(8_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
fn unlock_vote_funds() -> Weight {
|
||||||
|
Weight::from_parts(95_891_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(8_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
fn uphold_council_veto() -> Weight {
|
||||||
|
Weight::from_parts(131_706_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(14_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn finalize_override() -> Weight {
|
||||||
|
Weight::from_parts(88_261_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod guard {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
/// NINGUN EXTRINSIC PUEDE DECLARAR `proof_size = 0`.
|
||||||
|
///
|
||||||
|
/// El `proof_size` es lo que el block-builder usa para no pasarse del limite
|
||||||
|
/// de PoV. Un cero no dice «este extrinsic no toca storage»: dice «miento
|
||||||
|
/// sobre lo que va a ocupar la prueba», y con eso entra en un bloque mucho
|
||||||
|
/// mas de lo que cabe.
|
||||||
|
///
|
||||||
|
/// El test nace de un error propio y de la peor clase: la cabecera de los
|
||||||
|
/// weights interinos afirmaba que `T::DbWeight` «puebla tanto ref_time como
|
||||||
|
/// proof_size … cerrando el hueco». Es falso y se comprueba en la fuente —
|
||||||
|
/// `sp_weights::RuntimeDbWeight` solo tiene los campos `read` y `write`, y
|
||||||
|
/// `reads(r)` devuelve `Weight::from_parts(read * r, 0)`. Los interinos
|
||||||
|
/// arreglaron reads/writes y dejaron el proof_size donde estaba: en 0. La
|
||||||
|
/// afirmacion de haberlo cerrado sobrevivio mas de un mes sin que ninguna
|
||||||
|
/// lectura la desmintiera; la desmintio una medicion.
|
||||||
|
///
|
||||||
|
/// Esta lista la GENERA la plantilla a partir de los benchmarks reales, asi
|
||||||
|
/// que no puede quedarse corta cuando se anada un extrinsic nuevo.
|
||||||
|
#[test]
|
||||||
|
fn ningun_weight_declara_proof_size_cero() {
|
||||||
|
let casos: &[(&str, Weight)] = &[
|
||||||
|
("submit_proposal", <() as WeightInfo>::submit_proposal()),
|
||||||
|
("submit_treasury_proposal", <() as WeightInfo>::submit_treasury_proposal()),
|
||||||
|
("cast_vote", <() as WeightInfo>::cast_vote()),
|
||||||
|
("finalize_proposal", <() as WeightInfo>::finalize_proposal()),
|
||||||
|
("add_council_member", <() as WeightInfo>::add_council_member()),
|
||||||
|
("remove_council_member", <() as WeightInfo>::remove_council_member()),
|
||||||
|
("veto_proposal", <() as WeightInfo>::veto_proposal()),
|
||||||
|
("mark_as_advisor", <() as WeightInfo>::mark_as_advisor()),
|
||||||
|
("unmark_as_advisor", <() as WeightInfo>::unmark_as_advisor()),
|
||||||
|
("override_council_veto", <() as WeightInfo>::override_council_veto()),
|
||||||
|
("submit_emergency_proposal", <() as WeightInfo>::submit_emergency_proposal()),
|
||||||
|
("treasury_disbursement", <() as WeightInfo>::treasury_disbursement()),
|
||||||
|
("treasury_deposit", <() as WeightInfo>::treasury_deposit()),
|
||||||
|
("endorse_emergency_proposal", <() as WeightInfo>::endorse_emergency_proposal()),
|
||||||
|
("unlock_vote_funds", <() as WeightInfo>::unlock_vote_funds()),
|
||||||
|
("uphold_council_veto", <() as WeightInfo>::uphold_council_veto()),
|
||||||
|
("finalize_override", <() as WeightInfo>::finalize_override()),
|
||||||
|
];
|
||||||
|
for (nombre, w) in casos {
|
||||||
|
assert!(
|
||||||
|
w.proof_size() > 0,
|
||||||
|
"`{nombre}` declara proof_size = 0: miente al block-builder sobre el peso PoV"
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
w.ref_time() > 0,
|
||||||
|
"`{nombre}` declara ref_time = 0: el extrinsic saldria gratis"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,740 @@
|
|||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
// Origin Chain — Pilar 4 · Charon
|
||||||
|
//
|
||||||
|
// ATENCION AL LEER ESTOS NUMEROS: un weight es una LATENCIA, y una latencia sin
|
||||||
|
// el hardware y el perfil de potencia que la produjeron no se puede reproducir.
|
||||||
|
// La cabecera dice HOSTNAME y CPU: creele a eso y a nada mas. Un weight medido
|
||||||
|
// en un portatil y cobrado en un Pi 5 es mispricing estructural, solo que
|
||||||
|
// invisible. Los numeros CANONICOS de mainnet salen del banco de referencia
|
||||||
|
// (Pi 5, governor y aislamiento declarados), no de la maquina de quien compila.
|
||||||
|
|
||||||
|
//! Weights AUTOGENERADOS para `origin_chain_governance` — 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).
|
||||||
|
//!
|
||||||
|
//! GENERADO POR SUBSTRATE BENCHMARK CLI VERSION 51.0.0
|
||||||
|
//! FECHA: 2026-11-02, STEPS: `50`, REPEAT: `20`
|
||||||
|
//! HOSTNAME: `CyberDeckRP1`, CPU: `<UNKNOWN>`
|
||||||
|
//! WASM-EXECUTION: `Compiled`, DB CACHE: 1024
|
||||||
|
|
||||||
|
// Comando ejecutado:
|
||||||
|
// /home/davidherran/.cargo/bin/frame-omni-bencher
|
||||||
|
// v1
|
||||||
|
// benchmark
|
||||||
|
// pallet
|
||||||
|
// --runtime
|
||||||
|
// /home/davidherran/charon/bench-spec19/v2/origin_chain_runtime_spec19v2_bench.compact.compressed.wasm
|
||||||
|
// --genesis-builder-preset
|
||||||
|
// development
|
||||||
|
// --pallet
|
||||||
|
// origin_chain_governance
|
||||||
|
// --extrinsic
|
||||||
|
//
|
||||||
|
// --steps
|
||||||
|
// 50
|
||||||
|
// --repeat
|
||||||
|
// 20
|
||||||
|
// --template
|
||||||
|
// /home/davidherran/charon/bench-spec19/origin-weights-template.hbs
|
||||||
|
// --header
|
||||||
|
// /home/davidherran/charon/bench-spec19/HEADER.txt
|
||||||
|
// --output
|
||||||
|
// /home/davidherran/laurha-work/banco/spec19-20261102-1215/r1/origin_chain_governance.rs
|
||||||
|
|
||||||
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||||
|
#![allow(unused_parens)]
|
||||||
|
#![allow(unused_imports)]
|
||||||
|
#![allow(missing_docs)]
|
||||||
|
|
||||||
|
use core::marker::PhantomData;
|
||||||
|
use frame_support::{traits::Get, weights::constants::RocksDbWeight, weights::Weight};
|
||||||
|
|
||||||
|
/// 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]): 8f7f2c0acb79 2955c098ea87 26d4fb8bdf5f b6e9641761cc 5d997062fde6
|
||||||
|
|
||||||
|
pub trait WeightInfo {
|
||||||
|
/// Peso de `submit_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn submit_proposal() -> Weight;
|
||||||
|
/// Peso de `submit_treasury_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn submit_treasury_proposal() -> Weight;
|
||||||
|
/// Peso de `cast_vote` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn cast_vote() -> Weight;
|
||||||
|
/// Peso de `finalize_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn finalize_proposal() -> Weight;
|
||||||
|
/// Peso de `add_council_member` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn add_council_member() -> Weight;
|
||||||
|
/// Peso de `remove_council_member` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn remove_council_member() -> Weight;
|
||||||
|
/// Peso de `veto_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn veto_proposal() -> Weight;
|
||||||
|
/// Peso de `mark_as_advisor` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn mark_as_advisor() -> Weight;
|
||||||
|
/// Peso de `unmark_as_advisor` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn unmark_as_advisor() -> Weight;
|
||||||
|
/// Peso de `override_council_veto` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn override_council_veto() -> Weight;
|
||||||
|
/// Peso de `submit_emergency_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn submit_emergency_proposal() -> Weight;
|
||||||
|
/// Peso de `treasury_disbursement` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn treasury_disbursement() -> Weight;
|
||||||
|
/// Peso de `treasury_deposit` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn treasury_deposit() -> Weight;
|
||||||
|
/// Peso de `endorse_emergency_proposal` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn endorse_emergency_proposal() -> Weight;
|
||||||
|
/// Peso de `unlock_vote_funds` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn unlock_vote_funds() -> Weight;
|
||||||
|
/// Peso de `uphold_council_veto` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn uphold_council_veto() -> Weight;
|
||||||
|
/// Peso de `finalize_override` — MEDIDO sobre el WASM, no estimado a mano.
|
||||||
|
fn finalize_override() -> Weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Weights parametrizados por el `DbWeight` real del runtime.
|
||||||
|
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||||
|
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:4 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::VoteQuorumOf` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::VoteQuorumOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
fn submit_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `108`
|
||||||
|
// Estimado: `11402`
|
||||||
|
// Tiempo minimo de ejecucion: 134_203_000 picosegundos.
|
||||||
|
Weight::from_parts(137_796_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 11402))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:4 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::VoteQuorumOf` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::VoteQuorumOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::TreasuryActions` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::TreasuryActions` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
fn submit_treasury_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `108`
|
||||||
|
// Estimado: `11402`
|
||||||
|
// Tiempo minimo de ejecucion: 141_907_000 picosegundos.
|
||||||
|
Weight::from_parts(145_629_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 11402))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(7_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Votes` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Votes` (`max_values`: None, `max_size`: Some(97), added: 2572, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn cast_vote() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `2321`
|
||||||
|
// Estimado: `5338`
|
||||||
|
// Tiempo minimo de ejecucion: 103_963_000 picosegundos.
|
||||||
|
Weight::from_parts(106_612_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteQuorumOf` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteQuorumOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:2 w:2)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn finalize_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `701`
|
||||||
|
// Estimado: `6196`
|
||||||
|
// Tiempo minimo de ejecucion: 145_666_000 picosegundos.
|
||||||
|
Weight::from_parts(159_519_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(7_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn add_council_member() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `26`
|
||||||
|
// Estimado: `3554`
|
||||||
|
// Tiempo minimo de ejecucion: 30_888_000 picosegundos.
|
||||||
|
Weight::from_parts(41_463_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3554))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(4_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn remove_council_member() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `154`
|
||||||
|
// Estimado: `3554`
|
||||||
|
// Tiempo minimo de ejecucion: 34_704_000 picosegundos.
|
||||||
|
Weight::from_parts(48_648_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3554))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(4_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:5 w:0)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoVotes` (r:6 w:1)
|
||||||
|
/// Proof: `Governance::VetoVotes` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:5 w:2)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideQuorum` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::OverrideQuorum` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoCount` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::VetoCount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||||
|
fn veto_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `1441`
|
||||||
|
// Estimado: `16416`
|
||||||
|
// Tiempo minimo de ejecucion: 264_203_000 picosegundos.
|
||||||
|
Weight::from_parts(269_796_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 16416))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(24_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(11_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn mark_as_advisor() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `26`
|
||||||
|
// Estimado: `3513`
|
||||||
|
// Tiempo minimo de ejecucion: 27_296_000 picosegundos.
|
||||||
|
Weight::from_parts(28_629_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3513))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn unmark_as_advisor() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `99`
|
||||||
|
// Estimado: `3513`
|
||||||
|
// Tiempo minimo de ejecucion: 31_222_000 picosegundos.
|
||||||
|
Weight::from_parts(32_111_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3513))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideVotes` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::UpholdVotes` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::UpholdVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::OverrideStakeTotal` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
fn override_council_veto() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `2469`
|
||||||
|
// Estimado: `5338`
|
||||||
|
// Tiempo minimo de ejecucion: 129_537_000 picosegundos.
|
||||||
|
Weight::from_parts(159_463_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(14_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::EmergencyEndorsements` (r:2 w:1)
|
||||||
|
/// Proof: `Governance::EmergencyEndorsements` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::ProposalBond` (r:0 w:1)
|
||||||
|
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
fn submit_emergency_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `354`
|
||||||
|
// Estimado: `6132`
|
||||||
|
// Tiempo minimo de ejecucion: 157_852_000 picosegundos.
|
||||||
|
Weight::from_parts(196_648_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6132))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(11_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::Disbursed` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Disbursed` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::TreasuryActions` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::TreasuryActions` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:2 w:2)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn treasury_disbursement() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `615`
|
||||||
|
// Estimado: `6196`
|
||||||
|
// Tiempo minimo de ejecucion: 135_741_000 picosegundos.
|
||||||
|
Weight::from_parts(155_055_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Balances::TotalIssuance` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::TotalIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn treasury_deposit() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `102`
|
||||||
|
// Estimado: `3593`
|
||||||
|
// Tiempo minimo de ejecucion: 96_908_000 picosegundos.
|
||||||
|
Weight::from_parts(102_611_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3593))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Council` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Council` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::EmergencyEndorsements` (r:2 w:1)
|
||||||
|
/// Proof: `Governance::EmergencyEndorsements` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::CouncilSize` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::CouncilSize` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn endorse_emergency_proposal() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `154`
|
||||||
|
// Estimado: `6132`
|
||||||
|
// Tiempo minimo de ejecucion: 56_870_000 picosegundos.
|
||||||
|
Weight::from_parts(84_593_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6132))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(8_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Account` (r:1 w:1)
|
||||||
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn unlock_vote_funds() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `2198`
|
||||||
|
// Estimado: `5338`
|
||||||
|
// Tiempo minimo de ejecucion: 82_500_000 picosegundos.
|
||||||
|
Weight::from_parts(112_148_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(8_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::AdvisorFlags` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::AdvisorFlags` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideVotes` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::UpholdVotes` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::UpholdVotes` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteLocks` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteLocks` (`max_values`: None, `max_size`: Some(1873), added: 4348, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Freezes` (r:1 w:1)
|
||||||
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Balances::Locks` (r:1 w:0)
|
||||||
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
/// Storage: `Governance::UpholdStakeTotal` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::UpholdStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
fn uphold_council_veto() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `2469`
|
||||||
|
// Estimado: `5338`
|
||||||
|
// Tiempo minimo de ejecucion: 129_630_000 picosegundos.
|
||||||
|
Weight::from_parts(147_018_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(14_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
/// Storage: `Governance::Proposals` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::Proposals` (`max_values`: None, `max_size`: Some(257), added: 2732, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VetoRejected` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::VetoRejected` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideDeadline` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideDeadline` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Number` (r:1 w:0)
|
||||||
|
/// Proof: `System::Number` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideStakeTotal` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::OverrideStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::UpholdStakeTotal` (r:1 w:0)
|
||||||
|
/// Proof: `Governance::UpholdStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::OverrideQuorum` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::OverrideQuorum` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `Governance::VoteQuorumOf` (r:1 w:1)
|
||||||
|
/// Proof: `Governance::VoteQuorumOf` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::ExecutionPhase` (r:1 w:0)
|
||||||
|
/// Proof: `System::ExecutionPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::EventCount` (r:1 w:1)
|
||||||
|
/// Proof: `System::EventCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
|
||||||
|
/// Storage: `System::Events` (r:1 w:1)
|
||||||
|
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||||
|
fn finalize_override() -> Weight {
|
||||||
|
// Proof size en bytes:
|
||||||
|
// Medido: `723`
|
||||||
|
// Estimado: `3722`
|
||||||
|
// Tiempo minimo de ejecucion: 85_574_000 picosegundos.
|
||||||
|
Weight::from_parts(89_463_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(11_u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Impl para mocks y tests — `RocksDbWeight` directo, sin necesitar `T`.
|
||||||
|
impl WeightInfo for () {
|
||||||
|
fn submit_proposal() -> Weight {
|
||||||
|
Weight::from_parts(137_796_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 11402))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn submit_treasury_proposal() -> Weight {
|
||||||
|
Weight::from_parts(145_629_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 11402))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(7_u64))
|
||||||
|
}
|
||||||
|
fn cast_vote() -> Weight {
|
||||||
|
Weight::from_parts(106_612_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn finalize_proposal() -> Weight {
|
||||||
|
Weight::from_parts(159_519_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(7_u64))
|
||||||
|
}
|
||||||
|
fn add_council_member() -> Weight {
|
||||||
|
Weight::from_parts(41_463_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3554))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
||||||
|
}
|
||||||
|
fn remove_council_member() -> Weight {
|
||||||
|
Weight::from_parts(48_648_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3554))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
||||||
|
}
|
||||||
|
fn veto_proposal() -> Weight {
|
||||||
|
Weight::from_parts(269_796_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 16416))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(24_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(11_u64))
|
||||||
|
}
|
||||||
|
fn mark_as_advisor() -> Weight {
|
||||||
|
Weight::from_parts(28_629_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3513))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
fn unmark_as_advisor() -> Weight {
|
||||||
|
Weight::from_parts(32_111_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3513))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
fn override_council_veto() -> Weight {
|
||||||
|
Weight::from_parts(159_463_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(14_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn submit_emergency_proposal() -> Weight {
|
||||||
|
Weight::from_parts(196_648_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6132))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn treasury_disbursement() -> Weight {
|
||||||
|
Weight::from_parts(155_055_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6196))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(10_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
fn treasury_deposit() -> Weight {
|
||||||
|
Weight::from_parts(102_611_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3593))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
fn endorse_emergency_proposal() -> Weight {
|
||||||
|
Weight::from_parts(84_593_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 6132))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(8_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||||
|
}
|
||||||
|
fn unlock_vote_funds() -> Weight {
|
||||||
|
Weight::from_parts(112_148_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(8_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||||
|
}
|
||||||
|
fn uphold_council_veto() -> Weight {
|
||||||
|
Weight::from_parts(147_018_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 5338))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(14_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
fn finalize_override() -> Weight {
|
||||||
|
Weight::from_parts(89_463_000, 0)
|
||||||
|
.saturating_add(Weight::from_parts(0, 3722))
|
||||||
|
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
||||||
|
.saturating_add(RocksDbWeight::get().writes(6_u64))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod guard {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
/// NINGUN EXTRINSIC PUEDE DECLARAR `proof_size = 0`.
|
||||||
|
///
|
||||||
|
/// El `proof_size` es lo que el block-builder usa para no pasarse del limite
|
||||||
|
/// de PoV. Un cero no dice «este extrinsic no toca storage»: dice «miento
|
||||||
|
/// sobre lo que va a ocupar la prueba», y con eso entra en un bloque mucho
|
||||||
|
/// mas de lo que cabe.
|
||||||
|
///
|
||||||
|
/// El test nace de un error propio y de la peor clase: la cabecera de los
|
||||||
|
/// weights interinos afirmaba que `T::DbWeight` «puebla tanto ref_time como
|
||||||
|
/// proof_size … cerrando el hueco». Es falso y se comprueba en la fuente —
|
||||||
|
/// `sp_weights::RuntimeDbWeight` solo tiene los campos `read` y `write`, y
|
||||||
|
/// `reads(r)` devuelve `Weight::from_parts(read * r, 0)`. Los interinos
|
||||||
|
/// arreglaron reads/writes y dejaron el proof_size donde estaba: en 0. La
|
||||||
|
/// afirmacion de haberlo cerrado sobrevivio mas de un mes sin que ninguna
|
||||||
|
/// lectura la desmintiera; la desmintio una medicion.
|
||||||
|
///
|
||||||
|
/// Esta lista la GENERA la plantilla a partir de los benchmarks reales, asi
|
||||||
|
/// que no puede quedarse corta cuando se anada un extrinsic nuevo.
|
||||||
|
#[test]
|
||||||
|
fn ningun_weight_declara_proof_size_cero() {
|
||||||
|
let casos: &[(&str, Weight)] = &[
|
||||||
|
("submit_proposal", <() as WeightInfo>::submit_proposal()),
|
||||||
|
("submit_treasury_proposal", <() as WeightInfo>::submit_treasury_proposal()),
|
||||||
|
("cast_vote", <() as WeightInfo>::cast_vote()),
|
||||||
|
("finalize_proposal", <() as WeightInfo>::finalize_proposal()),
|
||||||
|
("add_council_member", <() as WeightInfo>::add_council_member()),
|
||||||
|
("remove_council_member", <() as WeightInfo>::remove_council_member()),
|
||||||
|
("veto_proposal", <() as WeightInfo>::veto_proposal()),
|
||||||
|
("mark_as_advisor", <() as WeightInfo>::mark_as_advisor()),
|
||||||
|
("unmark_as_advisor", <() as WeightInfo>::unmark_as_advisor()),
|
||||||
|
("override_council_veto", <() as WeightInfo>::override_council_veto()),
|
||||||
|
("submit_emergency_proposal", <() as WeightInfo>::submit_emergency_proposal()),
|
||||||
|
("treasury_disbursement", <() as WeightInfo>::treasury_disbursement()),
|
||||||
|
("treasury_deposit", <() as WeightInfo>::treasury_deposit()),
|
||||||
|
("endorse_emergency_proposal", <() as WeightInfo>::endorse_emergency_proposal()),
|
||||||
|
("unlock_vote_funds", <() as WeightInfo>::unlock_vote_funds()),
|
||||||
|
("uphold_council_veto", <() as WeightInfo>::uphold_council_veto()),
|
||||||
|
("finalize_override", <() as WeightInfo>::finalize_override()),
|
||||||
|
];
|
||||||
|
for (nombre, w) in casos {
|
||||||
|
assert!(
|
||||||
|
w.proof_size() > 0,
|
||||||
|
"`{nombre}` declara proof_size = 0: miente al block-builder sobre el peso PoV"
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
w.ref_time() > 0,
|
||||||
|
"`{nombre}` declara ref_time = 0: el extrinsic saldria gratis"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Ensambla un weights.rs desde varios certificados del banco de referencia (Laurha, la Pi 5).
|
||||||
|
|
||||||
|
python3 scripts/bench/ensamblar-pesos.py <weights.rs> <cert-antiguo.rs> ... <cert-vigente.rs>
|
||||||
|
python3 scripts/bench/ensamblar-pesos.py --comprobar <weights.rs> <certs...> # 1 si no coincide
|
||||||
|
|
||||||
|
Por qué existe: «El máximo de 5 de un día no es el de otro» (Laurha, 29-oct). Entre dos
|
||||||
|
certificados del mismo código, el base weight de un mismo extrinsic se separa hasta un 22 %. Si se
|
||||||
|
cobra sólo el último certificado, se cobra de menos lo que otro día midió más alto sobre el MISMO
|
||||||
|
código. Si se mezclan certificados de código distinto, se cobra lo que no corre.
|
||||||
|
|
||||||
|
La regla, función a función (en los dos impl, `SubstrateWeight<T>` y `()`):
|
||||||
|
- El ÚLTIMO certificado de la lista es el del código que corre. Su bloque es la referencia: sus
|
||||||
|
lecturas, escrituras, proof y lista de storage son las que se cobran.
|
||||||
|
- Entran todos los certificados cuyo bloque tiene el MISMO esqueleto que la referencia: el cuerpo
|
||||||
|
sin números ni comentarios numéricos. Un certificado de código anterior que lea otra cosa no entra.
|
||||||
|
- Cada `Weight::from_parts(a, b)` cobra el máximo de los que entran, coeficiente a coeficiente.
|
||||||
|
- Se niega si el esqueleto de la referencia no es el que ya tiene el weights.rs (el código cambió y
|
||||||
|
no hay certificado de él) o si una función del weights.rs no está en la referencia.
|
||||||
|
|
||||||
|
Sólo toca los bloques de las funciones. La cabecera, el trait y la guarda de proof_size se quedan
|
||||||
|
como están: la cabecera la escribe quien ensambla, y debe nombrar los certificados y sus shas.
|
||||||
|
"""
|
||||||
|
import hashlib, os, re, sys
|
||||||
|
|
||||||
|
IMPLS = ("impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {", "impl WeightInfo for () {")
|
||||||
|
FN = re.compile(r"((?:\t//[^\n]*\n)*)\tfn (\w+)\(\) -> Weight \{\n.*?\n\t\}\n", re.S)
|
||||||
|
PARTES = re.compile(r"from_parts\(([\d_]+), ([\d_]+)\)")
|
||||||
|
|
||||||
|
|
||||||
|
def impl(texto, cabeza):
|
||||||
|
a = texto.index(cabeza)
|
||||||
|
b = texto.index("\n}\n", a) + 1
|
||||||
|
return a, b
|
||||||
|
|
||||||
|
|
||||||
|
def bloques(texto, cabeza):
|
||||||
|
a, b = impl(texto, cabeza)
|
||||||
|
return {m.group(2): m for m in FN.finditer(texto, a, b)}
|
||||||
|
|
||||||
|
|
||||||
|
def esqueleto(bloque):
|
||||||
|
cuerpo = bloque.split("\tfn ", 1)[1]
|
||||||
|
cuerpo = re.sub(r"\t\t// [^\n]*\n", "", cuerpo)
|
||||||
|
return PARTES.sub("from_parts(N, N)", cuerpo)
|
||||||
|
|
||||||
|
|
||||||
|
def numeros(bloque):
|
||||||
|
return [(int(a.replace("_", "")), int(b.replace("_", ""))) for a, b in PARTES.findall(bloque)]
|
||||||
|
|
||||||
|
|
||||||
|
def ensamblar(destino, certs):
|
||||||
|
texto = open(destino).read()
|
||||||
|
leidos = [(os.path.basename(c).rsplit(".", 1)[0], open(c).read()) for c in certs]
|
||||||
|
for cabeza in IMPLS:
|
||||||
|
actuales = bloques(texto, cabeza)
|
||||||
|
ref = bloques(leidos[-1][1], cabeza)
|
||||||
|
otros = [(et, bloques(t, cabeza)) for et, t in leidos]
|
||||||
|
nuevos = {}
|
||||||
|
for nombre, m in actuales.items():
|
||||||
|
if nombre not in ref:
|
||||||
|
sys.exit(f"{nombre}: no está en el certificado vigente ({leidos[-1][0]})")
|
||||||
|
r = ref[nombre].group(0)
|
||||||
|
if esqueleto(r) != esqueleto(m.group(0)):
|
||||||
|
sys.exit(f"{nombre}: el certificado vigente no mide el código del weights.rs")
|
||||||
|
entran = [(et, b[nombre].group(0)) for et, b in otros
|
||||||
|
if nombre in b and esqueleto(b[nombre].group(0)) == esqueleto(r)]
|
||||||
|
maximos = [tuple(max(v) for v in zip(*col)) for col in zip(*[numeros(b) for _, b in entran])]
|
||||||
|
it = iter(maximos)
|
||||||
|
bloque = PARTES.sub(lambda _m: "from_parts({:_}, {:_})".format(*next(it)), r)
|
||||||
|
etiquetas = ", ".join(et for et, _ in entran)
|
||||||
|
bloque = re.sub(r"\t\t// Tiempo minimo de ejecucion:[^\n]*\n",
|
||||||
|
f"\t\t// Máximo por coeficiente de: {etiquetas}.\n", bloque)
|
||||||
|
nuevos[nombre] = bloque
|
||||||
|
a, b = impl(texto, cabeza)
|
||||||
|
seccion = FN.sub(lambda mm: nuevos[mm.group(2)], texto[a:b])
|
||||||
|
texto = texto[:a] + seccion + texto[b:]
|
||||||
|
return texto
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
args = sys.argv[1:]
|
||||||
|
comprobar = bool(args) and args[0] == "--comprobar"
|
||||||
|
if comprobar:
|
||||||
|
args = args[1:]
|
||||||
|
if len(args) < 2:
|
||||||
|
sys.exit(__doc__)
|
||||||
|
destino, certs = args[0], args[1:]
|
||||||
|
nuevo = ensamblar(destino, certs)
|
||||||
|
for c in certs:
|
||||||
|
print(f" {hashlib.sha256(open(c, 'rb').read()).hexdigest()[:16]} {c}")
|
||||||
|
if comprobar:
|
||||||
|
igual = nuevo == open(destino).read()
|
||||||
|
print("weights.rs coincide con el ensamblado" if igual else "weights.rs NO coincide con el ensamblado")
|
||||||
|
sys.exit(0 if igual else 1)
|
||||||
|
open(destino, "w").write(nuevo)
|
||||||
|
print(f"ensamblado {destino} desde {len(certs)} certificados")
|
||||||
Reference in new issue
Block a user