From 3669c6a6aa7999f336190d8ba902a3bdc8de6003 Mon Sep 17 00:00:00 2001
From: Benjamin Gallois <business@gallois.cc>
Date: Wed, 6 Mar 2024 15:05:10 +0100
Subject: [PATCH] Change distance evaluation period from Sessions to Blocks
 (nodes/rust/duniter-v2s!252)

* update metadata

* rename echec in failure

* fix https://git.duniter.org/nodes/rust/duniter-v2s/-/issues/174

* replace session by pool

* fix https://git.duniter.org/nodes/rust/duniter-v2s/-/issues/207

* update client

* update distance-oracle

* update documentation

* add weight accounting

* fix end2end tests

* make tests independent of EvaluationPeriod

* change distance evaluation period from Sessions to Blocks
---
 Cargo.lock                                    | 398 +++++++++---------
 client/distance/src/lib.rs                    |  22 +-
 distance-oracle/src/api.rs                    |  18 +-
 distance-oracle/src/lib.rs                    |  18 +-
 distance-oracle/src/mock.rs                   |   2 +-
 .../identity_creation.feature                 |   8 +-
 pallets/distance/README.md                    |  18 +-
 pallets/distance/src/benchmarking.rs          |  99 +++++
 pallets/distance/src/lib.rs                   | 154 ++++---
 pallets/distance/src/mock.rs                  |   1 +
 pallets/distance/src/weights.rs               |  51 +++
 resources/metadata.scale                      | Bin 112998 -> 113201 bytes
 runtime/common/src/handlers.rs                |   4 +-
 runtime/common/src/pallets_config.rs          |   1 +
 runtime/common/src/weights/pallet_distance.rs | 158 +++++--
 runtime/gdev/tests/integration_tests.rs       |  59 +--
 16 files changed, 631 insertions(+), 380 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 9559c1e2e..0da887cda 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -84,9 +84,9 @@ dependencies = [
 
 [[package]]
 name = "ahash"
-version = "0.8.8"
+version = "0.8.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff"
+checksum = "8b79b82693f705137f8fb9b37871d99e4f9a7df12b917eed79c3d3954830a60b"
 dependencies = [
  "cfg-if",
  "getrandom 0.2.12",
@@ -136,9 +136,9 @@ dependencies = [
 
 [[package]]
 name = "anstream"
-version = "0.6.12"
+version = "0.6.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540"
+checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb"
 dependencies = [
  "anstyle",
  "anstyle-parse",
@@ -208,7 +208,7 @@ dependencies = [
  "proc-macro-error",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -606,7 +606,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3"
 dependencies = [
  "concurrent-queue",
- "event-listener 5.1.0",
+ "event-listener 5.2.0",
  "event-listener-strategy 0.5.0",
  "futures-core",
  "pin-project-lite 0.2.13",
@@ -699,7 +699,7 @@ dependencies = [
  "async-signal",
  "blocking",
  "cfg-if",
- "event-listener 5.1.0",
+ "event-listener 5.2.0",
  "futures-lite",
  "rustix 0.38.31",
  "windows-sys 0.52.0",
@@ -737,7 +737,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -881,7 +881,7 @@ dependencies = [
  "regex",
  "rustc-hash",
  "shlex",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -1092,9 +1092,9 @@ dependencies = [
 
 [[package]]
 name = "bstr"
-version = "1.9.0"
+version = "1.9.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc"
+checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706"
 dependencies = [
  "memchr",
  "serde",
@@ -1111,9 +1111,9 @@ dependencies = [
 
 [[package]]
 name = "bumpalo"
-version = "3.15.0"
+version = "3.15.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f"
+checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b"
 
 [[package]]
 name = "byte-slice-cast"
@@ -1206,11 +1206,10 @@ dependencies = [
 
 [[package]]
 name = "cc"
-version = "1.0.83"
+version = "1.0.88"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc"
 dependencies = [
- "jobserver",
  "libc",
 ]
 
@@ -1289,7 +1288,7 @@ dependencies = [
  "js-sys",
  "num-traits 0.2.18",
  "wasm-bindgen",
- "windows-targets 0.52.0",
+ "windows-targets 0.52.4",
 ]
 
 [[package]]
@@ -1377,7 +1376,7 @@ dependencies = [
  "heck 0.4.1",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -1749,9 +1748,9 @@ dependencies = [
 
 [[package]]
 name = "crossbeam-channel"
-version = "0.5.11"
+version = "0.5.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b"
+checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95"
 dependencies = [
  "crossbeam-utils",
 ]
@@ -1910,7 +1909,7 @@ dependencies = [
  "proc-macro2",
  "quote",
  "regex",
- "syn 2.0.49",
+ "syn 2.0.52",
  "synthez",
 ]
 
@@ -1979,14 +1978,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
 name = "cxx"
-version = "1.0.116"
+version = "1.0.118"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8aff472b83efd22bfc0176aa8ba34617dd5c17364670eb201a5f06d339b8abf7"
+checksum = "2673ca5ae28334544ec2a6b18ebe666c42a2650abfb48abbd532ed409a44be2b"
 dependencies = [
  "cc",
  "cxxbridge-flags",
@@ -1996,9 +1995,9 @@ dependencies = [
 
 [[package]]
 name = "cxx-build"
-version = "1.0.116"
+version = "1.0.118"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcf6e7a52c19013a9a0ec421c7d9c2d1125faf333551227e0a017288d71b47c3"
+checksum = "9df46fe0eb43066a332586114174c449a62c25689f85a08f28fdcc8e12c380b9"
 dependencies = [
  "cc",
  "codespan-reporting",
@@ -2006,24 +2005,24 @@ dependencies = [
  "proc-macro2",
  "quote",
  "scratch",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
 name = "cxxbridge-flags"
-version = "1.0.116"
+version = "1.0.118"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "589e83d02fc1d4fb78f5ad56ca08835341e23499d086d2821315869426d618dc"
+checksum = "886acf875df67811c11cd015506b3392b9e1820b1627af1a6f4e93ccdfc74d11"
 
 [[package]]
 name = "cxxbridge-macro"
-version = "1.0.116"
+version = "1.0.118"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2cb1fd8ffae4230c7cfbbaf3698dbeaf750fa8c5dadf7ed897df581b9b572a5"
+checksum = "1d151cc139c3080e07f448f93a1284577ab2283d2a44acd902c6fba9ec20b6de"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -2038,12 +2037,12 @@ dependencies = [
 
 [[package]]
 name = "darling"
-version = "0.20.6"
+version = "0.20.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955"
+checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391"
 dependencies = [
- "darling_core 0.20.6",
- "darling_macro 0.20.6",
+ "darling_core 0.20.8",
+ "darling_macro 0.20.8",
 ]
 
 [[package]]
@@ -2062,16 +2061,16 @@ dependencies = [
 
 [[package]]
 name = "darling_core"
-version = "0.20.6"
+version = "0.20.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855"
+checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f"
 dependencies = [
  "fnv",
  "ident_case",
  "proc-macro2",
  "quote",
  "strsim 0.10.0",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -2087,13 +2086,13 @@ dependencies = [
 
 [[package]]
 name = "darling_macro"
-version = "0.20.6"
+version = "0.20.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be"
+checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f"
 dependencies = [
- "darling_core 0.20.6",
+ "darling_core 0.20.8",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -2293,7 +2292,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -2355,7 +2354,7 @@ dependencies = [
  "proc-macro2",
  "quote",
  "regex",
- "syn 2.0.49",
+ "syn 2.0.52",
  "termcolor",
  "toml 0.8.10",
  "walkdir",
@@ -2541,9 +2540,9 @@ dependencies = [
 
 [[package]]
 name = "dyn-clone"
-version = "1.0.16"
+version = "1.0.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d"
+checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
 
 [[package]]
 name = "ecdsa"
@@ -2738,9 +2737,9 @@ dependencies = [
 
 [[package]]
 name = "event-listener"
-version = "5.1.0"
+version = "5.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7ad6fd685ce13acd6d9541a30f6db6567a7a24c9ffd4ba2955d29e3f22c8b27"
+checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91"
 dependencies = [
  "concurrent-queue",
  "parking",
@@ -2763,7 +2762,7 @@ version = "0.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291"
 dependencies = [
- "event-listener 5.1.0",
+ "event-listener 5.2.0",
  "pin-project-lite 0.2.13",
 ]
 
@@ -2786,7 +2785,7 @@ dependencies = [
  "fs-err",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -3176,7 +3175,7 @@ dependencies = [
  "proc-macro2",
  "quote",
  "sp-crypto-hashing",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -3188,7 +3187,7 @@ dependencies = [
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -3198,7 +3197,7 @@ source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-sub
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -3367,7 +3366,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -3395,9 +3394,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
 
 [[package]]
 name = "futures-timer"
-version = "3.0.2"
+version = "3.0.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
+checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24"
 
 [[package]]
 name = "futures-util"
@@ -3646,7 +3645,7 @@ version = "0.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40"
 dependencies = [
- "opaque-debug 0.3.0",
+ "opaque-debug 0.3.1",
  "polyval",
 ]
 
@@ -3661,7 +3660,7 @@ dependencies = [
  "quote",
  "serde",
  "serde_json",
- "syn 2.0.49",
+ "syn 2.0.52",
  "textwrap",
  "thiserror",
  "typed-builder",
@@ -3701,7 +3700,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -3889,7 +3888,7 @@ dependencies = [
  "futures-sink",
  "futures-util",
  "http",
- "indexmap 2.2.3",
+ "indexmap 2.2.5",
  "slab",
  "tokio",
  "tokio-util",
@@ -3940,7 +3939,7 @@ version = "0.13.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
 dependencies = [
- "ahash 0.8.8",
+ "ahash 0.8.10",
 ]
 
 [[package]]
@@ -3949,7 +3948,7 @@ version = "0.14.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
 dependencies = [
- "ahash 0.8.8",
+ "ahash 0.8.10",
  "allocator-api2",
  "serde",
 ]
@@ -3980,9 +3979,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
 
 [[package]]
 name = "hermit-abi"
-version = "0.3.6"
+version = "0.3.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd"
+checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
 
 [[package]]
 name = "hex"
@@ -4128,7 +4127,7 @@ dependencies = [
  "httpdate",
  "itoa",
  "pin-project-lite 0.2.13",
- "socket2 0.5.5",
+ "socket2 0.5.6",
  "tokio",
  "tower-service",
  "tracing",
@@ -4307,9 +4306,9 @@ dependencies = [
 
 [[package]]
 name = "indexmap"
-version = "2.2.3"
+version = "2.2.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177"
+checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4"
 dependencies = [
  "equivalent",
  "hashbrown 0.14.3",
@@ -4416,7 +4415,7 @@ version = "0.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f"
 dependencies = [
- "socket2 0.5.5",
+ "socket2 0.5.6",
  "widestring",
  "windows-sys 0.48.0",
  "winreg",
@@ -4472,15 +4471,6 @@ version = "1.0.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
 
-[[package]]
-name = "jobserver"
-version = "0.1.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6"
-dependencies = [
- "libc",
-]
-
 [[package]]
 name = "js-sys"
 version = "0.3.68"
@@ -4825,7 +4815,7 @@ dependencies = [
  "proc-macro2",
  "quote",
  "regex",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -5411,9 +5401,9 @@ dependencies = [
 
 [[package]]
 name = "log"
-version = "0.4.20"
+version = "0.4.21"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
 
 [[package]]
 name = "lru"
@@ -5426,9 +5416,9 @@ dependencies = [
 
 [[package]]
 name = "lru"
-version = "0.12.2"
+version = "0.12.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db2c024b41519440580066ba82aab04092b333e09066a5eb86c7c4890df31f22"
+checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc"
 dependencies = [
  "hashbrown 0.14.3",
 ]
@@ -5480,7 +5470,7 @@ dependencies = [
  "macro_magic_core",
  "macro_magic_macros",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -5494,7 +5484,7 @@ dependencies = [
  "macro_magic_core_macros",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -5505,7 +5495,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -5516,7 +5506,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3"
 dependencies = [
  "macro_magic_core",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -6140,9 +6130,9 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
 
 [[package]]
 name = "opaque-debug"
-version = "0.3.0"
+version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
+checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
 
 [[package]]
 name = "openssl-probe"
@@ -6367,7 +6357,7 @@ version = "1.0.0"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -7031,7 +7021,7 @@ dependencies = [
  "pest_meta",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -7052,7 +7042,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9"
 dependencies = [
  "fixedbitset",
- "indexmap 2.2.3",
+ "indexmap 2.2.5",
 ]
 
 [[package]]
@@ -7072,7 +7062,7 @@ checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -7160,7 +7150,7 @@ dependencies = [
  "polkavm-common",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -7170,7 +7160,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "15e85319a0d5129dc9f021c62607e0804f5fb777a05cdda44d750ac0732def66"
 dependencies = [
  "polkavm-derive-impl",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -7194,7 +7184,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
 dependencies = [
  "cpufeatures",
- "opaque-debug 0.3.0",
+ "opaque-debug 0.3.1",
  "universal-hash",
 ]
 
@@ -7206,7 +7196,7 @@ checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb"
 dependencies = [
  "cfg-if",
  "cpufeatures",
- "opaque-debug 0.3.0",
+ "opaque-debug 0.3.1",
  "universal-hash",
 ]
 
@@ -7284,7 +7274,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5"
 dependencies = [
  "proc-macro2",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -7360,7 +7350,7 @@ checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -7406,7 +7396,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -7474,7 +7464,7 @@ dependencies = [
  "itertools 0.11.0",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -7633,9 +7623,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
 
 [[package]]
 name = "rayon"
-version = "1.8.1"
+version = "1.9.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051"
+checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd"
 dependencies = [
  "either",
  "rayon-core",
@@ -7709,7 +7699,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -8048,7 +8038,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792"
 dependencies = [
  "openssl-probe",
- "rustls-pemfile 2.1.0",
+ "rustls-pemfile 2.1.1",
  "rustls-pki-types",
  "schannel",
  "security-framework",
@@ -8065,9 +8055,9 @@ dependencies = [
 
 [[package]]
 name = "rustls-pemfile"
-version = "2.1.0"
+version = "2.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c333bb734fcdedcea57de1602543590f545f127dc8b533324318fd492c5c70b"
+checksum = "f48172685e6ff52a556baa527774f61fcaa884f59daf3375c62a3f1cd2549dab"
 dependencies = [
  "base64 0.21.7",
  "rustls-pki-types",
@@ -8075,9 +8065,9 @@ dependencies = [
 
 [[package]]
 name = "rustls-pki-types"
-version = "1.3.0"
+version = "1.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "048a63e5b3ac996d78d402940b5fa47973d2d080c6c6fffa1d0f19c4445310b7"
+checksum = "5ede67b28608b4c60685c7d54122d4400d90f62b40caee7700e700380a390fa8"
 
 [[package]]
 name = "rustls-webpki"
@@ -8234,7 +8224,7 @@ dependencies = [
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -8461,7 +8451,7 @@ name = "sc-consensus-grandpa"
 version = "0.19.0"
 source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.7.1#4e4e20b11be79be8ba6ade0b96e767aca0198c70"
 dependencies = [
- "ahash 0.8.8",
+ "ahash 0.8.10",
  "array-bytes 6.2.2",
  "async-trait",
  "dyn-clone",
@@ -8754,7 +8744,7 @@ name = "sc-network-gossip"
 version = "0.34.0"
 source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.7.1#4e4e20b11be79be8ba6ade0b96e767aca0198c70"
 dependencies = [
- "ahash 0.8.8",
+ "ahash 0.8.10",
  "futures 0.3.30",
  "futures-timer",
  "libp2p",
@@ -9136,7 +9126,7 @@ dependencies = [
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -9299,7 +9289,7 @@ dependencies = [
  "proc-macro2",
  "quote",
  "scale-info",
- "syn 2.0.49",
+ "syn 2.0.52",
  "thiserror",
 ]
 
@@ -9338,7 +9328,7 @@ version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d"
 dependencies = [
- "ahash 0.8.8",
+ "ahash 0.8.10",
  "cfg-if",
  "hashbrown 0.13.2",
 ]
@@ -9409,7 +9399,7 @@ dependencies = [
  "heck 0.4.1",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -9502,9 +9492,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
 
 [[package]]
 name = "serde"
-version = "1.0.196"
+version = "1.0.197"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"
+checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
 dependencies = [
  "serde_derive",
 ]
@@ -9520,20 +9510,20 @@ dependencies = [
 
 [[package]]
 name = "serde_derive"
-version = "1.0.196"
+version = "1.0.197"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
+checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
 name = "serde_json"
-version = "1.0.113"
+version = "1.0.114"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79"
+checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0"
 dependencies = [
  "itoa",
  "ryu",
@@ -9567,7 +9557,7 @@ version = "0.9.32"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f"
 dependencies = [
- "indexmap 2.2.3",
+ "indexmap 2.2.5",
  "itoa",
  "ryu",
  "serde",
@@ -9584,7 +9574,7 @@ dependencies = [
  "cfg-if",
  "cpufeatures",
  "digest 0.9.0",
- "opaque-debug 0.3.0",
+ "opaque-debug 0.3.1",
 ]
 
 [[package]]
@@ -9609,7 +9599,7 @@ dependencies = [
  "cfg-if",
  "cpufeatures",
  "digest 0.9.0",
- "opaque-debug 0.3.0",
+ "opaque-debug 0.3.1",
 ]
 
 [[package]]
@@ -9736,7 +9726,7 @@ checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -9838,7 +9828,7 @@ dependencies = [
  "hex",
  "itertools 0.12.1",
  "log",
- "lru 0.12.2",
+ "lru 0.12.3",
  "no-std-net",
  "parking_lot 0.12.1",
  "pin-project",
@@ -9888,12 +9878,12 @@ dependencies = [
 
 [[package]]
 name = "socket2"
-version = "0.5.5"
+version = "0.5.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
+checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871"
 dependencies = [
  "libc",
- "windows-sys 0.48.0",
+ "windows-sys 0.52.0",
 ]
 
 [[package]]
@@ -9945,7 +9935,7 @@ dependencies = [
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -10173,7 +10163,7 @@ dependencies = [
 [[package]]
 name = "sp-crypto-ec-utils"
 version = "0.10.0"
-source = "git+https://github.com/paritytech/polkadot-sdk#ca382f32033d8350d49934b30680d8c30dd9bdfc"
+source = "git+https://github.com/paritytech/polkadot-sdk#f0e589d72e5228472c7658c525e0ff80d122d777"
 dependencies = [
  "ark-bls12-377",
  "ark-bls12-377-ext",
@@ -10211,7 +10201,7 @@ source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-sub
 dependencies = [
  "quote",
  "sp-crypto-hashing",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -10230,17 +10220,17 @@ source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-sub
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
 name = "sp-debug-derive"
 version = "14.0.0"
-source = "git+https://github.com/paritytech/polkadot-sdk#ca382f32033d8350d49934b30680d8c30dd9bdfc"
+source = "git+https://github.com/paritytech/polkadot-sdk#f0e589d72e5228472c7658c525e0ff80d122d777"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -10272,7 +10262,7 @@ dependencies = [
 [[package]]
 name = "sp-externalities"
 version = "0.25.0"
-source = "git+https://github.com/paritytech/polkadot-sdk#ca382f32033d8350d49934b30680d8c30dd9bdfc"
+source = "git+https://github.com/paritytech/polkadot-sdk#f0e589d72e5228472c7658c525e0ff80d122d777"
 dependencies = [
  "environmental",
  "parity-scale-codec",
@@ -10481,7 +10471,7 @@ dependencies = [
 [[package]]
 name = "sp-runtime-interface"
 version = "24.0.0"
-source = "git+https://github.com/paritytech/polkadot-sdk#ca382f32033d8350d49934b30680d8c30dd9bdfc"
+source = "git+https://github.com/paritytech/polkadot-sdk#f0e589d72e5228472c7658c525e0ff80d122d777"
 dependencies = [
  "bytes",
  "impl-trait-for-tuples",
@@ -10507,20 +10497,20 @@ dependencies = [
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
 name = "sp-runtime-interface-proc-macro"
 version = "17.0.0"
-source = "git+https://github.com/paritytech/polkadot-sdk#ca382f32033d8350d49934b30680d8c30dd9bdfc"
+source = "git+https://github.com/paritytech/polkadot-sdk#f0e589d72e5228472c7658c525e0ff80d122d777"
 dependencies = [
  "Inflector",
  "expander",
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -10606,7 +10596,7 @@ source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-sub
 [[package]]
 name = "sp-std"
 version = "14.0.0"
-source = "git+https://github.com/paritytech/polkadot-sdk#ca382f32033d8350d49934b30680d8c30dd9bdfc"
+source = "git+https://github.com/paritytech/polkadot-sdk#f0e589d72e5228472c7658c525e0ff80d122d777"
 
 [[package]]
 name = "sp-storage"
@@ -10624,7 +10614,7 @@ dependencies = [
 [[package]]
 name = "sp-storage"
 version = "19.0.0"
-source = "git+https://github.com/paritytech/polkadot-sdk#ca382f32033d8350d49934b30680d8c30dd9bdfc"
+source = "git+https://github.com/paritytech/polkadot-sdk#f0e589d72e5228472c7658c525e0ff80d122d777"
 dependencies = [
  "impl-serde",
  "parity-scale-codec",
@@ -10662,7 +10652,7 @@ dependencies = [
 [[package]]
 name = "sp-tracing"
 version = "16.0.0"
-source = "git+https://github.com/paritytech/polkadot-sdk#ca382f32033d8350d49934b30680d8c30dd9bdfc"
+source = "git+https://github.com/paritytech/polkadot-sdk#f0e589d72e5228472c7658c525e0ff80d122d777"
 dependencies = [
  "parity-scale-codec",
  "sp-std 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)",
@@ -10700,7 +10690,7 @@ name = "sp-trie"
 version = "29.0.0"
 source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.7.1#4e4e20b11be79be8ba6ade0b96e767aca0198c70"
 dependencies = [
- "ahash 0.8.8",
+ "ahash 0.8.10",
  "hash-db",
  "lazy_static",
  "memory-db",
@@ -10744,7 +10734,7 @@ dependencies = [
  "parity-scale-codec",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -10763,7 +10753,7 @@ dependencies = [
 [[package]]
 name = "sp-wasm-interface"
 version = "20.0.0"
-source = "git+https://github.com/paritytech/polkadot-sdk#ca382f32033d8350d49934b30680d8c30dd9bdfc"
+source = "git+https://github.com/paritytech/polkadot-sdk#f0e589d72e5228472c7658c525e0ff80d122d777"
 dependencies = [
  "anyhow",
  "impl-trait-for-tuples",
@@ -10926,7 +10916,7 @@ dependencies = [
  "proc-macro2",
  "quote",
  "rustversion",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -11055,7 +11045,7 @@ dependencies = [
  "semver 1.0.22",
  "serde",
  "serde_json",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -11110,7 +11100,7 @@ dependencies = [
  "scale-info",
  "scale-typegen",
  "subxt-metadata",
- "syn 2.0.49",
+ "syn 2.0.52",
  "thiserror",
  "tokio",
 ]
@@ -11136,13 +11126,13 @@ name = "subxt-macro"
 version = "0.34.0"
 source = "git+https://github.com/duniter/subxt?branch=subxt-v0.34.0-duniter-substrate-v1.7.1#ff7cf1b480c9b9e4027ca21fdc82bc69cf64562b"
 dependencies = [
- "darling 0.20.6",
+ "darling 0.20.8",
  "parity-scale-codec",
  "proc-macro-error",
  "quote",
  "scale-typegen",
  "subxt-codegen",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -11170,9 +11160,9 @@ dependencies = [
 
 [[package]]
 name = "syn"
-version = "2.0.49"
+version = "2.0.52"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496"
+checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -11203,7 +11193,7 @@ version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "a3d2c2202510a1e186e63e596d9318c91a8cbe85cd1a56a7be0c333e5f59ec8d"
 dependencies = [
- "syn 2.0.49",
+ "syn 2.0.52",
  "synthez-codegen",
  "synthez-core",
 ]
@@ -11214,7 +11204,7 @@ version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f724aa6d44b7162f3158a57bccd871a77b39a4aef737e01bcdff41f4772c7746"
 dependencies = [
- "syn 2.0.49",
+ "syn 2.0.52",
  "synthez-core",
 ]
 
@@ -11227,7 +11217,7 @@ dependencies = [
  "proc-macro2",
  "quote",
  "sealed",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -11259,15 +11249,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
 
 [[package]]
 name = "target-lexicon"
-version = "0.12.13"
+version = "0.12.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae"
+checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f"
 
 [[package]]
 name = "tempfile"
-version = "3.10.0"
+version = "3.10.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67"
+checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
 dependencies = [
  "cfg-if",
  "fastrand",
@@ -11344,7 +11334,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -11355,9 +11345,9 @@ checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820"
 
 [[package]]
 name = "thread_local"
-version = "1.1.7"
+version = "1.1.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
+checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
 dependencies = [
  "cfg-if",
  "once_cell",
@@ -11451,7 +11441,7 @@ dependencies = [
  "parking_lot 0.12.1",
  "pin-project-lite 0.2.13",
  "signal-hook-registry",
- "socket2 0.5.5",
+ "socket2 0.5.6",
  "tokio-macros",
  "windows-sys 0.48.0",
 ]
@@ -11464,7 +11454,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -11562,7 +11552,7 @@ version = "0.20.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
 dependencies = [
- "indexmap 2.2.3",
+ "indexmap 2.2.5",
  "toml_datetime",
  "winnow 0.5.40",
 ]
@@ -11573,7 +11563,7 @@ version = "0.21.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
 dependencies = [
- "indexmap 2.2.3",
+ "indexmap 2.2.5",
  "toml_datetime",
  "winnow 0.5.40",
 ]
@@ -11584,11 +11574,11 @@ version = "0.22.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6"
 dependencies = [
- "indexmap 2.2.3",
+ "indexmap 2.2.5",
  "serde",
  "serde_spanned",
  "toml_datetime",
- "winnow 0.6.1",
+ "winnow 0.6.5",
 ]
 
 [[package]]
@@ -11656,7 +11646,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -11868,7 +11858,7 @@ checksum = "29a3151c41d0b13e3d011f98adc24434560ef06673a155a6c7f66b9879eecce2"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -12156,7 +12146,7 @@ dependencies = [
  "once_cell",
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
  "wasm-bindgen-shared",
 ]
 
@@ -12190,7 +12180,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
  "wasm-bindgen-backend",
  "wasm-bindgen-shared",
 ]
@@ -12633,7 +12623,7 @@ version = "0.52.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
 dependencies = [
- "windows-targets 0.52.0",
+ "windows-targets 0.52.4",
 ]
 
 [[package]]
@@ -12660,7 +12650,7 @@ version = "0.52.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
 dependencies = [
- "windows-targets 0.52.0",
+ "windows-targets 0.52.4",
 ]
 
 [[package]]
@@ -12695,17 +12685,17 @@ dependencies = [
 
 [[package]]
 name = "windows-targets"
-version = "0.52.0"
+version = "0.52.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
+checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"
 dependencies = [
- "windows_aarch64_gnullvm 0.52.0",
- "windows_aarch64_msvc 0.52.0",
- "windows_i686_gnu 0.52.0",
- "windows_i686_msvc 0.52.0",
- "windows_x86_64_gnu 0.52.0",
- "windows_x86_64_gnullvm 0.52.0",
- "windows_x86_64_msvc 0.52.0",
+ "windows_aarch64_gnullvm 0.52.4",
+ "windows_aarch64_msvc 0.52.4",
+ "windows_i686_gnu 0.52.4",
+ "windows_i686_msvc 0.52.4",
+ "windows_x86_64_gnu 0.52.4",
+ "windows_x86_64_gnullvm 0.52.4",
+ "windows_x86_64_msvc 0.52.4",
 ]
 
 [[package]]
@@ -12722,9 +12712,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
 
 [[package]]
 name = "windows_aarch64_gnullvm"
-version = "0.52.0"
+version = "0.52.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
+checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"
 
 [[package]]
 name = "windows_aarch64_msvc"
@@ -12740,9 +12730,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
 
 [[package]]
 name = "windows_aarch64_msvc"
-version = "0.52.0"
+version = "0.52.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
+checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"
 
 [[package]]
 name = "windows_i686_gnu"
@@ -12758,9 +12748,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
 
 [[package]]
 name = "windows_i686_gnu"
-version = "0.52.0"
+version = "0.52.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
+checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"
 
 [[package]]
 name = "windows_i686_msvc"
@@ -12776,9 +12766,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
 
 [[package]]
 name = "windows_i686_msvc"
-version = "0.52.0"
+version = "0.52.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
+checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"
 
 [[package]]
 name = "windows_x86_64_gnu"
@@ -12794,9 +12784,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
 
 [[package]]
 name = "windows_x86_64_gnu"
-version = "0.52.0"
+version = "0.52.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
+checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"
 
 [[package]]
 name = "windows_x86_64_gnullvm"
@@ -12812,9 +12802,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
 
 [[package]]
 name = "windows_x86_64_gnullvm"
-version = "0.52.0"
+version = "0.52.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
+checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"
 
 [[package]]
 name = "windows_x86_64_msvc"
@@ -12830,9 +12820,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
 
 [[package]]
 name = "windows_x86_64_msvc"
-version = "0.52.0"
+version = "0.52.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
+checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
 
 [[package]]
 name = "winnow"
@@ -12845,9 +12835,9 @@ dependencies = [
 
 [[package]]
 name = "winnow"
-version = "0.6.1"
+version = "0.6.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d90f4e0f530c4c69f62b80d839e9ef3855edc9cba471a160c4d692deed62b401"
+checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8"
 dependencies = [
  "memchr",
 ]
@@ -12981,7 +12971,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
@@ -13001,7 +12991,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.49",
+ "syn 2.0.52",
 ]
 
 [[package]]
diff --git a/client/distance/src/lib.rs b/client/distance/src/lib.rs
index 67e450760..a872d6fce 100644
--- a/client/distance/src/lib.rs
+++ b/client/distance/src/lib.rs
@@ -48,11 +48,11 @@ where
     };
     let owner_key = sp_runtime::AccountId32::new(owner_key.0);
 
-    let session_index = client
+    let pool_index = client
         .storage(
             parent,
             &StorageKey(
-                frame_support::storage::storage_prefix(b"Session", b"CurrentIndex").to_vec(),
+                frame_support::storage::storage_prefix(b"Distance", b"CurrentPoolIndex").to_vec(),
             ),
         )
         .expect("CurrentIndex is Err")
@@ -66,11 +66,11 @@ where
             &StorageKey(
                 frame_support::storage::storage_prefix(
                     b"Distance",
-                    match session_index % 3 {
-                        0 => b"StoragePublishedResults1",
-                        1 => b"StoragePublishedResults2",
-                        2 => b"StoragePublishedResults0",
-                        _ => unreachable!("n%3<3"),
+                    match pool_index {
+                        0 => b"EvaluationPool0",
+                        1 => b"EvaluationPool1",
+                        2 => b"EvaluationPool2",
+                        _ => unreachable!("n<3"),
                     },
                 )
                 .to_vec(),
@@ -81,18 +81,18 @@ where
                 .expect("cannot decode EvaluationPool")
         });
 
-    // Have we already published a result for this session?
+    // Have we already published a result for this period?
     if published_results.evaluators.contains(&owner_key) {
-        log::debug!("🧙 [distance oracle] Already published a result for this session");
+        log::debug!("🧙 [distance oracle] Already published a result for this period");
         return Ok(sp_distance::InherentDataProvider::<IdtyIndex>::new(None));
     }
 
     // Read evaluation result from file, if it exists
     log::debug!(
         "🧙 [distance oracle] Reading evaluation result from file {:?}",
-        distance_dir.clone().join(session_index.to_string())
+        distance_dir.clone().join(pool_index.to_string())
     );
-    let evaluation_result = match std::fs::read(distance_dir.join(session_index.to_string())) {
+    let evaluation_result = match std::fs::read(distance_dir.join(pool_index.to_string())) {
         Ok(data) => data,
         Err(e) => {
             match e.kind() {
diff --git a/distance-oracle/src/api.rs b/distance-oracle/src/api.rs
index fae73cdd7..db6f48911 100644
--- a/distance-oracle/src/api.rs
+++ b/distance-oracle/src/api.rs
@@ -40,38 +40,38 @@ pub async fn parent_hash(client: &Client) -> H256 {
         .hash()
 }
 
-pub async fn current_session(client: &Client, parent_hash: H256) -> u32 {
+pub async fn current_pool_index(client: &Client, parent_hash: H256) -> u32 {
     client
         .storage()
         .at(parent_hash)
-        .fetch(&runtime::storage().session().current_index())
+        .fetch(&runtime::storage().distance().current_pool_index())
         .await
-        .expect("Cannot fetch current session")
+        .expect("Cannot fetch current pool index")
         .unwrap_or_default()
 }
 
 pub async fn current_pool(
     client: &Client,
     parent_hash: H256,
-    current_session: u32,
+    current_pool_index: u32,
 ) -> Option<runtime::runtime_types::pallet_distance::types::EvaluationPool<AccountId, IdtyIndex>> {
     client
         .storage()
         .at(parent_hash)
-        .fetch(&match current_session % 3 {
+        .fetch(&match current_pool_index {
             0 => {
-                debug!("Looking at Pool1 for session {}", current_session);
+                debug!("Looking at Pool1 for pool index {}", current_pool_index);
                 runtime::storage().distance().evaluation_pool1()
             }
             1 => {
-                debug!("Looking at Pool2 for session {}", current_session);
+                debug!("Looking at Pool2 for pool index {}", current_pool_index);
                 runtime::storage().distance().evaluation_pool2()
             }
             2 => {
-                debug!("Looking at Pool0 for session {}", current_session);
+                debug!("Looking at Pool0 for pool index {}", current_pool_index);
                 runtime::storage().distance().evaluation_pool0()
             }
-            _ => unreachable!("n%3<3"),
+            _ => unreachable!("n<3"),
         })
         .await
         .expect("Cannot fetch current pool")
diff --git a/distance-oracle/src/lib.rs b/distance-oracle/src/lib.rs
index 955759efd..c59d89b7c 100644
--- a/distance-oracle/src/lib.rs
+++ b/distance-oracle/src/lib.rs
@@ -84,7 +84,7 @@ impl Default for Settings {
 }
 
 pub async fn run_and_save(client: &api::Client, settings: Settings) {
-    let Some((evaluation, current_session, evaluation_result_path)) =
+    let Some((evaluation, current_pool_index, evaluation_result_path)) =
         run(client, &settings, true).await
     else {
         return;
@@ -127,8 +127,8 @@ pub async fn run_and_save(client: &api::Client, settings: Settings) {
         .flatten()
     {
         if let Ok(entry_name) = entry.file_name().into_string() {
-            if let Ok(entry_session) = entry_name.parse::<isize>() {
-                if current_session as isize - entry_session > 3 {
+            if let Ok(entry_pool) = entry_name.parse::<isize>() {
+                if current_pool_index as isize - entry_pool > 3 {
                     files_to_remove.push(entry.path());
                 }
             }
@@ -140,7 +140,7 @@ pub async fn run_and_save(client: &api::Client, settings: Settings) {
     });
 }
 
-/// Returns `Option<(evaluation, current_session, evaluation_result_path)>`
+/// Returns `Option<(evaluation, current_pool_index, evaluation_result_path)>`
 pub async fn run(
     client: &api::Client,
     settings: &Settings,
@@ -150,10 +150,10 @@ pub async fn run(
 
     let max_depth = api::max_referee_distance(client).await;
 
-    let current_session = api::current_session(client, parent_hash).await;
+    let current_pool_index = api::current_pool_index(client, parent_hash).await;
 
     // Fetch the pending identities
-    let Some(evaluation_pool) = api::current_pool(client, parent_hash, current_session).await
+    let Some(evaluation_pool) = api::current_pool(client, parent_hash, current_pool_index).await
     else {
         info!("Nothing to do: Pool does not exist");
         return None;
@@ -167,7 +167,7 @@ pub async fn run(
 
     let evaluation_result_path = settings
         .evaluation_result_dir
-        .join((current_session + 1).to_string());
+        .join((current_pool_index + 1).to_string());
 
     if handle_fs {
         // Stop if already evaluated
@@ -187,7 +187,7 @@ pub async fn run(
         });
     }
 
-    info!("Evaluating distance for session {}", current_session);
+    info!("Evaluating distance for pool {}", current_pool_index);
     let evaluation_block = api::evaluation_block(client, parent_hash).await;
 
     // member idty -> issued certs
@@ -243,7 +243,7 @@ pub async fn run(
         .map(|(idty, _)| distance_rule(&received_certs, &referees, max_depth, *idty))
         .collect();
 
-    Some((evaluation, current_session, evaluation_result_path))
+    Some((evaluation, current_pool_index, evaluation_result_path))
 }
 
 fn distance_rule_recursive(
diff --git a/distance-oracle/src/mock.rs b/distance-oracle/src/mock.rs
index 805ac607b..56e5f98bc 100644
--- a/distance-oracle/src/mock.rs
+++ b/distance-oracle/src/mock.rs
@@ -46,7 +46,7 @@ pub async fn parent_hash(_client: &Client) -> H256 {
     Default::default()
 }
 
-pub async fn current_session(_client: &Client, _parent_hash: H256) -> u32 {
+pub async fn current_pool_index(_client: &Client, _parent_hash: H256) -> u32 {
     0
 }
 
diff --git a/end2end-tests/cucumber-features/identity_creation.feature b/end2end-tests/cucumber-features/identity_creation.feature
index 7de97f182..b4d321ddd 100644
--- a/end2end-tests/cucumber-features/identity_creation.feature
+++ b/end2end-tests/cucumber-features/identity_creation.feature
@@ -24,9 +24,9 @@ Feature: Identity creation
     Then dave should be certified by bob
     Then dave should be certified by charlie
     When dave requests distance evaluation
-    Then dave should have distance result in 2 sessions
-    When 30 blocks later
-    Then dave should have distance result in 1 session
+    Then dave should have distance result in 2 periods
+    When 14 blocks later
+    Then dave should have distance result in 1 period
     When alice runs distance oracle
-    When 30 blocks later
+    When 7 blocks later
     Then dave identity should be member
diff --git a/pallets/distance/README.md b/pallets/distance/README.md
index 7b34661e1..d34bdb646 100644
--- a/pallets/distance/README.md
+++ b/pallets/distance/README.md
@@ -6,14 +6,14 @@ The pallet then selects the median of the results (reach perbill) of an evaluati
 The status of an identity can be:
 
 - inexistant: distance evaluation has not been requested or has expired
-- pending: distance evaluation for this identity has been requested and is waiting two sessions for results
+- pending: distance evaluation for this identity has been requested and is waiting two evaluation periods for results
 - valid: distance has been evaluated positively for this identity
 
-The result of the evaluation is used by `duniter-wot` pallet to determine if an identity can get / should loose membership to the web of trust. 
+The result of the evaluation is used by `duniter-wot` pallet to determine if an identity can get / should loose membership to the web of trust.
 
 ## Process
 
-Any account can request a distance evaluation for a given identity provided it has enough currency to be reserved. In this case, the distance status is marked as pending and in the next session, inherents can start to publish results. 
+Any account can request a distance evaluation for a given identity provided it has enough currency to be reserved. In this case, the distance status is marked as pending and in the next evaluation period, inherents can start to publish results.
 
 This is how a result is published:
 
@@ -23,10 +23,10 @@ This is how a result is published:
 1. the result is added to the current evaluation pool
 1. a flag is set to prevent other distance evaluation in the same block
 
-On each new session:
+On each new evaluation period:
 
-1. old results set to expire at this session do expire
-1. results from the current pool (previous session's result pool) are taken and for each identity
+1. old results set to expire at this period do expire
+1. results from the current pool (previous period's result pool) are taken and for each identity
     - the median of the distance results for this identity is chosen
     - if the distance is ok, the distance is marked as valid
     - if the distance is ko, the result for this identity is removed and reserved currency is slashed (from the account which requested the evaluation)
@@ -40,8 +40,8 @@ Evaluation pools are made of two components:
 - a set of evaluators
 - a vec of results
 
-The evaluation are separated in three pools (N - 2 is the session index):
+The evaluation are separated in three pools:
 
-- pool number N - 1 % 3: results from the previous session used in the current one (let empty for next session)
+- pool number N - 1 % 3: results from the previous evaluation period used in the current one (let empty for next evaluation period)
 - pool number N + 0 % 3: inherent results are added there
-- pool number N + 1 % 3: identities are added there for evaluation
\ No newline at end of file
+- pool number N + 1 % 3: identities are added there for evaluation
diff --git a/pallets/distance/src/benchmarking.rs b/pallets/distance/src/benchmarking.rs
index 0e888c826..7b8d7c850 100644
--- a/pallets/distance/src/benchmarking.rs
+++ b/pallets/distance/src/benchmarking.rs
@@ -20,6 +20,8 @@ use super::*;
 
 use codec::Encode;
 use frame_benchmarking::v2::*;
+use frame_support::traits::Get;
+use frame_support::traits::OnInitialize;
 use frame_support::traits::{Currency, OnFinalize};
 use frame_system::pallet_prelude::BlockNumberFor;
 use frame_system::RawOrigin;
@@ -164,6 +166,103 @@ mod benchmarks {
         assert_has_event::<T>(Event::<T>::EvaluatedValid { idty_index: idty }.into());
     }
 
+    #[benchmark]
+    fn on_initialize_overhead() {
+        // Benchmark on_initialize with no on_finalize and no do_evaluation.
+        let block_number: BlockNumberFor<T> = (T::EvaluationPeriod::get() + 1).into();
+
+        #[block]
+        {
+            Pallet::<T>::on_initialize(block_number);
+        }
+    }
+
+    #[benchmark]
+    fn do_evaluation_success() -> Result<(), BenchmarkError> {
+        // Benchmarking do_evaluation in case of a single success.
+        CurrentPoolIndex::<T>::put(0);
+        frame_system::pallet::Pallet::<T>::set_block_number(1u32.into());
+        let idty = T::IdtyIndex::one();
+        let caller: T::AccountId = pallet_identity::Identities::<T>::get(idty)
+            .unwrap()
+            .owner_key;
+        let _ =
+            <Balances<T> as Currency<_>>::make_free_balance_be(&caller, T::Balance::max_value());
+        Pallet::<T>::request_distance_evaluation(RawOrigin::Signed(caller.clone()).into())?;
+        assert_has_event::<T>(
+            Event::<T>::EvaluationRequested {
+                idty_index: idty,
+                who: caller.clone(),
+            }
+            .into(),
+        );
+
+        CurrentPoolIndex::<T>::put(2);
+        Pallet::<T>::force_update_evaluation(
+            RawOrigin::Root.into(),
+            caller,
+            ComputationResult {
+                distances: vec![Perbill::one()],
+            },
+        )?;
+
+        #[block]
+        {
+            Pallet::<T>::do_evaluation(0);
+        }
+
+        assert_has_event::<T>(Event::<T>::EvaluatedValid { idty_index: idty }.into());
+        Ok(())
+    }
+
+    #[benchmark]
+    fn do_evaluation_failure() -> Result<(), BenchmarkError> {
+        // Benchmarking do_evaluation in case of a single failure.
+        CurrentPoolIndex::<T>::put(0);
+        frame_system::pallet::Pallet::<T>::set_block_number(1u32.into());
+        let idty = T::IdtyIndex::one();
+        let caller: T::AccountId = pallet_identity::Identities::<T>::get(idty)
+            .unwrap()
+            .owner_key;
+        let _ =
+            <Balances<T> as Currency<_>>::make_free_balance_be(&caller, T::Balance::max_value());
+        Pallet::<T>::request_distance_evaluation(RawOrigin::Signed(caller.clone()).into())?;
+        assert_has_event::<T>(
+            Event::<T>::EvaluationRequested {
+                idty_index: idty,
+                who: caller.clone(),
+            }
+            .into(),
+        );
+
+        CurrentPoolIndex::<T>::put(2);
+        Pallet::<T>::force_update_evaluation(
+            RawOrigin::Root.into(),
+            caller,
+            ComputationResult {
+                distances: vec![Perbill::zero()],
+            },
+        )?;
+
+        #[block]
+        {
+            Pallet::<T>::do_evaluation(0);
+        }
+
+        assert_has_event::<T>(Event::<T>::EvaluatedInvalid { idty_index: idty }.into());
+        Ok(())
+    }
+
+    #[benchmark]
+    fn do_evaluation_overhead() -> Result<(), BenchmarkError> {
+        #[block]
+        {
+            Pallet::<T>::do_evaluation(0);
+        }
+
+        Ok(())
+    }
+
     #[benchmark]
     fn on_finalize() {
         DidUpdate::<T>::set(true);
diff --git a/pallets/distance/src/lib.rs b/pallets/distance/src/lib.rs
index 4860ff4b4..f42651850 100644
--- a/pallets/distance/src/lib.rs
+++ b/pallets/distance/src/lib.rs
@@ -35,17 +35,19 @@ pub use types::*;
 pub use weights::WeightInfo;
 
 use frame_support::traits::StorageVersion;
-use pallet_authority_members::SessionIndex;
 use sp_distance::{InherentError, INHERENT_IDENTIFIER};
 use sp_inherents::{InherentData, InherentIdentifier};
+use sp_runtime::traits::One;
+use sp_runtime::traits::Zero;
+use sp_runtime::Saturating;
 use sp_std::convert::TryInto;
 use sp_std::prelude::*;
 
 type IdtyIndex = u32;
 
-/// Maximum number of identities to be evaluated in a session
-pub const MAX_EVALUATIONS_PER_SESSION: u32 = 600;
-/// Maximum number of evaluators in a session
+/// Maximum number of identities to be evaluated in an evaluation period.
+pub const MAX_EVALUATIONS_PER_SESSION: u32 = 1_300; // See https://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/252
+/// Maximum number of evaluators in an evaluation period.
 pub const MAX_EVALUATORS_PER_SESSION: u32 = 100;
 
 #[frame_support::pallet()]
@@ -67,7 +69,6 @@ pub mod pallet {
         frame_system::Config
         + pallet_authorship::Config
         + pallet_identity::Config<IdtyIndex = IdtyIndex>
-        + pallet_session::Config
     {
         /// Currency type used in this pallet (used for reserve/slash)
         type Currency: ReservableCurrency<Self::AccountId>;
@@ -76,6 +77,11 @@ pub mod pallet {
         type EvaluationPrice: Get<
             <Self::Currency as frame_support::traits::Currency<Self::AccountId>>::Balance,
         >;
+        /// Evaluation period number of blocks.
+        /// As the evaluation is done using 3 pools,
+        /// the evaluation will take 3 * EvaluationPeriod.
+        #[pallet::constant]
+        type EvaluationPeriod: Get<u32>;
         /// Maximum distance used to define referee's accessibility
         /// Unused by runtime but needed by client distance oracle
         #[pallet::constant]
@@ -152,12 +158,10 @@ pub mod pallet {
     #[pallet::storage]
     pub(super) type DidUpdate<T: Config> = StorageValue<_, bool, ValueQuery>;
 
-    // session_index % 3:
-    //   storage_id + 0 => pending
-    //   storage_id + 1 => receives results
-    //   storage_id + 2 => receives new identities
-    // (this avoids problems for session_index < 3)
-    //
+    /// Current evaluation pool.
+    #[pallet::storage]
+    #[pallet::getter(fn current_pool_index)]
+    pub(super) type CurrentPoolIndex<T: Config> = StorageValue<_, u32, ValueQuery>;
 
     #[pallet::event]
     #[pallet::generate_deposit(pub(super) fn deposit_event)]
@@ -207,16 +211,23 @@ pub mod pallet {
 
     #[pallet::hooks]
     impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
-        /// dummy `on_initialize` to return the weight used in `on_finalize`.
-        fn on_initialize(_n: BlockNumberFor<T>) -> Weight {
-            // weight of `on_finalize`
-            <T as pallet::Config>::WeightInfo::on_finalize()
+        fn on_initialize(block: BlockNumberFor<T>) -> Weight
+        where
+            BlockNumberFor<T>: From<u32>,
+        {
+            let mut weight = <T as pallet::Config>::WeightInfo::on_initialize_overhead();
+            if block % BlockNumberFor::<T>::one().saturating_mul(T::EvaluationPeriod::get().into())
+                == BlockNumberFor::<T>::zero()
+            {
+                let index = (CurrentPoolIndex::<T>::get() + 1) % 3;
+                CurrentPoolIndex::<T>::put(index);
+                weight = weight
+                    .saturating_add(Self::do_evaluation(index))
+                    .saturating_add(T::DbWeight::get().reads_writes(1, 1));
+            }
+            weight.saturating_add(<T as pallet::Config>::WeightInfo::on_finalize())
         }
 
-        /// # <weight>
-        /// - `O(1)`
-        /// - 1 storage deletion (codec `O(1)`).
-        /// # </weight>
         fn on_finalize(_n: BlockNumberFor<T>) {
             DidUpdate::<T>::take();
         }
@@ -311,8 +322,8 @@ pub mod pallet {
 
     impl<T: Config> Pallet<T> {
         /// Mutate the evaluation pool containing:
-        /// * when this session begins: the evaluation results to be applied
-        /// * when this session ends: the evaluation requests
+        /// * when this period begins: the evaluation results to be applied.
+        /// * when this period ends: the evaluation requests.
         fn mutate_current_pool<
             R,
             F: FnOnce(
@@ -322,18 +333,18 @@ pub mod pallet {
                 >,
             ) -> R,
         >(
-            index: SessionIndex,
+            index: u32,
             f: F,
         ) -> R {
-            match index % 3 {
+            match index {
                 0 => EvaluationPool2::<T>::mutate(f),
                 1 => EvaluationPool0::<T>::mutate(f),
                 2 => EvaluationPool1::<T>::mutate(f),
-                _ => unreachable!("index % 3 < 3"),
+                _ => unreachable!("index < 3"),
             }
         }
 
-        /// Mutate the evaluation pool containing the results sent by evaluators on this session.
+        /// Mutate the evaluation pool containing the results sent by evaluators on this period.
         fn mutate_next_pool<
             R,
             F: FnOnce(
@@ -343,28 +354,28 @@ pub mod pallet {
                 >,
             ) -> R,
         >(
-            index: SessionIndex,
+            index: u32,
             f: F,
         ) -> R {
-            match index % 3 {
+            match index {
                 0 => EvaluationPool0::<T>::mutate(f),
                 1 => EvaluationPool1::<T>::mutate(f),
                 2 => EvaluationPool2::<T>::mutate(f),
-                _ => unreachable!("index % 3 < 3"),
+                _ => unreachable!("index < 3"),
             }
         }
 
         /// Take (and leave empty) the evaluation pool containing:
-        /// * when this session begins: the evaluation results to be applied
-        /// * when this session ends: the evaluation requests
+        /// * when this period begins: the evaluation results to be applied.
+        /// * when this period ends: the evaluation requests.
         #[allow(clippy::type_complexity)]
         fn take_current_pool(
-            index: SessionIndex,
+            index: u32,
         ) -> EvaluationPool<
             <T as frame_system::Config>::AccountId,
             <T as pallet_identity::Config>::IdtyIndex,
         > {
-            match index % 3 {
+            match index {
                 0 => EvaluationPool2::<T>::take(),
                 1 => EvaluationPool0::<T>::take(),
                 2 => EvaluationPool1::<T>::take(),
@@ -439,31 +450,28 @@ pub mod pallet {
             who: &T::AccountId,
             idty_index: <T as pallet_identity::Config>::IdtyIndex,
         ) -> Result<(), DispatchError> {
-            Pallet::<T>::mutate_current_pool(
-                pallet_session::CurrentIndex::<T>::get(),
-                |current_pool| {
-                    // extrinsics are transactional by default, this check might not be needed
-                    ensure!(
-                        current_pool.evaluations.len() < (MAX_EVALUATIONS_PER_SESSION as usize),
-                        Error::<T>::QueueFull
-                    );
-
-                    T::Currency::reserve(who, <T as Config>::EvaluationPrice::get())?;
-
-                    current_pool
-                        .evaluations
-                        .try_push((idty_index, median::MedianAcc::new()))
-                        .map_err(|_| Error::<T>::QueueFull)?;
-
-                    PendingEvaluationRequest::<T>::insert(idty_index, who);
-
-                    Self::deposit_event(Event::EvaluationRequested {
-                        idty_index,
-                        who: who.clone(),
-                    });
-                    Ok(())
-                },
-            )
+            Pallet::<T>::mutate_current_pool(CurrentPoolIndex::<T>::get(), |current_pool| {
+                // extrinsics are transactional by default, this check might not be needed
+                ensure!(
+                    current_pool.evaluations.len() < (MAX_EVALUATIONS_PER_SESSION as usize),
+                    Error::<T>::QueueFull
+                );
+
+                T::Currency::reserve(who, <T as Config>::EvaluationPrice::get())?;
+
+                current_pool
+                    .evaluations
+                    .try_push((idty_index, median::MedianAcc::new()))
+                    .map_err(|_| Error::<T>::QueueFull)?;
+
+                PendingEvaluationRequest::<T>::insert(idty_index, who);
+
+                Self::deposit_event(Event::EvaluationRequested {
+                    idty_index,
+                    who: who.clone(),
+                });
+                Ok(())
+            })
         }
 
         /// update distance evaluation in next pool
@@ -471,7 +479,7 @@ pub mod pallet {
             evaluator: <T as frame_system::Config>::AccountId,
             computation_result: ComputationResult,
         ) -> DispatchResult {
-            Pallet::<T>::mutate_next_pool(pallet_session::CurrentIndex::<T>::get(), |result_pool| {
+            Pallet::<T>::mutate_next_pool(CurrentPoolIndex::<T>::get(), |result_pool| {
                 // evaluation must be provided for all identities (no more, no less)
                 ensure!(
                     computation_result.distances.len() == result_pool.evaluations.len(),
@@ -507,20 +515,20 @@ pub mod pallet {
             // deposit event
             Self::deposit_event(Event::EvaluatedValid { idty_index: idty });
         }
-    }
 
-    impl<T: Config> pallet_authority_members::OnNewSession for Pallet<T> {
-        fn on_new_session(index: SessionIndex) {
+        pub fn do_evaluation(index: u32) -> Weight {
+            let mut weight = <T as pallet::Config>::WeightInfo::do_evaluation_overhead();
             // set evaluation block
             EvaluationBlock::<T>::set(frame_system::Pallet::<T>::parent_hash());
 
-            // Apply the results from the current pool (which was previous session's result pool)
-            // We take the results so the pool is left empty for the new session.
+            // Apply the results from the current pool (which was previous period's result pool)
+            // We take the results so the pool is left empty for the new period.
             #[allow(clippy::type_complexity)]
             let current_pool: EvaluationPool<
                 <T as frame_system::Config>::AccountId,
                 <T as pallet_identity::Config>::IdtyIndex,
             > = Pallet::<T>::take_current_pool(index);
+
             for (idty, median_acc) in current_pool.evaluations.into_iter() {
                 // distance result
                 let mut distance_result: Option<bool> = None;
@@ -536,6 +544,7 @@ pub mod pallet {
                 }
 
                 // take requester and perform unreserve or slash
+
                 if let Some(requester) = PendingEvaluationRequest::<T>::take(idty) {
                     match distance_result {
                         None => {
@@ -544,6 +553,12 @@ pub mod pallet {
                                 &requester,
                                 <T as Config>::EvaluationPrice::get(),
                             );
+                            weight = weight.saturating_add(
+                                <T as pallet::Config>::WeightInfo::do_evaluation_failure()
+                                    .saturating_sub(
+                                        <T as pallet::Config>::WeightInfo::do_evaluation_overhead(),
+                                    ),
+                            );
                         }
                         Some(true) => {
                             // positive result, unreserve and apply
@@ -552,6 +567,12 @@ pub mod pallet {
                                 <T as Config>::EvaluationPrice::get(),
                             );
                             Self::do_valid_distance_status(idty);
+                            weight = weight.saturating_add(
+                                <T as pallet::Config>::WeightInfo::do_evaluation_success()
+                                    .saturating_sub(
+                                        <T as pallet::Config>::WeightInfo::do_evaluation_overhead(),
+                                    ),
+                            );
                         }
                         Some(false) => {
                             // negative result, slash and deposit event
@@ -560,11 +581,18 @@ pub mod pallet {
                                 <T as Config>::EvaluationPrice::get(),
                             );
                             Self::deposit_event(Event::EvaluatedInvalid { idty_index: idty });
+                            weight = weight.saturating_add(
+                                <T as pallet::Config>::WeightInfo::do_evaluation_failure()
+                                    .saturating_sub(
+                                        <T as pallet::Config>::WeightInfo::do_evaluation_overhead(),
+                                    ),
+                            );
                         }
                     }
                 }
                 // if evaluation happened without request, it's ok to do nothing
             }
+            weight
         }
     }
 
diff --git a/pallets/distance/src/mock.rs b/pallets/distance/src/mock.rs
index 5c6680529..b880b29cf 100644
--- a/pallets/distance/src/mock.rs
+++ b/pallets/distance/src/mock.rs
@@ -250,6 +250,7 @@ parameter_types! {
 impl pallet_distance::Config for Test {
     type CheckRequestDistanceEvaluation = ();
     type Currency = Balances;
+    type EvaluationPeriod = frame_support::traits::ConstU32<300>;
     type EvaluationPrice = frame_support::traits::ConstU64<1000>;
     type MaxRefereeDistance = frame_support::traits::ConstU32<5>;
     type MinAccessibleReferees = MinAccessibleReferees;
diff --git a/pallets/distance/src/weights.rs b/pallets/distance/src/weights.rs
index 0e8f34c45..93b5a5aae 100644
--- a/pallets/distance/src/weights.rs
+++ b/pallets/distance/src/weights.rs
@@ -24,6 +24,10 @@ pub trait WeightInfo {
     fn update_evaluation(i: u32) -> Weight;
     fn force_update_evaluation(i: u32) -> Weight;
     fn force_valid_distance_status() -> Weight;
+    fn on_initialize_overhead() -> Weight;
+    fn do_evaluation_overhead() -> Weight;
+    fn do_evaluation_success() -> Weight;
+    fn do_evaluation_failure() -> Weight;
     fn on_finalize() -> Weight;
 }
 
@@ -90,6 +94,53 @@ impl WeightInfo for () {
             .saturating_add(RocksDbWeight::get().writes(5))
     }
 
+    fn do_evaluation_success() -> Weight {
+        // Proof Size summary in bytes:
+        //  Measured:  `612 + i * (10 ±0)`
+        //  Estimated: `2095 + i * (10 ±0)`
+        // Minimum execution time: 208_812_000 picoseconds.
+        Weight::from_parts(257_150_521, 0)
+            .saturating_add(Weight::from_parts(0, 2095))
+            // Standard Error: 53_366
+            .saturating_add(RocksDbWeight::get().reads(2))
+            .saturating_add(RocksDbWeight::get().writes(1))
+    }
+
+    fn do_evaluation_failure() -> Weight {
+        // Proof Size summary in bytes:
+        //  Measured:  `612 + i * (10 ±0)`
+        //  Estimated: `2095 + i * (10 ±0)`
+        // Minimum execution time: 208_812_000 picoseconds.
+        Weight::from_parts(257_150_521, 0)
+            .saturating_add(Weight::from_parts(0, 2095))
+            // Standard Error: 53_366
+            .saturating_add(RocksDbWeight::get().reads(2))
+            .saturating_add(RocksDbWeight::get().writes(1))
+    }
+
+    fn do_evaluation_overhead() -> Weight {
+        // Proof Size summary in bytes:
+        //  Measured:  `612 + i * (10 ±0)`
+        //  Estimated: `2095 + i * (10 ±0)`
+        // Minimum execution time: 208_812_000 picoseconds.
+        Weight::from_parts(257_150_521, 0)
+            .saturating_add(Weight::from_parts(0, 2095))
+            // Standard Error: 53_366
+            .saturating_add(RocksDbWeight::get().reads(2))
+            .saturating_add(RocksDbWeight::get().writes(1))
+    }
+
+    fn on_initialize_overhead() -> Weight {
+        // Proof Size summary in bytes:
+        //  Measured:  `170`
+        //  Estimated: `1655`
+        // Minimum execution time: 93_595_000 picoseconds.
+        Weight::from_parts(109_467_000, 0)
+            .saturating_add(Weight::from_parts(0, 1655))
+            .saturating_add(RocksDbWeight::get().reads(1))
+            .saturating_add(RocksDbWeight::get().writes(1))
+    }
+
     fn on_finalize() -> Weight {
         // Proof Size summary in bytes:
         //  Measured:  `170`
diff --git a/resources/metadata.scale b/resources/metadata.scale
index 3a3014a0e8ac3ac91e1a54a347dd02542a7dd7ef..04cbfdcbc3db8e91ae5459cbd96c5ef56cd23c50 100644
GIT binary patch
delta 243
zcmaF%iEZN-wuUW?#Vw37+e=y)?U}3{oJ)&}Qu9gz^7C^%^HNeP7#Rcv7=VB!MFA?M
zkXn|QQ<_+knV+Xn092;OxR8lalTl#$t~N%ydIwjyY(Q#JW`2r*06S1S&jba8ghByW
zMj@{>Hz~D9AwNwaDJMTUyI60Df@85lNk%HN6`92fDfxM+3Z=!FdFcwqU@MDt_Mj^(
c&&<hDC`pvaP6evbLb43v3cc+=+8FbU0B7k`LI3~&

delta 38
ucmdn^h3(lVwuUW?#Vw2y+e=y)?U~pa7cwzwGV)A+*T!hK{ct;Do)G{bv<;2`

diff --git a/runtime/common/src/handlers.rs b/runtime/common/src/handlers.rs
index f72a59a3c..35d8b8712 100644
--- a/runtime/common/src/handlers.rs
+++ b/runtime/common/src/handlers.rs
@@ -24,12 +24,10 @@ use pallet_smith_members::SmithRemovalReason;
 pub struct OnNewSessionHandler<Runtime>(core::marker::PhantomData<Runtime>);
 impl<Runtime> pallet_authority_members::traits::OnNewSession for OnNewSessionHandler<Runtime>
 where
-    Runtime:
-        pallet_provide_randomness::Config + pallet_distance::Config + pallet_smith_members::Config,
+    Runtime: pallet_provide_randomness::Config + pallet_smith_members::Config,
 {
     fn on_new_session(index: sp_staking::SessionIndex) {
         pallet_provide_randomness::Pallet::<Runtime>::on_new_epoch();
-        pallet_distance::Pallet::<Runtime>::on_new_session(index);
         pallet_smith_members::Pallet::<Runtime>::on_new_session(index);
     }
 }
diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs
index 154025005..f2a89104c 100644
--- a/runtime/common/src/pallets_config.rs
+++ b/runtime/common/src/pallets_config.rs
@@ -524,6 +524,7 @@ type RuntimeFreezeReason = ();
         }
         impl pallet_distance::Config for Runtime {
             type Currency = Balances;
+            type EvaluationPeriod = frame_support::traits::ConstU32<7>;
             type EvaluationPrice = frame_support::traits::ConstU64<1000>;
             type MaxRefereeDistance = frame_support::traits::ConstU32<5>;
             type MinAccessibleReferees = MinAccessibleReferees;
diff --git a/runtime/common/src/weights/pallet_distance.rs b/runtime/common/src/weights/pallet_distance.rs
index 2f288d8fc..4637ced54 100644
--- a/runtime/common/src/weights/pallet_distance.rs
+++ b/runtime/common/src/weights/pallet_distance.rs
@@ -17,7 +17,7 @@
 //! Autogenerated weights for `pallet_distance`
 //!
 //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
-//! DATE: 2024-02-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! DATE: 2024-03-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
 //! WORST CASE MAP SIZE: `1000000`
 //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F`
 //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024
@@ -29,7 +29,7 @@
 // --chain=dev
 // --steps=50
 // --repeat=20
-// --pallet=*
+// --pallet=pallet_distance
 // --extrinsic=*
 // --wasm-execution=compiled
 // --heap-pages=4096
@@ -59,19 +59,19 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> {
 	/// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
 	/// Storage: `Certification::StorageIdtyCertMeta` (r:1 w:0)
 	/// Proof: `Certification::StorageIdtyCertMeta` (`max_values`: None, `max_size`: None, mode: `Measured`)
-	/// Storage: `Session::CurrentIndex` (r:1 w:0)
-	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+	/// Storage: `Distance::CurrentPoolIndex` (r:1 w:0)
+	/// Proof: `Distance::CurrentPoolIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
 	/// Storage: `Distance::EvaluationPool2` (r:1 w:1)
 	/// Proof: `Distance::EvaluationPool2` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
 	/// Storage: `System::Account` (r:1 w:1)
 	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
 	fn request_distance_evaluation() -> Weight {
 		// Proof Size summary in bytes:
-		//  Measured:  `1596`
-		//  Estimated: `5061`
-		// Minimum execution time: 39_987_000 picoseconds.
-		Weight::from_parts(41_680_000, 0)
-			.saturating_add(Weight::from_parts(0, 5061))
+		//  Measured:  `1119`
+		//  Estimated: `4584`
+		// Minimum execution time: 42_189_000 picoseconds.
+		Weight::from_parts(43_730_000, 0)
+			.saturating_add(Weight::from_parts(0, 4584))
 			.saturating_add(T::DbWeight::get().reads(9))
 			.saturating_add(T::DbWeight::get().writes(3))
 	}
@@ -87,19 +87,19 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> {
 	/// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
 	/// Storage: `Certification::StorageIdtyCertMeta` (r:1 w:0)
 	/// Proof: `Certification::StorageIdtyCertMeta` (`max_values`: None, `max_size`: None, mode: `Measured`)
-	/// Storage: `Session::CurrentIndex` (r:1 w:0)
-	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+	/// Storage: `Distance::CurrentPoolIndex` (r:1 w:0)
+	/// Proof: `Distance::CurrentPoolIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
 	/// Storage: `Distance::EvaluationPool2` (r:1 w:1)
 	/// Proof: `Distance::EvaluationPool2` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
 	/// Storage: `System::Account` (r:1 w:1)
 	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
 	fn request_distance_evaluation_for() -> Weight {
 		// Proof Size summary in bytes:
-		//  Measured:  `1625`
-		//  Estimated: `7565`
-		// Minimum execution time: 43_537_000 picoseconds.
-		Weight::from_parts(45_197_000, 0)
-			.saturating_add(Weight::from_parts(0, 7565))
+		//  Measured:  `1148`
+		//  Estimated: `7088`
+		// Minimum execution time: 44_518_000 picoseconds.
+		Weight::from_parts(45_839_000, 0)
+			.saturating_add(Weight::from_parts(0, 7088))
 			.saturating_add(T::DbWeight::get().reads(10))
 			.saturating_add(T::DbWeight::get().writes(3))
 	}
@@ -111,38 +111,38 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> {
 	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
 	/// Storage: `Session::Validators` (r:1 w:0)
 	/// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
-	/// Storage: `Session::CurrentIndex` (r:1 w:0)
-	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+	/// Storage: `Distance::CurrentPoolIndex` (r:1 w:0)
+	/// Proof: `Distance::CurrentPoolIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
 	/// Storage: `Distance::EvaluationPool0` (r:1 w:1)
 	/// Proof: `Distance::EvaluationPool0` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
-	/// The range of component `i` is `[1, 600]`.
+	/// The range of component `i` is `[1, 1300]`.
 	fn update_evaluation(i: u32, ) -> Weight {
 		// Proof Size summary in bytes:
-		//  Measured:  `773 + i * (10 ±0)`
-		//  Estimated: `2257 + i * (10 ±0)`
-		// Minimum execution time: 13_230_000 picoseconds.
-		Weight::from_parts(15_236_858, 0)
-			.saturating_add(Weight::from_parts(0, 2257))
-			// Standard Error: 498
-			.saturating_add(Weight::from_parts(102_078, 0).saturating_mul(i.into()))
+		//  Measured:  `402 + i * (10 ±0)`
+		//  Estimated: `1887 + i * (10 ±0)`
+		// Minimum execution time: 12_657_000 picoseconds.
+		Weight::from_parts(13_883_896, 0)
+			.saturating_add(Weight::from_parts(0, 1887))
+			// Standard Error: 454
+			.saturating_add(Weight::from_parts(105_327, 0).saturating_mul(i.into()))
 			.saturating_add(T::DbWeight::get().reads(6))
 			.saturating_add(T::DbWeight::get().writes(3))
 			.saturating_add(Weight::from_parts(0, 10).saturating_mul(i.into()))
 	}
-	/// Storage: `Session::CurrentIndex` (r:1 w:0)
-	/// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+	/// Storage: `Distance::CurrentPoolIndex` (r:1 w:0)
+	/// Proof: `Distance::CurrentPoolIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
 	/// Storage: `Distance::EvaluationPool0` (r:1 w:1)
 	/// Proof: `Distance::EvaluationPool0` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
-	/// The range of component `i` is `[1, 600]`.
+	/// The range of component `i` is `[1, 1300]`.
 	fn force_update_evaluation(i: u32, ) -> Weight {
 		// Proof Size summary in bytes:
-		//  Measured:  `612 + i * (10 ±0)`
-		//  Estimated: `2096 + i * (10 ±0)`
-		// Minimum execution time: 6_222_000 picoseconds.
-		Weight::from_parts(8_798_404, 0)
-			.saturating_add(Weight::from_parts(0, 2096))
-			// Standard Error: 525
-			.saturating_add(Weight::from_parts(101_030, 0).saturating_mul(i.into()))
+		//  Measured:  `139 + i * (10 ±0)`
+		//  Estimated: `1624 + i * (10 ±0)`
+		// Minimum execution time: 5_495_000 picoseconds.
+		Weight::from_parts(7_434_546, 0)
+			.saturating_add(Weight::from_parts(0, 1624))
+			// Standard Error: 245
+			.saturating_add(Weight::from_parts(101_180, 0).saturating_mul(i.into()))
 			.saturating_add(T::DbWeight::get().reads(2))
 			.saturating_add(T::DbWeight::get().writes(1))
 			.saturating_add(Weight::from_parts(0, 10).saturating_mul(i.into()))
@@ -159,21 +159,93 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `609`
 		//  Estimated: `6549`
-		// Minimum execution time: 24_153_000 picoseconds.
-		Weight::from_parts(24_962_000, 0)
+		// Minimum execution time: 26_542_000 picoseconds.
+		Weight::from_parts(27_508_000, 0)
 			.saturating_add(Weight::from_parts(0, 6549))
 			.saturating_add(T::DbWeight::get().reads(5))
 			.saturating_add(T::DbWeight::get().writes(3))
 	}
+	fn on_initialize_overhead() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `0`
+		//  Estimated: `0`
+		// Minimum execution time: 139_000 picoseconds.
+		Weight::from_parts(176_000, 0)
+			.saturating_add(Weight::from_parts(0, 0))
+	}
+	/// Storage: `System::ParentHash` (r:1 w:0)
+	/// Proof: `System::ParentHash` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
+	/// Storage: `Distance::EvaluationPool2` (r:1 w:1)
+	/// Proof: `Distance::EvaluationPool2` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+	/// Storage: `Distance::PendingEvaluationRequest` (r:1 w:1)
+	/// Proof: `Distance::PendingEvaluationRequest` (`max_values`: None, `max_size`: None, mode: `Measured`)
+	/// Storage: `System::Account` (r:1 w:1)
+	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
+	/// Storage: `Identity::Identities` (r:1 w:0)
+	/// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`)
+	/// Storage: `Membership::Membership` (r:1 w:1)
+	/// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`)
+	/// Storage: `Membership::MembershipsExpireOn` (r:2 w:2)
+	/// Proof: `Membership::MembershipsExpireOn` (`max_values`: None, `max_size`: None, mode: `Measured`)
+	/// Storage: `Parameters::ParametersStorage` (r:1 w:0)
+	/// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+	/// Storage: `Distance::EvaluationBlock` (r:0 w:1)
+	/// Proof: `Distance::EvaluationBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+	fn do_evaluation_success() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `973`
+		//  Estimated: `6913`
+		// Minimum execution time: 41_828_000 picoseconds.
+		Weight::from_parts(43_616_000, 0)
+			.saturating_add(Weight::from_parts(0, 6913))
+			.saturating_add(T::DbWeight::get().reads(9))
+			.saturating_add(T::DbWeight::get().writes(7))
+	}
+	/// Storage: `System::ParentHash` (r:1 w:0)
+	/// Proof: `System::ParentHash` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
+	/// Storage: `Distance::EvaluationPool2` (r:1 w:1)
+	/// Proof: `Distance::EvaluationPool2` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+	/// Storage: `Distance::PendingEvaluationRequest` (r:1 w:1)
+	/// Proof: `Distance::PendingEvaluationRequest` (`max_values`: None, `max_size`: None, mode: `Measured`)
+	/// Storage: `System::Account` (r:1 w:1)
+	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
+	/// Storage: `Distance::EvaluationBlock` (r:0 w:1)
+	/// Proof: `Distance::EvaluationBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+	fn do_evaluation_failure() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `364`
+		//  Estimated: `3829`
+		// Minimum execution time: 21_914_000 picoseconds.
+		Weight::from_parts(22_609_000, 0)
+			.saturating_add(Weight::from_parts(0, 3829))
+			.saturating_add(T::DbWeight::get().reads(4))
+			.saturating_add(T::DbWeight::get().writes(4))
+	}
+	/// Storage: `System::ParentHash` (r:1 w:0)
+	/// Proof: `System::ParentHash` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
+	/// Storage: `Distance::EvaluationPool2` (r:1 w:0)
+	/// Proof: `Distance::EvaluationPool2` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+	/// Storage: `Distance::EvaluationBlock` (r:0 w:1)
+	/// Proof: `Distance::EvaluationBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
+	fn do_evaluation_overhead() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `109`
+		//  Estimated: `1594`
+		// Minimum execution time: 2_666_000 picoseconds.
+		Weight::from_parts(2_865_000, 0)
+			.saturating_add(Weight::from_parts(0, 1594))
+			.saturating_add(T::DbWeight::get().reads(2))
+			.saturating_add(T::DbWeight::get().writes(1))
+	}
 	/// Storage: `Distance::DidUpdate` (r:1 w:1)
 	/// Proof: `Distance::DidUpdate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
 	fn on_finalize() -> Weight {
 		// Proof Size summary in bytes:
-		//  Measured:  `170`
-		//  Estimated: `1655`
-		// Minimum execution time: 2_716_000 picoseconds.
-		Weight::from_parts(2_884_000, 0)
-			.saturating_add(Weight::from_parts(0, 1655))
+		//  Measured:  `133`
+		//  Estimated: `1618`
+		// Minimum execution time: 2_473_000 picoseconds.
+		Weight::from_parts(2_729_000, 0)
+			.saturating_add(Weight::from_parts(0, 1618))
 			.saturating_add(T::DbWeight::get().reads(1))
 			.saturating_add(T::DbWeight::get().writes(1))
 	}
diff --git a/runtime/gdev/tests/integration_tests.rs b/runtime/gdev/tests/integration_tests.rs
index 3864d3a01..b91e0ee90 100644
--- a/runtime/gdev/tests/integration_tests.rs
+++ b/runtime/gdev/tests/integration_tests.rs
@@ -359,8 +359,9 @@ fn test_validate_identity_when_claim() {
                 frame_system::RawOrigin::Signed(AccountKeyring::Eve.to_account_id()).into(),
             ));
 
-            // Pass 2 sessions
-            run_to_block(51);
+            // Pass 2nd evaluation period
+            let eval_period: u32 = <Runtime as pallet_distance::Config>::EvaluationPeriod::get();
+            run_to_block(2 * eval_period);
             // simulate an evaluation published by smith Alice
             assert_ok!(Distance::force_update_evaluation(
                 frame_system::RawOrigin::Root.into(),
@@ -369,7 +370,8 @@ fn test_validate_identity_when_claim() {
                     distances: vec![Perbill::one()],
                 }
             ));
-            run_to_block(75); // Pass 1 session
+            // Pass 3rd evaluation period
+            run_to_block(3 * eval_period);
             System::assert_has_event(RuntimeEvent::Distance(
                 pallet_distance::Event::EvaluatedValid { idty_index: 5 },
             ));
@@ -387,7 +389,8 @@ fn test_validate_identity_when_claim() {
             System::assert_has_event(RuntimeEvent::Membership(
                 pallet_membership::Event::MembershipAdded {
                     member: 5,
-                    expire_on: 75 + <Runtime as pallet_membership::Config>::MembershipPeriod::get(),
+                    expire_on: 3 * eval_period
+                        + <Runtime as pallet_membership::Config>::MembershipPeriod::get(),
                 },
             ));
         });
@@ -461,8 +464,9 @@ fn test_identity_creation_workflow() {
                 Some(AccountKeyring::Charlie.to_account_id(),)
             );
 
-            // Pass 2 sessions
-            run_to_block(51);
+            // Pass 2nd evaluation period
+            let eval_period: u32 = <Runtime as pallet_distance::Config>::EvaluationPeriod::get();
+            run_to_block(2 * eval_period);
             // simulate evaluation published by smith Alice
             assert_ok!(Distance::force_update_evaluation(
                 frame_system::RawOrigin::Root.into(),
@@ -471,28 +475,30 @@ fn test_identity_creation_workflow() {
                     distances: vec![Perbill::one()],
                 }
             ));
-            // Pass 1 session
-            run_to_block(75);
+            // Pass 3rd evaluation period
+            run_to_block(3 * eval_period);
 
             // eve should not even have to claim her membership
             System::assert_has_event(RuntimeEvent::Membership(
                 pallet_membership::Event::MembershipAdded {
                     member: 5,
-                    expire_on: 75 + <Runtime as pallet_membership::Config>::MembershipPeriod::get(),
+                    expire_on: 3 * eval_period
+                        + <Runtime as pallet_membership::Config>::MembershipPeriod::get(),
                 },
             ));
 
             // test state coherence
+            // block time is 6_000 ms
+            // ud creation period is 60_000 ms ~ 10 blocks
+            // first ud is at 24_000 ms ~ 4 blocks
+            // at current block this is UD number current_block/10 + 1
+            let first_eligible = ((3 * eval_period) / 10 + 1) as u16;
             assert_eq!(
                 Identity::identity(5),
                 Some(pallet_identity::IdtyValue {
                     data: IdtyData {
-                        // block time is 6_000 ms
-                        // ud creation period is 60_000 ms ~ 10 blocks
-                        // first ud is at 24_000 ms ~ 4 blocks
-                        // at block 75 this is UD number 8, so next is 9
                         first_eligible_ud: pallet_universal_dividend::FirstEligibleUd(Some(
-                            sp_std::num::NonZeroU16::new(9).unwrap()
+                            sp_std::num::NonZeroU16::new(first_eligible).unwrap()
                         ))
                     },
                     next_creatable_identity_on: 0u32,
@@ -508,7 +514,7 @@ fn test_identity_creation_workflow() {
                 pallet_universal_dividend::Event::NewUdCreated {
                     amount: 1000,
                     index: 9,
-                    monetary_mass: 50_000, // 13_000 (initial) + 4 * 1000 * 8 (produced) + 5000
+                    monetary_mass: 49_000 + (10 - first_eligible as u64) * 1_000, // 13_000 (initial) + 4 * 1000 * 9 (produced) + (10-first_eligible)*1_000
                     members_count: 5,
                 },
             ));
@@ -517,8 +523,8 @@ fn test_identity_creation_workflow() {
             ));
             System::assert_has_event(RuntimeEvent::UniversalDividend(
                 pallet_universal_dividend::Event::UdsClaimed {
-                    count: 1,
-                    total: 1000,
+                    count: (10 - first_eligible),
+                    total: (10 - first_eligible as u64) * 1_000,
                     who: AccountKeyring::Eve.to_account_id(),
                 },
             ));
@@ -614,7 +620,9 @@ fn test_membership_renewal() {
                 frame_system::RawOrigin::Signed(AccountKeyring::Alice.to_account_id()).into(),
             ));
 
-            run_to_block(51); // Pass 2 sessions
+            // Pass 3rd evaluation period
+            let eval_period: u32 = <Runtime as pallet_distance::Config>::EvaluationPeriod::get();
+            run_to_block(3 * eval_period);
             assert_ok!(Distance::force_update_evaluation(
                 frame_system::RawOrigin::Root.into(),
                 AccountKeyring::Alice.to_account_id(),
@@ -622,16 +630,17 @@ fn test_membership_renewal() {
                     distances: vec![Perbill::one()],
                 }
             ));
-            // Pass 1 session, membership is renewed automatically
-            run_to_block(75);
+            // Pass to 4th evaluation period
+            run_to_block(4 * eval_period);
             System::assert_has_event(RuntimeEvent::Membership(
                 pallet_membership::Event::MembershipRenewed {
                     member: 1,
-                    expire_on: 75 + <Runtime as pallet_membership::Config>::MembershipPeriod::get(),
+                    expire_on: 4 * eval_period
+                        + <Runtime as pallet_membership::Config>::MembershipPeriod::get(),
                 },
             ));
 
-            run_to_block(76);
+            run_to_block(4 * eval_period + 1);
             // not possible to renew manually
             // can not ask renewal when period is not respected
             assert_noop!(
@@ -641,8 +650,10 @@ fn test_membership_renewal() {
                 pallet_duniter_wot::Error::<Runtime>::MembershipRenewalPeriodNotRespected,
             );
 
-            // should expire at block 175 = 75+100
-            run_to_block(175);
+            // should expire at block 3nd EvaluationPeriod + MembershipPeriod
+            run_to_block(
+                4 * eval_period + <Runtime as pallet_membership::Config>::MembershipPeriod::get(),
+            );
             System::assert_has_event(RuntimeEvent::Membership(
                 pallet_membership::Event::MembershipRemoved {
                     member: 1,
-- 
GitLab