cosmos-sdk icon indicating copy to clipboard operation
cosmos-sdk copied to clipboard

chore: simplify ADR-028 and address.Module

Open robert-zaremba opened this issue 3 years ago • 2 comments

Description

Closes: #13910


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.

I have...

  • [ ] included the correct type prefix in the PR title
  • [ ] added ! to the type prefix if API or client breaking change
  • [ ] targeted the correct branch (see PR Targeting)
  • [ ] provided a link to the relevant issue or specification
  • [ ] followed the guidelines for building modules
  • [ ] included the necessary unit and integration tests
  • [ ] added a changelog entry to CHANGELOG.md
  • [ ] included comments for documenting Go code
  • [ ] updated the relevant documentation or specification
  • [ ] reviewed "Files changed" and left comments if necessary
  • [ ] confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.

I have...

  • [ ] confirmed the correct type prefix in the PR title
  • [ ] confirmed ! in the type prefix if API or client breaking change
  • [ ] confirmed all author checklist items have been addressed
  • [ ] reviewed state machine logic
  • [ ] reviewed API design and naming
  • [ ] reviewed documentation is accurate
  • [ ] reviewed tests and test coverage
  • [ ] manually tested (if applicable)

robert-zaremba avatar Nov 24 '22 23:11 robert-zaremba

Adding 0.47 backport.

robert-zaremba avatar Nov 25 '22 11:11 robert-zaremba

@amaurym would be great to get your review of this too.

aaronc avatar Dec 05 '22 16:12 aaronc

Great, so waiting for @aaronc re-review. I will message him.

robert-zaremba avatar Dec 19 '22 09:12 robert-zaremba

@aaronc let us know when you can take a look at this again -- looks like we're blocked on your review :)

alexanderbez avatar Dec 19 '22 15:12 alexanderbez

I've implemented the special case discussed in: https://github.com/cosmos/cosmos-sdk/pull/14017#discussion_r1052639955 commit: 67d8d8d940

robert-zaremba avatar Dec 19 '22 21:12 robert-zaremba

up @aaronc , @amaurym

robert-zaremba avatar Dec 28 '22 18:12 robert-zaremba

I'm fine with address.Module reverting to the pre-ADR 028 20-byte addresses (compatible with existing module accounts) when there are no derivation keys.

Personally, I would prefer to have only the "full" ADR-28 addresses for root module accounts. But simplification and compatibility is more important here.

robert-zaremba avatar Jan 04 '23 18:01 robert-zaremba

I'm fine with address.Module reverting to the pre-ADR 028 20-byte addresses (compatible with existing module accounts) when there are no derivation keys.

Personally, I would prefer to have only the "full" ADR-28 addresses for root module accounts. But simplification and compatibility is more important here.

For security purposes? All root accounts should be initialized on startup

aaronc avatar Jan 04 '23 19:01 aaronc

For security purposes?

Mostly for having one general solution (with clear domains - what ADR-028 is mostly about).

I think security is OK here, because we have that module name hash. The concern is if someone is doing something weird and creating a module name which is a hash and could collide with an existing public key hash. Or generates multiple module accounts rather than deriving.

robert-zaremba avatar Jan 04 '23 19:01 robert-zaremba

[Cosmos SDK] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Jan 09 '23 22:01 sonarqubecloud[bot]

I believe it closes https://github.com/cosmos/cosmos-sdk/issues/13782 too right?

julienrbrt avatar Jan 12 '23 16:01 julienrbrt

Can we add a changelog? Then, given the discussion from the community call, we can add automerge.

julienrbrt avatar Jan 12 '23 17:01 julienrbrt