Duniter v2S merge requestshttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests2024-03-28T16:29:14+01:00https://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/259Draft: Fix #2212024-03-28T16:29:14+01:00Benjamin GalloisDraft: Fix #221Closes #221Closes #221runtime-802Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/258Upgrade to polkadot-v1.9.02024-03-26T13:52:58+01:00Benjamin GalloisUpgrade to polkadot-v1.9.0Upgrade Note:
- Added four new types in the `frame_system` module:
```rust
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
```
- GenesisDefault values are...Upgrade Note:
- Added four new types in the `frame_system` module:
```rust
type MultiBlockMigrator = ();
type PreInherents = ();
type PostInherents = ();
type PostTransactions = ();
```
- GenesisDefault values are now checked during testing, ensuring and requiring successful GenesisBuild with these default values.
To-Do:
- [x] Upgrade to polkadot-v1.9.0
- [x] Fix #225
- [x] Upgrade GitHub full polkadot-sdk to light-polkadot-sdk, close #211
- [x] Upgrade subxt with the light-polkadot-sdk
- [x] Remove all dependencies from paritytech.
- [x] Rewrite upgrade documentation
- [x] Use unstable -Zgit=shallow-deps to solve #211
Using a light-polkadot-sdk as mentioned in #211 is, in fact, not possible, as the substrate folder is now highly interconnected with the outer folder hierarchy. The dependencies to the paritytech polkadot-sdk mentioned in #211 actually originate from bandersnatch_vrfs, which depends on arkworks that, in turn, depends on the polkadot-sdk from paritytech. I created https://github.com/duniter/arkworks-substrate and https://github.com/duniter/arkworks-substrate to resolve the dependency on our polkadot-sdk. As a result, the downloaded size is reduced by half, and the shallow copy also reduces the downloaded size by half.runtime-802Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/257Fix #219 and #2202024-03-21T11:25:21+01:00Benjamin GalloisFix #219 and #220Closes #220 #219. I don't see any functional bugs here, so I infer that it's to maintain coherence with other pallets that display the issuer before the receiver in the event.Closes #220 #219. I don't see any functional bugs here, so I infer that it's to maintain coherence with other pallets that display the issuer before the receiver in the event.runtime-802Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/256Refactor node implementation2024-03-21T00:00:56+01:00Benjamin GalloisRefactor node implementationCloses #215 #216 #222Closes #215 #216 #222runtime-802Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/255Resolve "Allow native Runtime execution"2024-03-08T11:36:28+01:00Cédric MoreauResolve "Allow native Runtime execution"Closes #214Closes #214runtime-802Cédric MoreauCédric Moreauhttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/254Draft: Refac generated documentation2024-03-11T14:40:46+01:00Benjamin GalloisDraft: Refac generated documentationCloses #183 and fixed the `xtask gen-doc` that was not compiling anymore.
`cargo xtask gen-doc` will now generate the rust autogenerated documentation (the full (and bloated) documentation is necessary for Substrate pallets calls). The ...Closes #183 and fixed the `xtask gen-doc` that was not compiling anymore.
`cargo xtask gen-doc` will now generate the rust autogenerated documentation (the full (and bloated) documentation is necessary for Substrate pallets calls). The `docs/api/runtime-calls.md` will be generated with reference to the rust autogenerated documentation based on the `BASE_URL` variable.
The only thing left to do is to decide where to store the rust autogenerated documentation. Then, a CI with the necessary server permissions can simply run:
```bash
BASE_URL="https://url/to/endpoint" cargo xtask gen-doc
rsync -a ./docs/api/doc user@server:/path/to/endpoint/
```runtime-802Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/253Fix #196 forbid empty linked account2024-03-06T15:23:57+01:00Benjamin GalloisFix #196 forbid empty linked accountCloses #196
I added a test for this one because it addresses the same question that arose and was answered in !213, but there is no bug:
- Member accounts cannot have a zero balance, so `transfer_all` will not kill them.
- Non-member a...Closes #196
I added a test for this one because it addresses the same question that arose and was answered in !213, but there is no bug:
- Member accounts cannot have a zero balance, so `transfer_all` will not kill them.
- Non-member accounts can have a zero balance, so they will be reaped. During reaping, the `AccountData` will be reset to default, unlinking the identity.runtime-802Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/252Change distance evaluation period from Sessions to Blocks2024-03-06T15:05:11+01:00Benjamin GalloisChange distance evaluation period from Sessions to BlocksCloses #202
Closes #207
- [x] Create evaluation period in block.
- [x] Update tests.
- [x] Weight accounting
- [x] Upgrade the distance oracle.
- [x] Fix #207.
- [x] Closes #174: the worst and simplest estimation equates to one evalua...Closes #202
Closes #207
- [x] Create evaluation period in block.
- [x] Update tests.
- [x] Weight accounting
- [x] Upgrade the distance oracle.
- [x] Fix #207.
- [x] Closes #174: the worst and simplest estimation equates to one evaluation being 0.0037% of a block's weight, based on the current reference machine. To maintain a reasonable load on the system, it's advisable that the cumulative weight of all evaluations does not surpass 5-10% of a block's capacity. Consequently, setting `MAX_EVALUATIONS_PER_SESSION` between 1 300 and 2 600 would ensure safe operation.runtime-802Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/251Fix misleading error message when Babe owner keys != 12024-03-06T15:23:57+01:00Carles BarrobésFix misleading error message when Babe owner keys != 1Solves #191 by having the error message cover both the "too many keys" and the "zero keys" situations.Solves #191 by having the error message cover both the "too many keys" and the "zero keys" situations.runtime-802Carles BarrobésCarles Barrobéshttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/250allow oracle connexion through "insecure url"2024-02-23T01:28:07+01:00Hugo Trentesauxallow oracle connexion through "insecure url"closes #201
(cherry picked from commit d549b744f5498ee1624dec615b9f58f39d6552d9)
since the use case of the distance oracle is inside a docker network, it makes sense to allow connexion to url without tls or without localhost (still int...closes #201
(cherry picked from commit d549b744f5498ee1624dec615b9f58f39d6552d9)
since the use case of the distance oracle is inside a docker network, it makes sense to allow connexion to url without tls or without localhost (still internal docker network)runtime-802Hugo TrentesauxHugo Trentesauxhttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/249Fix srtool2024-02-24T15:15:24+01:00Benjamin GalloisFix srtoolruntime-802Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/248Fix live tests2024-03-06T15:23:57+01:00Benjamin GalloisFix live testsCloses #161Closes #161runtime-802Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/247Upgrade to polkadot-v1.7.12024-02-21T15:49:10+01:00Benjamin GalloisUpgrade to polkadot-v1.7.1Upgrade note:
* `MaxHold` was deleted from `pallet_balances`.
To do:
- [x] Upgrade duniter-polkadot-sdk.
- [x] Upgrade duniter subxt.
- [x] Upgrade node.Upgrade note:
* `MaxHold` was deleted from `pallet_balances`.
To do:
- [x] Upgrade duniter-polkadot-sdk.
- [x] Upgrade duniter subxt.
- [x] Upgrade node.runtime-801Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/246Fix weight accounting2024-03-20T23:02:20+01:00Benjamin GalloisFix weight accountingThe problem is slightly different from the previously raised issue due to the deletion of instance pallets. Currently, the problem lies in having two tuple handlers (`OnIdtyChange` and `Event`). The weight of the function calling these h...The problem is slightly different from the previously raised issue due to the deletion of instance pallets. Currently, the problem lies in having two tuple handlers (`OnIdtyChange` and `Event`). The weight of the function calling these handlers is the sum of each implementation. If these functions are not called in hooks, it will be possible to take the worst possible path as an approximation. However, some are called in `on_initialize`, and the worst case is close to 7% of a block, approximately 10 times the average path.
- [x] Add weight return in `OnIdtyChange` and `Event` handlers.
- [x] Account for the weight where these handlers are called.
- [x] Replace all `+=`, `-=` by `saturating_add` and `saturating_sub` for consistency.
- [x] Closes #163.
- [x] Closes #203
Note: Some handlers are difficult to benchmark using a benchmark function, so the accounting is performed by counting reads and writes, inspired by [the staking pallet from Substrate](https://paritytech.github.io/polkadot-sdk/master/src/pallet_staking/pallet/impls.rs.html#1369-1493).
Closes #167runtime-801Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/245Fix #194 session indexing error2024-02-15T16:26:13+01:00Benjamin GalloisFix #194 session indexing errorCloses #194
The `on_new_session` function from the pallet handler was not added to the runtime's `OnNewSessionHandler`. As a result, the `on_new_session` function was only called at genesis, causing the `expiresOn` value to always be 0...Closes #194
The `on_new_session` function from the pallet handler was not added to the runtime's `OnNewSessionHandler`. As a result, the `on_new_session` function was only called at genesis, causing the `expiresOn` value to always be 0 plus `SmithInactivityMaxDuration`, and the inactive smiths were never removed.runtime-801Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/244Fix compilation error `use of unstable library feature 'stdsimd'`2024-02-15T16:38:00+01:00Benjamin GalloisFix compilation error `use of unstable library feature 'stdsimd'`* Upgraded to latest nightly to closes #193
* Fixed clippy warnings.
* Fixed one compilation error with `try-runtime` feature and the unused import and dead code warnings. G1Executor and GTest are only utilized with `runtime-benchmarks`...* Upgraded to latest nightly to closes #193
* Fixed clippy warnings.
* Fixed one compilation error with `try-runtime` feature and the unused import and dead code warnings. G1Executor and GTest are only utilized with `runtime-benchmarks`, whereas GDevExecutor is used with either `runtime-benchmarks` or `try-runtime`. Rather than complicating the code with error-prone (or impossible) feature combinations, I've opted to allow unused import and dead code within this particular section.runtime-801Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/243Fix a few Typos2024-02-15T16:37:22+01:00Carles BarrobésFix a few TyposFixes some typos spotted while reading the code and documentation.Fixes some typos spotted while reading the code and documentation.https://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/242fix distance oracle entrypoint2024-03-01T13:26:35+01:00Hugo Trentesauxfix distance oracle entrypointcloses #199closes #199Hugo TrentesauxHugo Trentesauxhttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/241Fix warnings during benchmarks2024-02-12T19:43:01+01:00Benjamin GalloisFix warnings during benchmarksCloses #198
Closed #186 (see https://git.duniter.org/nodes/rust/duniter-v2s/-/issues/186#note_41648).Closes #198
Closed #186 (see https://git.duniter.org/nodes/rust/duniter-v2s/-/issues/186#note_41648).runtime-801Benjamin GalloisBenjamin Galloishttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/240runtime-800 updates2024-02-08T13:28:34+01:00Cédric Moreauruntime-800 updatesRelease updates to merge on master.Release updates to merge on master.runtime-801Cédric MoreauCédric Moreau