Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New on-chain registration flow (#955)
* Trial of using types and derivation code * Move new registration code to its own extrinsic This way we can introduce it without breaking everything just yet * Use my branch of Synedrion * Sketch out using the account ID as derivation path * Basic test setup * Use a `CountedStorageMap` for `Registered` struct This lets us use the count as the derivation path for now. * Add some error handling * Tidy genesis build * Add registration struct for new flow This lets us change the mapping so that instead of being indexed by verifying key we're not indexing by the signature request account. * Use updated `RegisteredInfo` struct in tests * Test flow and validate verifying key * Encode the signature request account in place * Update some of the variable names * Revert registration struct to be indexed by verifying key The notion of the signature_request_account is meant to be ephemeral, so we don't really need to have registration know anything about this beyond the initial extrinsic. * Initialize `RegisteredOnChain` during genesis builds * Remove check that a `signature_request_account` can only register once * Insert verifying key into `ModifiableKeys` storage struct * Remove `dbg!` statement * Add test to check that a signature request account can register multiple times * Add benchmark for new registration extrisic * Add comments around registration flow * Use `no_std` compatible version of Synedrion * Use `core` and `alloc` data structures in pallet * Use remote Synedrion reference * Make derivation path in benchmarks generic instead of hardcoded * Use benchmark results for new extrinsic * Rename extrinsic to `register_on_chain` * Use `no_std` functions for benches * Add entry to `CHANGELOG` * Add a few tests for failure conditions * Fix breaking changes from #974 * Bump Synedrion to latest `master` * Add issue number to `TODO` comment
- Loading branch information