cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.24k stars 3.61k forks source link

[Epic]: x/Auth #20058

Open tac0turtle opened 6 months ago

tac0turtle commented 6 months ago

Summary

The Auth module handles storage of auth information like sequence number, pubkeys, etc.. The module is complex and has limitations in being able to expand the different account types. Recently we completed the accounts module and see a future in which the accounts module offers a baseaccount that mimics the same logic as the auth module. In this design there is not a need for the auth module to continue.

Secondly, we should look into what this means for the cryptocodec, if it is needed any longer as well.

Problem Definition

Accounts provides an simple alternative to the auth module. We should explore using it instead of the auth module.

for existing chains we should explore if a lazy migration would be useful here in order to migrate users from x/auth to x/accounts

Work Breakdown

### Tasks
- [ ] Identify if and how a chain could start with only the account module
- [ ] Implement and/or fix issues that arise from only using x/accounts and no auth. 
- [ ] Update documentation on how to start a new chain without the auth module
- [ ] Add documentation on how existing users can migrate or stay with their current designs. 
julienrbrt commented 6 months ago

For the first task we need to remove the auth keeper from simulation. A module like x/feegrant only imports the auth keeper for getting the address codec and simulation. The former can be done directly in app.go and depinject knows how to inject an address.Codec directly as well. The latter is a hard requirement as of now: https://github.com/cosmos/cosmos-sdk/blob/db5906b1e894ed6022d37cb757093adb7a4f2e11/x/simulation/util.go#L82