Skip to content

feat(staking): write delegator state migration#414

Closed
wischli wants to merge 53 commits intowf-1930-staking-refactor-apifrom
wf-1930-staking-refactor-migration
Closed

feat(staking): write delegator state migration#414
wischli wants to merge 53 commits intowf-1930-staking-refactor-apifrom
wf-1930-staking-refactor-migration

Conversation

@wischli
Copy link
Contributor

@wischli wischli commented Sep 16, 2022

  • Adds pallet migration required to update DelegatorState StorageMap

@wischli wischli mentioned this pull request Sep 19, 2022
22 tasks
ntn-x2 and others added 15 commits September 20, 2022 15:21
* wip: skeleton in place

* wip: trying to fight with rust-analyzer

* wip: FFS

* wip: tests for the new pallet

* test: add unit tests for the new pallet

* chore: fmt

* fix: restore toolchain to nightly

* core: clippy

* wip: minor chores

* test: add hcecks for deposit reservations

* test: add InvalidInput test case

* feat: working on parsing the right chain_id information

* feat: add dotsama and solana chains

* feat: generic chain support

* feat: add utility functions for chain IDs

* chore: clippy + fmt

* fix: uncomment remaining test functions

* wip: first version of new pallet

* feat: new pallet for chain IDs

* wip: fixing last issues

* fix: chain ids now working fine

* feat: asset id complete (untested)

* most of unit tests for asset IDs in

* test: unit tests passing

* wip: almost complete

* chore: small improvements

* feat: default implementations of important traits

* chore: few needed adjustments

* test: add test for too long credentials

* chore: mashnet-node-runtime compiling

* chore: minor refinements

* chore: remove asset transfer feature

* chore: add test cases for smart contract addresses without leading

* fix: dependencies in mashnet-node compilation

* chore: re-organize imports

* chore: last cleanups for chain asset DID stuff

* fix: adjust asset DID definition in code

* wip: whole project compiling

* wip: benchmarking refactoring

* chore: refactored the default implementation for AssetDid

* wip: refactor almost completed

* wip: first benchmark case compiling

* wip: refactoring before review

* wip: refactoring pt. 2

* wip: refactoring pt. 3

* chore: optimise eip155 chain reference

* wip: optimizing storage

* wip: tests failing

* chore: completed

* wip: switch to hex_literal

* chore: refactor complete

* chore: final chores for the asset DID crate

* bench: setup for public-credentials pallet complete

* wip: implementing the Display trait for the AssetDID type

* test: unit tests for ChainID Display implementation working

* test: unit tests completed for asset DID crate

* feat: whole project compiling after implementing Display

* chore: fmt

* chore: update benchmarking script for new pallet

* chore: update benchmark scripts and weights

* chore: update weights

* fix: correct signature verification weight

* chore: address TODO

* chore: update test script to use --all-targets and check for test targets as well

* test: storage deposit test for runtimes

* chore: address last TODOs

* chore: fmt

* chore: factor everything out into variables

* fix: clippy issues

* fix: checks for asset DID length bounds

* chore: make failing clearer for decimal references

* chore: factor out bounds checking function

* fix: max line length limit

* chore: factor out split function

* chore: right syntax for generics

* chore: typo

* chore: factor out credential retrieval in public credentials pallet

* feat: add public credentials runtime API definition

* feat: add public credentials runtime API implementation for standalone

* wip: only need to add the RPC to the node executable

* wip: add serialization support

* feat: compiling

* fix: compiling with one generic added

* fix: compiling with second argument

* COMPILING

* chore: qol improvements

* feat: add key to return value of get_credentials

* chore: remove unneded serde support

* deps: remove unnecessary serde deps

* wip: refactoring

* almost there

* feat: add runtime api implementation for parachain runtimes

* chore: remove InputError type from public-credentials pallet

* fix: change TryFrom requirement for SubjectId

* chore: remove unused deps

* chore: update repo links

* chore: move errors in their own module

* chore: comments

* chore: split components into its own struct

* chore: add link to const generics

* chore: replace switch with if let

* chore: replace matches! with contains

* chore: make comment a doc comment

* chore: revert Eq derive for DidDetails

* chore: attestation namespace not needed

* chore: re-add commented out pallets in bench script

* chore: add some logging to the InvalidFormat error cases

* chore: move serde import up again

* chore: replace From<Error> for i32 with repr(i32)

* chore: improve efficienct of Display

