Skip to content

Conversation

larry0x
Copy link
Contributor

@larry0x larry0x commented Oct 7, 2023

Commands I used to prepare this PR:

git clone https://github.com/mars-protocol/red-bank.git
git clone https://github.com/mars-protocol/rover.git
cd red-bank
git checkout -b merge
git remote add rover ../rover
git fetch rover master
git merge rover/master --allow-unrelated-histories
# have fun resolving conflicts...

I don't have a good idea how to merge the deployment scripts. For now I simply rename the files (e.g. deploy.ts in the Rover repo is now deploy.rover.ts)

piobab and others added 13 commits August 31, 2023 21:51
* Use paginated UserCollateralsV2 query for lents.

* Add tests.

* Update schema.
Fix Protocol Liquidation Fee calculation.
Oak 7. Remove rewards-collector setup in migration.
* Add credit manager add to health contract instantiation.

* Add nicer msg if no cm set.
* Don't check HF for deposit and repay.

* Update schema.

* Assert errors it comes from price query for HF.
* Specify account kind for health response.

* Extract account-nft types to avoid circular dependency.

* Add tests for AccountKind query in account-nft contract.

* Use closure.

* Update schema.

* Update comment.
* Withdraw coins after claiming rewards for HLS account.

* Update schema.

* Review comments.

* Fmt
* Add max_slippage config.

* Use slippage for ProvideLiquidity and WithdrawLiquidity.

* Assert slippage in swap.

* Update scripts.

* Update error msg.
* New devnet deployment.

* New Addrs and fixes to deployment.

* Create new deployment with TWAP. Gran credit line for CM.

* New devnet deployment with Pyth setup.

* Fmt

* Fix max_slippage config.

* New deployment.

* Update red-bank dep to latest master commit.
* Migrate zapper contract.

* Fix zapper naming.

* Migrate red-bank state in CM.
* Clear empty accounts.

* Update schema.

* Add tests. Cleanup.

* Improve msg.

* Update CM with rc. New deployment.
@larry0x
Copy link
Contributor Author

larry0x commented Oct 7, 2023

Getting "No space left on device" error for coverage

@markonmars
Copy link
Collaborator

It might be unnecessary to merge the rover and redbank deploy scripts together into one, but we could unify them somehow so that we can deploy everything with on command.

@piobab
Copy link
Collaborator

piobab commented Oct 9, 2023

Getting "No space left on device" error for coverage

We have two options:

  1. something similar to this Enable test coverage #305
  2. bump worker disk space

We already decided to go with option 1) for red-bank so maybe we should do it for whole repo the same way, thoughts @larry0x @dancreee ?

@piobab
Copy link
Collaborator

piobab commented Oct 9, 2023

PR is difficult to review :D so better to check diff between rover repo latest commit (mars-protocol/rover@1176c73) and current branch commit bebf5cc

No differences, LGTM!
diff_outposts_and_rover_repos

@dancreee
Copy link

Getting "No space left on device" error for coverage

We have two options:

  1. something similar to this Enable test coverage #305
  2. bump worker disk space

We already decided to go with option 1) for red-bank so maybe we should do it for whole repo the same way, thoughts @larry0x @dancreee ?

agree if it's practical to do this

@piobab
Copy link
Collaborator

piobab commented Oct 11, 2023

All tests passed for me locally, except for:

failures:
    redbank_quering_oracle_successfully
    redbank_should_fail_if_no_price

It is related to libraries feature flag enabled for params contract

thread 'redbank_should_fail_if_no_price' panicked at 'called `Result::unwrap()` on an `Err` value: ExecuteError { msg: "failed to execute message; message index: 0: Error calling the VM: Error during static Wasm validation: Wasm contract doesn't have required export: \"instantiate\". Exports required by VM: [\"allocate\", \"deallocate\", \"instantiate\"].: create wasm contract failed" }', integration-tests/tests/helpers.rs:149:69

Once we extract msgs to types we can remove feature flag and tests should pass.

Moreover we are going to solve no space error by reorganization of tests in separate PR (@larry0x pointed to https://github.com/confio/poe-contracts/tree/main/contracts/tgrade-valset/src and it could make sense).

@piobab piobab marked this pull request as ready for review October 11, 2023 12:37
@piobab
Copy link
Collaborator

piobab commented Oct 11, 2023

@dancreee we agree with @larry0x to merge this PR and fix the rest in separate smaller PRs.

@piobab piobab merged commit 2e5cbe9 into master Oct 11, 2023
@piobab piobab mentioned this pull request Oct 11, 2023
@larry0x larry0x deleted the merge branch October 14, 2023 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants