feat(runtime): spec 17 — los pesos se cobran como en la Pi 5, medidos por Laurha en el banco de referencia
Los 23 weights de spec 16, certificados por Laurha en el santuario de la rp1 (origin-banco):
- Núcleo 3 aislado, governor performance a 2,4 GHz, CI parada, 45-49 °C.
- frame-omni-bencher 0.15.0 sobre el wasm 40cb5a1d de 3cd1068.
- 5 procesos por pallet; se cobra el MÁXIMO con scripts/bench/max-de-n.py, porque procesos
idénticos se separan hasta un 35 %.
- Evidencia: ~/laurha-work/banco/spec16-20261024-1631 en la rp1 (SHA256SUMS d930c5e1).
- Su perfil va en la cabecera de cada weights.rs.
Antes de cobrarlos:
- Mismos accesos a storage: el esqueleto de los 5 ficheros y sus reads/writes son idénticos a
los de main.
- Lo que Laurha pidió mirar (cast_vote, finalize_proposal y veto_proposal, mucho más altos que
en RV12) es esperable. Contra los interinos del Mac todos caen en la banda Pi/Mac de 2,5-3,9×:
es trabajo nuevo de RV15/RV16 en una CPU unas 3 veces más lenta.
- Destacan los tres que verifican Ed25519 en WASM (attest_asset, register_agent_did,
rotate_agent_key), con unas 6 veces: la criptografía pura sufre más en la Cortex-A76.
- Lo cobrado sube menos que la ejecución, entre +4 % (set_tier_profile) y +56 %
(rotate_agent_key), porque las lecturas y escrituras de storage no cambian.
- spec_version 16 → 17, porque cambian las fees. transaction_version no cambia: ninguna llamada
cambia su codificación.
Ensayado en la rp1 (aarch64) sobre un nodo efímero aparte, antes de la testnet de la casa, con
scripts/e2e/upgrade_en_vivo.py (nuevo):
- sudo(set_code) → CodeUpdated + Sudid Ok;
- spec 17 y LastRuntimeUpgrade sube;
- una firma con la spec vieja → «bad signature»; con la nueva, ExtrinsicSuccess;
- la finalidad pasa del bloque del upgrade.
Es la primera vez que el ejecutor ARM compila y corre un runtime nuevo.
Revisión adversarial (nivel 1 de la directiva), antes de tocar la red, con orden de tumbarlo:
no pudo. Los seis puntos aguantan:
- ningún storage ni codificación cambia, y transaction_version no debe subir;
- el más pesado (veto_proposal) cobra 1,9 ms, 344 veces por debajo del máximo por extrinsic;
- los weights.rs tienen la misma estructura y el impl () coincide;
- ninguna fee, subsidio ni test depende del valor de forma que se rompa.
scripts/rp1 (operación del nodo, medido en 23 h con los valores por defecto):
- 430 MB de WAL de RocksDB retenidos para 15 MB de datos, y el RSS subiendo de 200 a 340 MB:
--db-cache 128. Al reiniciar, 449 → 21 MB.
- El log, de 7 líneas por bloque a ~2 (txpool, sc_basic_authorship y aura en warn; ojo: las
líneas de autoría usan el target del módulo, no «basic-authorship»), de 16 MB/día a unos 3.
- Modo append, y medir.sh lo rota al pasar de 32 MB.
Co-Authored-By: Laurha <laurha@origin>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
22bab19932
commit
e7b9c0c8bf
9 files changed
+373
-142
No files matched your search
@@ -8,23 +8,37 @@
|
||||
// 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_agent_identity` — 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-09-16, STEPS: `50`, REPEAT: `20`
|
||||
//! HOSTNAME: `MacBookProM3Max.local`, CPU: `<UNKNOWN>`
|
||||
//! FECHA: 2026-10-24, STEPS: `50`, REPEAT: `20`
|
||||
//! HOSTNAME: `CyberDeckRP1`, CPU: `<UNKNOWN>`
|
||||
//! WASM-EXECUTION: `Compiled`, DB CACHE: 1024
|
||||
|
||||
// Comando ejecutado:
|
||||
// /Users/davidherran/.cargo/bin/frame-omni-bencher
|
||||
// /home/davidherran/.cargo/bin/frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --runtime
|
||||
// target/release/wbuild/origin-chain-runtime/origin_chain_runtime.compact.compressed.wasm
|
||||
// /home/davidherran/charon/bench/origin_chain_runtime_spec16_3cd1068_bench.compact.compressed.wasm
|
||||
// --genesis-builder-preset
|
||||
// development
|
||||
// --pallet
|
||||
@@ -36,11 +50,11 @@
|
||||
// --repeat
|
||||
// 20
|
||||
// --template
|
||||
// scripts/bench/origin-weights-template.hbs
|
||||
// /home/davidherran/charon/bench/origin-weights-template.hbs
|
||||
// --header
|
||||
// scripts/bench/HEADER.txt
|
||||
// /home/davidherran/charon/bench/HEADER.txt
|
||||
// --output
|
||||
// crates/origin-chain-agent-identity/src/weights.rs
|
||||
// /home/davidherran/laurha-work/banco/spec16-20261024-1631/r1/origin_chain_agent_identity.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
@@ -51,6 +65,10 @@ use core::marker::PhantomData;
|
||||
use frame_support::{traits::Get, weights::constants::RocksDbWeight, weights::Weight};
|
||||
|
||||
/// Trait de weights para los extrinsics de `origin_chain_agent_identity`.
|
||||
// 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]): a5fa48706c19 65ad82789014 9632521ec280 416b5bbced02 817bf8aed8db
|
||||
|
||||
pub trait WeightInfo {
|
||||
/// Peso de `register_agent_did` — MEDIDO sobre el WASM, no estimado a mano.
|
||||
fn register_agent_did() -> Weight;
|
||||
@@ -77,10 +95,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn register_agent_did() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `25`
|
||||
// Medido: `26`
|
||||
// Estimado: `3940`
|
||||
// Tiempo minimo de ejecucion: 54_000_000 picosegundos.
|
||||
Weight::from_parts(55_000_000, 0)
|
||||
// Tiempo minimo de ejecucion: 301_353_000 picosegundos.
|
||||
Weight::from_parts(320_835_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3940))
|
||||
.saturating_add(T::DbWeight::get().reads(7_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||
@@ -107,10 +125,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn rotate_agent_key() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `434`
|
||||
// Medido: `435`
|
||||
// Estimado: `6100`
|
||||
// Tiempo minimo de ejecucion: 93_000_000 picosegundos.
|
||||
Weight::from_parts(97_000_000, 0)
|
||||
// Tiempo minimo de ejecucion: 534_966_000 picosegundos.
|
||||
Weight::from_parts(584_021_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6100))
|
||||
.saturating_add(T::DbWeight::get().reads(11_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(5_u64))
|
||||
@@ -120,13 +138,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Impl para mocks y tests — `RocksDbWeight` directo, sin necesitar `T`.
|
||||
impl WeightInfo for () {
|
||||
fn register_agent_did() -> Weight {
|
||||
Weight::from_parts(55_000_000, 0)
|
||||
Weight::from_parts(320_835_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3940))
|
||||
.saturating_add(RocksDbWeight::get().reads(7_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||
}
|
||||
fn rotate_agent_key() -> Weight {
|
||||
Weight::from_parts(97_000_000, 0)
|
||||
Weight::from_parts(584_021_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6100))
|
||||
.saturating_add(RocksDbWeight::get().reads(11_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
||||
|
||||
@@ -8,23 +8,37 @@
|
||||
// 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_emission` — 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-09-09, STEPS: `50`, REPEAT: `20`
|
||||
//! HOSTNAME: `MacBookProM3Max.local`, CPU: `<UNKNOWN>`
|
||||
//! FECHA: 2026-10-24, STEPS: `50`, REPEAT: `20`
|
||||
//! HOSTNAME: `CyberDeckRP1`, CPU: `<UNKNOWN>`
|
||||
//! WASM-EXECUTION: `Compiled`, DB CACHE: 1024
|
||||
|
||||
// Comando ejecutado:
|
||||
// /Users/davidherran/.cargo/bin/frame-omni-bencher
|
||||
// /home/davidherran/.cargo/bin/frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --runtime
|
||||
// /Users/davidherran/originmetaverse/artifacts/origin-chain/origin_chain_runtime_rv12_bench.compact.compressed.wasm
|
||||
// /home/davidherran/charon/bench/origin_chain_runtime_spec16_3cd1068_bench.compact.compressed.wasm
|
||||
// --genesis-builder-preset
|
||||
// development
|
||||
// --pallet
|
||||
@@ -36,11 +50,11 @@
|
||||
// --repeat
|
||||
// 20
|
||||
// --template
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/scripts/bench/origin-weights-template.hbs
|
||||
// /home/davidherran/charon/bench/origin-weights-template.hbs
|
||||
// --header
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/scripts/bench/HEADER.txt
|
||||
// /home/davidherran/charon/bench/HEADER.txt
|
||||
// --output
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/crates/origin-chain-emission/src/weights.rs
|
||||
// /home/davidherran/laurha-work/banco/spec16-20261024-1631/r1/origin_chain_emission.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
@@ -51,6 +65,10 @@ use core::marker::PhantomData;
|
||||
use frame_support::{traits::Get, weights::constants::RocksDbWeight, weights::Weight};
|
||||
|
||||
/// Trait de weights para los extrinsics de `origin_chain_emission`.
|
||||
// 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]): f1de9c88e004 4906eadbbd2c 4cf2434f8d91 2e33f6dc5d3e 16667a276ec6
|
||||
|
||||
pub trait WeightInfo {
|
||||
/// Peso de `set_emission_paused` — MEDIDO sobre el WASM, no estimado a mano.
|
||||
fn set_emission_paused() -> Weight;
|
||||
@@ -71,11 +89,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn set_emission_paused() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `61`
|
||||
// Estimado: `1546`
|
||||
// Tiempo minimo de ejecucion: 7_000_000 picosegundos.
|
||||
Weight::from_parts(8_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1546))
|
||||
// Medido: `62`
|
||||
// Estimado: `1547`
|
||||
// Tiempo minimo de ejecucion: 22_352_000 picosegundos.
|
||||
Weight::from_parts(23_481_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1547))
|
||||
.saturating_add(T::DbWeight::get().reads(5_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||
}
|
||||
@@ -84,8 +102,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Impl para mocks y tests — `RocksDbWeight` directo, sin necesitar `T`.
|
||||
impl WeightInfo for () {
|
||||
fn set_emission_paused() -> Weight {
|
||||
Weight::from_parts(8_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1546))
|
||||
Weight::from_parts(23_481_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1547))
|
||||
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||
}
|
||||
|
||||
@@ -8,23 +8,37 @@
|
||||
// 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_fees` — 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-09-09, STEPS: `50`, REPEAT: `20`
|
||||
//! HOSTNAME: `MacBookProM3Max.local`, CPU: `<UNKNOWN>`
|
||||
//! FECHA: 2026-10-24, STEPS: `50`, REPEAT: `20`
|
||||
//! HOSTNAME: `CyberDeckRP1`, CPU: `<UNKNOWN>`
|
||||
//! WASM-EXECUTION: `Compiled`, DB CACHE: 1024
|
||||
|
||||
// Comando ejecutado:
|
||||
// /Users/davidherran/.cargo/bin/frame-omni-bencher
|
||||
// /home/davidherran/.cargo/bin/frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --runtime
|
||||
// /Users/davidherran/originmetaverse/artifacts/origin-chain/origin_chain_runtime_rv12_bench.compact.compressed.wasm
|
||||
// /home/davidherran/charon/bench/origin_chain_runtime_spec16_3cd1068_bench.compact.compressed.wasm
|
||||
// --genesis-builder-preset
|
||||
// development
|
||||
// --pallet
|
||||
@@ -36,11 +50,11 @@
|
||||
// --repeat
|
||||
// 20
|
||||
// --template
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/scripts/bench/origin-weights-template.hbs
|
||||
// /home/davidherran/charon/bench/origin-weights-template.hbs
|
||||
// --header
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/scripts/bench/HEADER.txt
|
||||
// /home/davidherran/charon/bench/HEADER.txt
|
||||
// --output
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/crates/origin-chain-fees/src/weights.rs
|
||||
// /home/davidherran/laurha-work/banco/spec16-20261024-1631/r1/origin_chain_fees.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
@@ -51,6 +65,10 @@ use core::marker::PhantomData;
|
||||
use frame_support::{traits::Get, weights::constants::RocksDbWeight, weights::Weight};
|
||||
|
||||
/// Trait de weights para los extrinsics de `origin_chain_fees`.
|
||||
// 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]): ff44ade5b2df 756e464408b3 54d43c52c282 33477b9f397a 688a6bc81a34
|
||||
|
||||
pub trait WeightInfo {
|
||||
/// Peso de `set_tier_profile` — MEDIDO sobre el WASM, no estimado a mano.
|
||||
fn set_tier_profile() -> Weight;
|
||||
@@ -71,11 +89,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `Fees::TierProfiles` (`max_values`: None, `max_size`: Some(50), added: 2525, mode: `MaxEncodedLen`)
|
||||
fn set_tier_profile() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `19`
|
||||
// Estimado: `1504`
|
||||
// Tiempo minimo de ejecucion: 6_000_000 picosegundos.
|
||||
Weight::from_parts(7_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1504))
|
||||
// Medido: `20`
|
||||
// Estimado: `1505`
|
||||
// Tiempo minimo de ejecucion: 21_574_000 picosegundos.
|
||||
Weight::from_parts(23_111_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1505))
|
||||
.saturating_add(T::DbWeight::get().reads(4_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||
}
|
||||
@@ -84,8 +102,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Impl para mocks y tests — `RocksDbWeight` directo, sin necesitar `T`.
|
||||
impl WeightInfo for () {
|
||||
fn set_tier_profile() -> Weight {
|
||||
Weight::from_parts(7_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1504))
|
||||
Weight::from_parts(23_111_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1505))
|
||||
.saturating_add(RocksDbWeight::get().reads(4_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||
}
|
||||
|
||||
@@ -8,23 +8,37 @@
|
||||
// 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-07, STEPS: `50`, REPEAT: `20`
|
||||
//! HOSTNAME: `MacBookProM3Max.local`, CPU: `<UNKNOWN>`
|
||||
//! FECHA: 2026-10-24, STEPS: `50`, REPEAT: `20`
|
||||
//! HOSTNAME: `CyberDeckRP1`, CPU: `<UNKNOWN>`
|
||||
//! WASM-EXECUTION: `Compiled`, DB CACHE: 1024
|
||||
|
||||
// Comando ejecutado:
|
||||
// frame-omni-bencher
|
||||
// /home/davidherran/.cargo/bin/frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --runtime
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/target-bench/release/wbuild/origin-chain-runtime/origin_chain_runtime.compact.compressed.wasm
|
||||
// /home/davidherran/charon/bench/origin_chain_runtime_spec16_3cd1068_bench.compact.compressed.wasm
|
||||
// --genesis-builder-preset
|
||||
// development
|
||||
// --pallet
|
||||
@@ -36,11 +50,11 @@
|
||||
// --repeat
|
||||
// 20
|
||||
// --template
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/scripts/bench/origin-weights-template.hbs
|
||||
// /home/davidherran/charon/bench/origin-weights-template.hbs
|
||||
// --header
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/scripts/bench/HEADER.txt
|
||||
// /home/davidherran/charon/bench/HEADER.txt
|
||||
// --output
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/crates/origin-chain-governance/src/weights.rs
|
||||
// /home/davidherran/laurha-work/banco/spec16-20261024-1631/r1/origin_chain_governance.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
@@ -51,6 +65,10 @@ 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;
|
||||
@@ -107,10 +125,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||
fn submit_proposal() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `107`
|
||||
// Medido: `108`
|
||||
// Estimado: `3722`
|
||||
// Tiempo minimo de ejecucion: 44_000_000 picosegundos.
|
||||
Weight::from_parts(45_000_000, 0)
|
||||
// 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))
|
||||
@@ -137,10 +155,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn cast_vote() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `2320`
|
||||
// Medido: `2321`
|
||||
// Estimado: `5338`
|
||||
// Tiempo minimo de ejecucion: 38_000_000 picosegundos.
|
||||
Weight::from_parts(42_000_000, 0)
|
||||
// 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))
|
||||
@@ -163,10 +181,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn finalize_proposal() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `614`
|
||||
// Medido: `615`
|
||||
// Estimado: `6196`
|
||||
// Tiempo minimo de ejecucion: 52_000_000 picosegundos.
|
||||
Weight::from_parts(59_000_000, 0)
|
||||
// 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))
|
||||
@@ -185,10 +203,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn add_council_member() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `25`
|
||||
// Medido: `26`
|
||||
// Estimado: `3554`
|
||||
// Tiempo minimo de ejecucion: 10_000_000 picosegundos.
|
||||
Weight::from_parts(10_000_000, 0)
|
||||
// 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))
|
||||
@@ -207,10 +225,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn remove_council_member() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `153`
|
||||
// Medido: `154`
|
||||
// Estimado: `3554`
|
||||
// Tiempo minimo de ejecucion: 11_000_000 picosegundos.
|
||||
Weight::from_parts(12_000_000, 0)
|
||||
// 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))
|
||||
@@ -247,10 +265,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `Governance::VetoCount` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
fn veto_proposal() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `1440`
|
||||
// Medido: `1441`
|
||||
// Estimado: `16416`
|
||||
// Tiempo minimo de ejecucion: 91_000_000 picosegundos.
|
||||
Weight::from_parts(95_000_000, 0)
|
||||
// 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))
|
||||
@@ -267,10 +285,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn mark_as_advisor() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `25`
|
||||
// Medido: `26`
|
||||
// Estimado: `3513`
|
||||
// Tiempo minimo de ejecucion: 8_000_000 picosegundos.
|
||||
Weight::from_parts(9_000_000, 0)
|
||||
// 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))
|
||||
@@ -287,10 +305,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn unmark_as_advisor() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `98`
|
||||
// Medido: `99`
|
||||
// Estimado: `3513`
|
||||
// Tiempo minimo de ejecucion: 10_000_000 picosegundos.
|
||||
Weight::from_parts(10_000_000, 0)
|
||||
// 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))
|
||||
@@ -325,10 +343,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `Governance::OverrideStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||
fn override_council_veto() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `2468`
|
||||
// Medido: `2469`
|
||||
// Estimado: `5338`
|
||||
// Tiempo minimo de ejecucion: 47_000_000 picosegundos.
|
||||
Weight::from_parts(49_000_000, 0)
|
||||
// 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))
|
||||
@@ -357,10 +375,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `Governance::ProposalBond` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `MaxEncodedLen`)
|
||||
fn submit_emergency_proposal() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `353`
|
||||
// Medido: `354`
|
||||
// Estimado: `6132`
|
||||
// Tiempo minimo de ejecucion: 58_000_000 picosegundos.
|
||||
Weight::from_parts(60_000_000, 0)
|
||||
// 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))
|
||||
@@ -383,10 +401,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn treasury_disbursement() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `494`
|
||||
// Medido: `495`
|
||||
// Estimado: `6196`
|
||||
// Tiempo minimo de ejecucion: 48_000_000 picosegundos.
|
||||
Weight::from_parts(49_000_000, 0)
|
||||
// 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))
|
||||
@@ -405,10 +423,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn treasury_deposit() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `101`
|
||||
// Medido: `102`
|
||||
// Estimado: `3593`
|
||||
// Tiempo minimo de ejecucion: 37_000_000 picosegundos.
|
||||
Weight::from_parts(38_000_000, 0)
|
||||
// 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))
|
||||
@@ -429,10 +447,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn endorse_emergency_proposal() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `153`
|
||||
// Medido: `154`
|
||||
// Estimado: `6132`
|
||||
// Tiempo minimo de ejecucion: 19_000_000 picosegundos.
|
||||
Weight::from_parts(20_000_000, 0)
|
||||
// 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))
|
||||
@@ -455,10 +473,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn unlock_vote_funds() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `2197`
|
||||
// Medido: `2198`
|
||||
// Estimado: `5338`
|
||||
// Tiempo minimo de ejecucion: 29_000_000 picosegundos.
|
||||
Weight::from_parts(30_000_000, 0)
|
||||
// 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))
|
||||
@@ -493,10 +511,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `Governance::UpholdStakeTotal` (`max_values`: None, `max_size`: Some(64), added: 2539, mode: `MaxEncodedLen`)
|
||||
fn uphold_council_veto() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `2468`
|
||||
// Medido: `2469`
|
||||
// Estimado: `5338`
|
||||
// Tiempo minimo de ejecucion: 47_000_000 picosegundos.
|
||||
Weight::from_parts(50_000_000, 0)
|
||||
// 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))
|
||||
@@ -523,10 +541,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn finalize_override() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `636`
|
||||
// Medido: `637`
|
||||
// Estimado: `3722`
|
||||
// Tiempo minimo de ejecucion: 25_000_000 picosegundos.
|
||||
Weight::from_parts(26_000_000, 0)
|
||||
// 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))
|
||||
@@ -536,97 +554,97 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Impl para mocks y tests — `RocksDbWeight` directo, sin necesitar `T`.
|
||||
impl WeightInfo for () {
|
||||
fn submit_proposal() -> Weight {
|
||||
Weight::from_parts(45_000_000, 0)
|
||||
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(42_000_000, 0)
|
||||
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(59_000_000, 0)
|
||||
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(10_000_000, 0)
|
||||
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(12_000_000, 0)
|
||||
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(95_000_000, 0)
|
||||
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(9_000_000, 0)
|
||||
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(10_000_000, 0)
|
||||
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(49_000_000, 0)
|
||||
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(60_000_000, 0)
|
||||
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(49_000_000, 0)
|
||||
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(38_000_000, 0)
|
||||
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(20_000_000, 0)
|
||||
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(30_000_000, 0)
|
||||
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(50_000_000, 0)
|
||||
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(26_000_000, 0)
|
||||
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))
|
||||
|
||||
@@ -8,23 +8,37 @@
|
||||
// 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_provenance` — 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-09-09, STEPS: `50`, REPEAT: `20`
|
||||
//! HOSTNAME: `MacBookProM3Max.local`, CPU: `<UNKNOWN>`
|
||||
//! FECHA: 2026-10-24, STEPS: `50`, REPEAT: `20`
|
||||
//! HOSTNAME: `CyberDeckRP1`, CPU: `<UNKNOWN>`
|
||||
//! WASM-EXECUTION: `Compiled`, DB CACHE: 1024
|
||||
|
||||
// Comando ejecutado:
|
||||
// /Users/davidherran/.cargo/bin/frame-omni-bencher
|
||||
// /home/davidherran/.cargo/bin/frame-omni-bencher
|
||||
// v1
|
||||
// benchmark
|
||||
// pallet
|
||||
// --runtime
|
||||
// /Users/davidherran/originmetaverse/artifacts/origin-chain/origin_chain_runtime_rv12_bench.compact.compressed.wasm
|
||||
// /home/davidherran/charon/bench/origin_chain_runtime_spec16_3cd1068_bench.compact.compressed.wasm
|
||||
// --genesis-builder-preset
|
||||
// development
|
||||
// --pallet
|
||||
@@ -36,11 +50,11 @@
|
||||
// --repeat
|
||||
// 20
|
||||
// --template
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/scripts/bench/origin-weights-template.hbs
|
||||
// /home/davidherran/charon/bench/origin-weights-template.hbs
|
||||
// --header
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/scripts/bench/HEADER.txt
|
||||
// /home/davidherran/charon/bench/HEADER.txt
|
||||
// --output
|
||||
// /Users/davidherran/originmetaverse/external/arkhe-origin-chain/crates/origin-chain-provenance/src/weights.rs
|
||||
// /home/davidherran/laurha-work/banco/spec16-20261024-1631/r1/origin_chain_provenance.rs
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
@@ -51,6 +65,10 @@ use core::marker::PhantomData;
|
||||
use frame_support::{traits::Get, weights::constants::RocksDbWeight, weights::Weight};
|
||||
|
||||
/// Trait de weights para los extrinsics de `origin_chain_provenance`.
|
||||
// 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]): f9073e1d0c4a 10b95d00a036 5aa8e0aaf057 5c50e916300f 8f55f561f51a
|
||||
|
||||
pub trait WeightInfo {
|
||||
/// Peso de `attest_asset` — MEDIDO sobre el WASM, no estimado a mano.
|
||||
fn attest_asset() -> Weight;
|
||||
@@ -79,10 +97,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `System::Events` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
fn attest_asset() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `153`
|
||||
// Medido: `154`
|
||||
// Estimado: `3970`
|
||||
// Tiempo minimo de ejecucion: 43_000_000 picosegundos.
|
||||
Weight::from_parts(44_000_000, 0)
|
||||
// Tiempo minimo de ejecucion: 244_594_000 picosegundos.
|
||||
Weight::from_parts(246_613_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3970))
|
||||
.saturating_add(T::DbWeight::get().reads(7_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||
@@ -99,11 +117,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `Provenance::AuthorizedValidators` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
|
||||
fn register_validator() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `19`
|
||||
// Estimado: `1504`
|
||||
// Tiempo minimo de ejecucion: 6_000_000 picosegundos.
|
||||
Weight::from_parts(7_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1504))
|
||||
// Medido: `20`
|
||||
// Estimado: `1505`
|
||||
// Tiempo minimo de ejecucion: 21_333_000 picosegundos.
|
||||
Weight::from_parts(22_482_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1505))
|
||||
.saturating_add(T::DbWeight::get().reads(4_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||
}
|
||||
@@ -119,11 +137,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Proof: `Provenance::AuthorizedValidators` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
|
||||
fn revoke_validator() -> Weight {
|
||||
// Proof size en bytes:
|
||||
// Medido: `19`
|
||||
// Estimado: `1504`
|
||||
// Tiempo minimo de ejecucion: 6_000_000 picosegundos.
|
||||
Weight::from_parts(7_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1504))
|
||||
// Medido: `20`
|
||||
// Estimado: `1505`
|
||||
// Tiempo minimo de ejecucion: 21_000_000 picosegundos.
|
||||
Weight::from_parts(22_518_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1505))
|
||||
.saturating_add(T::DbWeight::get().reads(4_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(3_u64))
|
||||
}
|
||||
@@ -132,20 +150,20 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
/// Impl para mocks y tests — `RocksDbWeight` directo, sin necesitar `T`.
|
||||
impl WeightInfo for () {
|
||||
fn attest_asset() -> Weight {
|
||||
Weight::from_parts(44_000_000, 0)
|
||||
Weight::from_parts(246_613_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3970))
|
||||
.saturating_add(RocksDbWeight::get().reads(7_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||
}
|
||||
fn register_validator() -> Weight {
|
||||
Weight::from_parts(7_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1504))
|
||||
Weight::from_parts(22_482_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1505))
|
||||
.saturating_add(RocksDbWeight::get().reads(4_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||
}
|
||||
fn revoke_validator() -> Weight {
|
||||
Weight::from_parts(7_000_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1504))
|
||||
Weight::from_parts(22_518_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 1505))
|
||||
.saturating_add(RocksDbWeight::get().reads(4_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(3_u64))
|
||||
}
|
||||
|
||||
@@ -367,6 +367,12 @@ pub const IMPL_NAME: &str = borrowed_str(&VERSION.impl_name);
|
||||
/// privada, en rotación Y en registro. Ahora `is_strong_ed25519_key` las rechaza.
|
||||
/// - **El registro no consultaba `KeyToDid`**: una llave rotada fundaba otro DID.
|
||||
/// - **Replay entre cadenas**: el mensaje de rotación no llevaba génesis. Ahora sí.
|
||||
///
|
||||
/// **v17 (2026-10-25): los pesos se cobran como en la Pi 5.** Son los 23 weights certificados
|
||||
/// por Laurha en el banco de referencia (el máximo de 5 procesos por pallet; ver la cabecera
|
||||
/// de cada `weights.rs`). Sustituyen a los interinos medidos en el Mac. No cambia ninguna
|
||||
/// 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`.
|
||||
pub const RUNTIME_VERSION: u32 = VERSION.spec_version;
|
||||
|
||||
/// Canonical authoring version per Substrate semver canonical.
|
||||
@@ -1019,7 +1025,7 @@ pub const VERSION: sp_version::RuntimeVersion = sp_version::RuntimeVersion {
|
||||
spec_name: alloc::borrow::Cow::Borrowed("origin-chain"),
|
||||
impl_name: alloc::borrow::Cow::Borrowed("origin-chain-charon"),
|
||||
authoring_version: 1,
|
||||
spec_version: 16,
|
||||
spec_version: 17,
|
||||
impl_version: 1,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
transaction_version: 1,
|
||||
@@ -1180,7 +1186,7 @@ mod tests {
|
||||
/// mismo commit en que la version subio a 12.
|
||||
#[test]
|
||||
fn spec_version_vigente_y_transaction_version_intacta() {
|
||||
assert_eq!(RUNTIME_VERSION, 16);
|
||||
assert_eq!(RUNTIME_VERSION, 17);
|
||||
assert_eq!(TRANSACTION_VERSION, 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user