Duniter v2S merge requestshttps://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests2024-03-21T11:25:21+01:00https://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/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/229Upgrade to polkadot-v1.6.02024-03-12T14:37:02+01:00Benjamin GalloisUpgrade to polkadot-v1.6.0## Upgrade Note
* Due to the Subxt API changes, all the extrinsics triggered in the Cucumber tests will be included in a block **and then** finalized, contrary to v0.9.42 where only inclusion was necessary. Therefore, in any test, the t...## Upgrade Note
* Due to the Subxt API changes, all the extrinsics triggered in the Cucumber tests will be included in a block **and then** finalized, contrary to v0.9.42 where only inclusion was necessary. Therefore, in any test, the transaction should be successful for the test to succeed, i.e., caller fees should be payable (see for example changes in `oneshot_account.feature`).
* Upgraded the old substrate to the new polkadot-sdk modified for your specific needs.
* Upgraded Subxt to v0.34.0.
* Opened https://github.com/paritytech/polkadot-sdk/pull/3049, so your benchmarks can pass for the pallet treasury.
## Do to
- [x] compile all pallets no feature.
- [x] compile all pallets with test feature.
- [x] compile all pallets with benchmark feature.
- [x] compile runtime with no feature.
- [x] compile runtime with test feature.
- [x] upgrade subxt and metadata version.
- [x] correct tests.
- [x] fix cucumber.
- [x] refactor Executor like in Acala.
- [x] fix xtasks.
- [ ] upgrade workspace like in the node template.
- [x] transfert polkadot-sdk to Duniter organization, upgrade and adapt duniter-subxt to resolve the nightmare of version compatibility with the polkadot-sdk.
- [x] upgrade subxt repository of Duniter organisation.
- [ ] remove soon deprecated features.
Close #170runtime-800Benjamin 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/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/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/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/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/213Fix account linking2024-03-04T16:20:43+01:00Benjamin GalloisFix account linkingCloses #153, #158, #147Closes #153, #158, #147runtime-800Benjamin GalloisBenjamin Galloishttps://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/249Fix srtool2024-02-24T15:15:24+01:00Benjamin GalloisFix srtoolruntime-802Benjamin GalloisBenjamin Galloishttps://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/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/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/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/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/226distance: move max-depth to runtime constant2024-02-12T12:07:09+01:00Pascal Engélibertdistance: move max-depth to runtime constantcloses #169closes #169runtime-800https://git.duniter.org/nodes/rust/duniter-v2s/-/merge_requests/236Upgrade Polkadot-v1.6.02024-02-11T08:16:15+01:00Benjamin GalloisUpgrade Polkadot-v1.6.0- [x] benchmarking v1 to v2.
- [x] Replace GenesisBuilder.
- [x] Upgrade cucumber cli.
- [x] Upgrade workspace.- [x] benchmarking v1 to v2.
- [x] Replace GenesisBuilder.
- [x] Upgrade cucumber cli.
- [x] Upgrade workspace.runtime-801Benjamin GalloisBenjamin Gallois