Skip to content
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

feat: internalize sdk simulation package + ibc-go #34

Open
zsystm opened this issue Aug 14, 2023 · 0 comments
Open

feat: internalize sdk simulation package + ibc-go #34

zsystm opened this issue Aug 14, 2023 · 0 comments
Assignees

Comments

@zsystm
Copy link

zsystm commented Aug 14, 2023

To simulate Canto correctly, need to customize sdk simulation package and ibc-go.

Currently we are using cosmos-sdk and ibc-go in b-harvest org to make sim-testing work, but will internalize it and replace current temp dependencies on b-harvest.

The followings are the reason why we customize simulation package and ibc-go.

sdk

  • staking module's operation issue
    • operations assume that the account running operation is one of the simAccs, but delegation in lsm triggered by module itself (chunk.DerivedAddress) so it always return err. simulation is terminated if error is returned while running operation, so we cannot run simulation with native cosmos-sdk.
  • Canto uses 1e18 as power reduction but cosmos-sdk uses 1e6.
  • initialStake which is used to generate a random amount of initial stake is defined as int64.
  • int64 cannot handle Big numbers (n * 1e18).

ibc-go

  • similar reasons as described above

Code Diffs

@zsystm zsystm self-assigned this Aug 14, 2023
@zsystm zsystm moved this to Todo in liquidstaking-module Aug 14, 2023
@dongsam dongsam self-assigned this Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants