New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding LSM module (x/lsnative) #391
Conversation
…sdk 0.46.11 commit 5023392bd9718679668dd8e88a792a6defa63c00
commit 5023392bd9718679668dd8e88a792a6defa63c00 cosmos-proto commit 78e33f25b874e7639f540037599d8ea1d161a62c
…to 0.46.11 This diff contains: * slashing module changes * staking module changes * genutil module changes * distribution module changes * staking proto changes * distribution proto changes * added new protocgen.sh
Coverage after merging f/lsm into master
Coverage Report
|
Interesting issue. According to this CI log: the linter is unhappy with 100500 errors coming from modules forked from Cosmos SDK. I'd rather avoid rewriting Cosmos SDK's code to satisfy our linter. How should we proceed? Just turn off the linter for |
… from linting for now
Coverage after merging f/lsm into master
Coverage Report
|
@ajeet97 I've added last commit fixing lint |
persistenceOne/pstake-native#429
1. Overview
This PR adds a cosmos module from https://github.com/iqlusioninc/liquidity-staking-module, which forks the original
staking
,slashing
,distribution
,genutil
Cosmos SDK modules. Since the original repo has been in development for couple of years, it also contains some artifacts from v45 -> v46 migrations and is not applicable without manually picking up stuff from a big diff.2. Implementation details
The changes in this PR are split in multiple commits, the only commit that really matters for now is d754c6f that contains a distilled diff for all the changes needed to implement LSM onto v0.46.11, it doesn't contain any junk left from refactoring the cosmos code itself.
Diff methodology:
The diff was calculated between LSM v0.46.11 using this script https://gist.github.com/xlab/96e7d546645333d154d761578ba0dff9#file-00_the_diff-sh
Manually picked changes line-by-line based on judgement if change is part of LSM implementation of part of previous cosmos refactorings.
The distilled diff is now a commit in this PR
The surplus is also useful, basically what I didn't pick up. I reversed the direction of surplus diff and now those are patches towards upstream LSM repo to make it merge-able into upstream Cosmos SDK v0.46.11
3. How to test/use
cd persistence-sdk/x/lsnative/ && go install ./...
kinda works huh?cd persistence-sdk/x/lsnative/ && ./protocgen.sh
, but after generating proto some manual replacements need to be applied, see 3d5fb0a4. Integrations
This module has one working integration with persistenceCore app, see PR there:
persistenceOne/persistenceCore#187
5. Future Work (optional)
We might need to include the module to simapp and run benchmarking / simulation tests.