* fix: changes to public credentials based on feedback (#392)

* wip: changing stuff based on meeting

* feat: generate credential ID on chain

* remove dependency on attestation pallet

* add revocation and unrevocation

* add checks that the attestation pallet also performs

* add ctype info in the storage

* Add support for access control

* Update benchmarks

* Runtimes compiling

* nodes compiling with new filtering feature

* Remove authorization id from possible filters

* fmt

* update benchmarks and default weights (to be re-executed on bench machine)

* change serialization logic for ctype filter

* fixes and chores

* refactor common function

* change get_credential to only take a credential ID parameter

* rename rpc endpoints for easier decoration

* update RPC method names again

* change encoding of filter to be camelCase to be consistent with PolkadotJS

* Apply suggestions from review

* Fix clone runtime for public credentials RPC

* Remove unused deps

* Remove most of the unrelated changes

* Last chores

* Remove non_exhaustive from all structs

* Add comments to Cargo.toml

* Switch ordering in Cargo.toml

* Switch ordering in Cargo.toml

* Cargo.toml fixes

* Refactor benchmarking helper function

* Update public credentials pallet description

* Update comments in pallet

* Update description of the reclaim_deposit extrinsic

* More comments

* Add case for invalid input

* remove unused variable in benchmarks

* Make comment a doc comment

* fmt

* Fix match case

* Fix import

* Fix single match case

* Fix new line

* Fix access control file

* Fix more matches

* Fix proxy type

* Fmt

* Fix repo links
* feat: remove dyn filter & relay migration

* 🧹🐢

* feat: migration to remove storage

* better logs
@wischli wischli added this to the 1.9.0 milestone Oct 5, 2022
@weichweich weichweich changed the title feat: write delegator state migration feat(staking): write delegator state migration Oct 5, 2022
wischli and others added 7 commits October 6, 2022 10:29
* chore: bump deps

* wip: migrate pallets and runtimes

* chore: bump more versions

* wip: fix clients

* fix: runtime tomls

* style: ignore clippy in default weights

* fix: client pt2

* fix: runtimes, clippy

* feat: switch pallet execution order

* tests: merge delegation from wf-2168-polkadot-v0.9.28

* chore: bump deps to polkadot-v0.9.29

* fix: weights 1.5 for new stuff

* fix: cp mistake

* fix: update weight templates

* fix: pallet order instruction

* chore: bump deps

* feat: add backported batch fix

* refactor: same serde versions

* fix: UnitWeightCost type

* fix: CI regex for versions

* fix: remove disable-runtime-api feat
* Remove DID RPC

* Add version support for DID RPC call

* Mark other DID API methods as deprecated as well
* Add new DID runtime API name

* Rename public credentials runtime API as well

* Add deprecation comment

* revert 'Rename public credentials runtime API as well'
* chore: bump deps

* wip: migrate pallets and runtimes

* chore: bump more versions

* wip: fix clients

* fix: runtime tomls

* style: ignore clippy in default weights

* fix: client pt2

* fix: runtimes, clippy

* feat: switch pallet execution order

* tests: merge delegation from wf-2168-polkadot-v0.9.28

* chore: bump deps to polkadot-v0.9.29

* fix: weights 1.5 for new stuff

* fix: cp mistake

* fix: update weight templates

* fix: pallet order instruction

* chore: bump deps

* feat: add backported batch fix

* refactor: same serde versions

* fix: UnitWeightCost type

* fix: CI regex for versions

* fix: remove disable-runtime-api feat
ntn-x2 and others added 26 commits October 17, 2022 14:24
* Remove DID RPC

* Add version support for DID RPC call

* Mark other DID API methods as deprecated as well
* Add new DID runtime API name

* Rename public credentials runtime API as well

* Add deprecation comment

* revert 'Rename public credentials runtime API as well'
… runtime APIs (#426)

* Rename public credentials runtime API

* Rename public credentials RPC interface

* Rename credential filter

* Accept raw asset DID for runtime API

* Mashnet node compiling

* Whole project compiling

* Clippy fix

* Minor cleanups

* Add comment to runtime API functions for public credentials
Co-authored-by: William Freudenberger <william@kilt.io>
* refactor: remove custom (de)serialization

* style: fmt

* fix: remove missed serde stuff
@wischli
Copy link
Contributor Author

wischli commented Oct 31, 2022

Closed by cherry-picking into #384

@wischli wischli closed this Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants