Skip to content

Conversation

piobab
Copy link
Collaborator

@piobab piobab commented Sep 5, 2023

Oak no. 8. requires only version fix during migration but there is much more migration needed after neutron incentives changes.

@piobab piobab changed the base branch from master to release/mars-v2 September 5, 2023 20:48
// Get asset incentive for a denom. It should be available but just in case we don't unwrap
let denom_idx = asset_incentives.get(&denom);
if let Some(asset_incentive) = denom_idx {
// Since we didn't track unclaimed rewards per collateral denom in v1 we add them
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can send these rewards to user wallets but I am not sure if this is good decision. For now I add unclaimed rewards from previous state to first user collateral denom.

@piobab
Copy link
Collaborator Author

piobab commented Sep 6, 2023

Pushed fix for schema.

Problem:

mars-incentives
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
status: exit status: 101
stdout: 
stderr: error: There are multiple `mars-incentives` packages in your project, and the specification `mars-incentives` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
  mars-incentives@1.0.0
  mars-incentives@2.0.0

Even with specifying versions. Clean & build. Regenerating Cargo.lock etc - nothing helped.

cargo run --package mars-incentives:2.0.0 --example schema
error: package(s) `mars-incentives:2.0.0` not found in workspace `MarsProtocol/outposts`

.collect::<StdResult<HashMap<_, _>>>()?;
v1_state::USER_UNCLAIMED_REWARDS.clear(deps.storage);

for ((user, denom), user_asset_index) in user_asset_indices {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we hitting block gas limit here if there are too many users?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be. We will see once we try to migrate the contracts on devnet

@dancreee
Copy link

dancreee commented Sep 7, 2023

lgtm, pretty complex migration :) lets see about gas as theC00n brings up

@piobab piobab merged commit c810de1 into release/mars-v2 Sep 8, 2023
@piobab piobab deleted the fix/MP-3299-oak-8 branch September 14, 2023 08:08
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.

3 participants